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); |