Chromium Code Reviews| Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| index 62b185ba2f29a6b9bd98764911d5ee93b9ea1c8f..03b1af0f08860a35bbd87320757d2dc220853c29 100644 |
| --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc |
| @@ -229,12 +229,21 @@ ManagePasswordsBubbleView::AutoSigninView::AutoSigninView( |
| observed_browser_(this) { |
| SetLayoutManager(new views::FillLayout); |
| const autofill::PasswordForm& form = parent_->model()->pending_password(); |
| - CredentialsItemView* credential = new CredentialsItemView( |
| - this, base::string16(), |
| - l10n_util::GetStringFUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE, |
| - form.username_value), |
| - kButtonHoverColor, &form, |
| - parent_->model()->GetProfile()->GetRequestContext()); |
| + CredentialsItemView* credential; |
| + if (ChromeLayoutProvider::Get()->IsHarmonyMode()) { |
| + credential = new CredentialsItemView( |
| + this, |
| + l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE_MD), |
| + form.username_value, kButtonHoverColor, &form, |
| + parent_->model()->GetProfile()->GetRequestContext()); |
| + } else { |
| + credential = new CredentialsItemView( |
| + this, base::string16(), |
| + l10n_util::GetStringFUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE, |
| + form.username_value), |
| + kButtonHoverColor, &form, |
| + parent_->model()->GetProfile()->GetRequestContext()); |
| + } |
|
Peter Kasting
2017/04/24 22:48:31
Nit: I'd like to avoid this code duplication. May
kylix_rd
2017/04/25 17:14:07
I like this solution. Thanks.
|
| credential->SetEnabled(false); |
| AddChildView(credential); |