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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 1162583003: Credential Management: Rename 'LocalCredential' to 'PasswordCredential' (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drop
Patch Set: Fix. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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 "base/timer/timer.h" 7 #include "base/timer/timer.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 cancel_button_->SetFontList( 211 cancel_button_->SetFontList(
212 ui::ResourceBundle::GetSharedInstance().GetFontList( 212 ui::ResourceBundle::GetSharedInstance().GetFontList(
213 ui::ResourceBundle::SmallFont)); 213 ui::ResourceBundle::SmallFont));
214 214
215 // Title row. 215 // Title row.
216 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); 216 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
217 AddTitleRow(layout, parent_->model()); 217 AddTitleRow(layout, parent_->model());
218 218
219 AddCredentialItemsWithType( 219 AddCredentialItemsWithType(
220 layout, parent_->model()->local_credentials(), 220 layout, parent_->model()->local_credentials(),
221 password_manager::CredentialType::CREDENTIAL_TYPE_LOCAL); 221 password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD);
222 222
223 AddCredentialItemsWithType( 223 AddCredentialItemsWithType(
224 layout, parent_->model()->federated_credentials(), 224 layout, parent_->model()->federated_credentials(),
225 password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED); 225 password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED);
226 226
227 // Button row. 227 // Button row.
228 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET); 228 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET);
229 layout->StartRowWithPadding( 229 layout->StartRowWithPadding(
230 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); 230 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing);
231 layout->AddView(cancel_button_); 231 layout->AddView(cancel_button_);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 DISALLOW_COPY_AND_ASSIGN(AutoSigninView); 301 DISALLOW_COPY_AND_ASSIGN(AutoSigninView);
302 }; 302 };
303 303
304 ManagePasswordsBubbleView::AutoSigninView::AutoSigninView( 304 ManagePasswordsBubbleView::AutoSigninView::AutoSigninView(
305 ManagePasswordsBubbleView* parent) 305 ManagePasswordsBubbleView* parent)
306 : parent_(parent), 306 : parent_(parent),
307 observed_browser_(this) { 307 observed_browser_(this) {
308 SetLayoutManager(new views::FillLayout); 308 SetLayoutManager(new views::FillLayout);
309 CredentialsItemView* credential = new CredentialsItemView( 309 CredentialsItemView* credential = new CredentialsItemView(
310 this, 310 this, &parent_->model()->pending_password(),
311 &parent_->model()->pending_password(), 311 password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD,
312 password_manager::CredentialType::CREDENTIAL_TYPE_LOCAL,
313 CredentialsItemView::AUTO_SIGNIN, 312 CredentialsItemView::AUTO_SIGNIN,
314 parent_->model()->GetProfile()->GetRequestContext()); 313 parent_->model()->GetProfile()->GetRequestContext());
315 AddChildView(credential); 314 AddChildView(credential);
316 parent_->set_initially_focused_view(credential); 315 parent_->set_initially_focused_view(credential);
317 316
318 Browser* browser = 317 Browser* browser =
319 chrome::FindBrowserWithWebContents(parent_->web_contents()); 318 chrome::FindBrowserWithWebContents(parent_->web_contents());
320 DCHECK(browser); 319 DCHECK(browser);
321 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); 320 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
322 observed_browser_.Add(browser_view->GetWidget()); 321 observed_browser_.Add(browser_view->GetWidget());
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { 1217 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() {
1219 if (model()->local_credentials().empty()) { 1218 if (model()->local_credentials().empty()) {
1220 // Skip confirmation if there are no existing passwords for this site. 1219 // Skip confirmation if there are no existing passwords for this site.
1221 NotifyConfirmedNeverForThisSite(); 1220 NotifyConfirmedNeverForThisSite();
1222 } else { 1221 } else {
1223 model()->OnConfirmationForNeverForThisSite(); 1222 model()->OnConfirmationForNeverForThisSite();
1224 Refresh(); 1223 Refresh();
1225 SizeToContents(); 1224 SizeToContents();
1226 } 1225 }
1227 } 1226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698