Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2832913002: Harmonizing SmartLock dialog (Closed)
Patch Set: Added different string for the auto signin in material mode. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698