blob: 7ba3ad39c35a4f668702808133bfd7b1a79b4594 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/passwords/ios_password_infobar_controller.h"
#include "base/strings/sys_string_conversions.h"
#import "ios/chrome/browser/infobars/confirm_infobar_controller+protected.h"
#import "ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h"
#import "ios/chrome/browser/ui/infobars/confirm_infobar_view.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@implementation IOSPasswordInfoBarController
- (void)updateInfobarLabel:(ConfirmInfoBarView*)view {
[super updateInfobarLabel:view];
auto* delegate = static_cast<IOSChromePasswordManagerInfoBarDelegate*>(
self.infoBarDelegate);
base::string16 message = delegate->GetDetailsMessageText();
if (message.empty())
return;
[view addFooterLabel:base::SysUTF16ToNSString(
delegate->GetDetailsMessageText())];
}
@end