OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 cancel_button_->SetFontList( | 202 cancel_button_->SetFontList( |
203 ui::ResourceBundle::GetSharedInstance().GetFontList( | 203 ui::ResourceBundle::GetSharedInstance().GetFontList( |
204 ui::ResourceBundle::SmallFont)); | 204 ui::ResourceBundle::SmallFont)); |
205 | 205 |
206 // Title row. | 206 // Title row. |
207 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); | 207 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); |
208 AddTitleRow(layout, parent_->model()); | 208 AddTitleRow(layout, parent_->model()); |
209 | 209 |
210 const auto& pending_credentials = parent_->model()->pending_credentials(); | 210 const auto& pending_credentials = parent_->model()->pending_credentials(); |
211 for (autofill::PasswordForm* form : pending_credentials) { | 211 for (autofill::PasswordForm* form : pending_credentials) { |
212 CredentialsItemView* credential_view = new CredentialsItemView(this, *form); | 212 CredentialsItemView* credential_view = |
213 new CredentialsItemView(this, *form, parent_->model()->GetProfile()); | |
Mike West
2015/01/20 17:48:55
It looks like you only use the Profile to get the
vasilii
2015/01/20 19:43:03
Done.
| |
213 // Add the title to the layout with appropriate padding. | 214 // Add the title to the layout with appropriate padding. |
214 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); | 215 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); |
215 layout->AddView(credential_view); | 216 layout->AddView(credential_view); |
216 } | 217 } |
217 | 218 |
218 // Button row. | 219 // Button row. |
219 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET); | 220 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET); |
220 layout->StartRowWithPadding( | 221 layout->StartRowWithPadding( |
221 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); | 222 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); |
222 layout->AddView(cancel_button_); | 223 layout->AddView(cancel_button_); |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
970 | 971 |
971 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { | 972 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { |
972 if (model()->best_matches().empty()) { | 973 if (model()->best_matches().empty()) { |
973 // Skip confirmation if there are no existing passwords for this site. | 974 // Skip confirmation if there are no existing passwords for this site. |
974 NotifyConfirmedNeverForThisSite(); | 975 NotifyConfirmedNeverForThisSite(); |
975 } else { | 976 } else { |
976 model()->OnConfirmationForNeverForThisSite(); | 977 model()->OnConfirmationForNeverForThisSite(); |
977 Refresh(); | 978 Refresh(); |
978 } | 979 } |
979 } | 980 } |
OLD | NEW |