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

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

Issue 1271283002: Change password form UI for no accounts stored case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cpf_ui
Patch Set: Not to show password line Created 5 years, 4 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9410b4ba6d109113e55ad39c9848760fe412b11b..31c21cae4995cf83cb7d3140d80e680d082bfc6a 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -393,11 +393,7 @@ ManagePasswordsBubbleView::PendingView::PendingView(
layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0));
SetLayoutManager(layout);
- std::vector<const autofill::PasswordForm*> credentials(
- 1, &parent->model()->pending_password());
// Create the pending credential item, save button and refusal combobox.
- ManagePasswordItemsView* item =
- new ManagePasswordItemsView(parent_->model(), credentials);
save_button_ = new views::BlueButton(
this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SAVE_BUTTON));
save_button_->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
@@ -426,8 +422,16 @@ ManagePasswordsBubbleView::PendingView::PendingView(
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
// Credential row.
- layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
- layout->AddView(item);
+ if (!parent->model()
vasilii 2015/08/05 16:28:26 Please no new line here.
dvadym 2015/08/05 16:51:45 Done.
+ ->pending_password()
+ .IsPossibleChangePasswordFormWithoutUsername()) {
+ std::vector<const autofill::PasswordForm*> credentials(
+ 1, &parent->model()->pending_password());
+ ManagePasswordItemsView* item =
+ new ManagePasswordItemsView(parent_->model(), credentials);
vasilii 2015/08/05 16:28:26 Can you split this and initialize |item| above?
dvadym 2015/08/05 16:51:45 Done.
+ layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
+ layout->AddView(item);
+ }
// Button row.
BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698