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

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

Issue 2832913002: Harmonizing SmartLock dialog (Closed)
Patch Set: 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 5f5471b9e5bdf2b29eb025d8f6ba821a6088324d..b785ce05ad3a2719cbc99e8294c1f4c893301c76 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/ui/passwords/password_dialog_prompts.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/browser/ui/views/passwords/credentials_item_view.h"
#include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
#include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
@@ -222,12 +223,22 @@ 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::GetStringFUTF16(IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_TITLE,
vabr (Chromium) 2017/04/21 14:28:15 Inserting an empty string here seems to be a bit o
kylix_rd 2017/04/21 16:17:30 That thought had crossed my mind. Next patch has t
+ base::string16()),
+ 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());
+ }
credential->SetEnabled(false);
AddChildView(credential);

Powered by Google App Engine
This is Rietveld 408576698