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

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

Issue 2252283005: Introduce password_manager::FormFetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621355_const_best_matches
Patch Set: Keep updating PasswordStore for blacklisting Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_controller.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 ManagePasswordsUIController::GetFederatedForms() const { 240 ManagePasswordsUIController::GetFederatedForms() const {
241 return passwords_data_.federation_providers_forms(); 241 return passwords_data_.federation_providers_forms();
242 } 242 }
243 243
244 const password_manager::InteractionsStats* 244 const password_manager::InteractionsStats*
245 ManagePasswordsUIController::GetCurrentInteractionStats() const { 245 ManagePasswordsUIController::GetCurrentInteractionStats() const {
246 DCHECK_EQ(password_manager::ui::PENDING_PASSWORD_STATE, GetState()); 246 DCHECK_EQ(password_manager::ui::PENDING_PASSWORD_STATE, GetState());
247 password_manager::PasswordFormManager* form_manager = 247 password_manager::PasswordFormManager* form_manager =
248 passwords_data_.form_manager(); 248 passwords_data_.form_manager();
249 return password_manager::FindStatsByUsername( 249 return password_manager::FindStatsByUsername(
250 form_manager->interactions_stats(), 250 form_manager->form_fetcher()->GetInteractionsStats(),
251 form_manager->pending_credentials().username_value); 251 form_manager->pending_credentials().username_value);
252 } 252 }
253 253
254 void ManagePasswordsUIController::OnBubbleShown() { 254 void ManagePasswordsUIController::OnBubbleShown() {
255 bubble_status_ = SHOWN; 255 bubble_status_ = SHOWN;
256 } 256 }
257 257
258 void ManagePasswordsUIController::OnBubbleHidden() { 258 void ManagePasswordsUIController::OnBubbleHidden() {
259 bool update_icon = (bubble_status_ == SHOWN_PENDING_ICON_UPDATE); 259 bool update_icon = (bubble_status_ == SHOWN_PENDING_ICON_UPDATE);
260 bubble_status_ = NOT_SHOWN; 260 bubble_status_ = NOT_SHOWN;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); 453 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE);
454 } 454 }
455 } 455 }
456 456
457 void ManagePasswordsUIController::WebContentsDestroyed() { 457 void ManagePasswordsUIController::WebContentsDestroyed() {
458 password_manager::PasswordStore* password_store = 458 password_manager::PasswordStore* password_store =
459 GetPasswordStore(web_contents()); 459 GetPasswordStore(web_contents());
460 if (password_store) 460 if (password_store)
461 password_store->RemoveObserver(this); 461 password_store->RemoveObserver(this);
462 } 462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698