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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc

Issue 854173003: Credential Management API: the account chooser dialog supports custom avatars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a test Created 5 years, 11 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/passwords/manage_passwords_bubble_model.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
6 6
7 #include "chrome/browser/password_manager/password_store_factory.h" 7 #include "chrome/browser/password_manager/password_store_factory.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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void ManagePasswordsBubbleModel::OnChooseCredentials( 319 void ManagePasswordsBubbleModel::OnChooseCredentials(
320 const autofill::PasswordForm& password_form) { 320 const autofill::PasswordForm& password_form) {
321 dismissal_reason_ = metrics_util::CLICKED_CREDENTIAL; 321 dismissal_reason_ = metrics_util::CLICKED_CREDENTIAL;
322 RecordExperimentStatistics(web_contents(), dismissal_reason_); 322 RecordExperimentStatistics(web_contents(), dismissal_reason_);
323 ManagePasswordsUIController* manage_passwords_ui_controller = 323 ManagePasswordsUIController* manage_passwords_ui_controller =
324 ManagePasswordsUIController::FromWebContents(web_contents()); 324 ManagePasswordsUIController::FromWebContents(web_contents());
325 manage_passwords_ui_controller->ChooseCredential(true, password_form); 325 manage_passwords_ui_controller->ChooseCredential(true, password_form);
326 state_ = password_manager::ui::INACTIVE_STATE; 326 state_ = password_manager::ui::INACTIVE_STATE;
327 } 327 }
328 328
329 Profile* ManagePasswordsBubbleModel::GetProfile() const {
330 return GetProfileFromWebContents(web_contents());
331 }
332
329 // static 333 // static
330 int ManagePasswordsBubbleModel::UsernameFieldWidth() { 334 int ManagePasswordsBubbleModel::UsernameFieldWidth() {
331 return GetFieldWidth(USERNAME_FIELD); 335 return GetFieldWidth(USERNAME_FIELD);
332 } 336 }
333 337
334 // static 338 // static
335 int ManagePasswordsBubbleModel::PasswordFieldWidth() { 339 int ManagePasswordsBubbleModel::PasswordFieldWidth() {
336 return GetFieldWidth(PASSWORD_FIELD); 340 return GetFieldWidth(PASSWORD_FIELD);
337 } 341 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble_model.h ('k') | chrome/browser/ui/passwords/manage_passwords_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698