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

Unified Diff: chrome/browser/password_manager/password_form_manager.cc

Issue 9665007: Profile refactoring: Remove all PasswordStore code from the Profile interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win and Mac Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/password_form_manager.cc
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 40c707d846c237577f0742752072ab9e6dba743b..1e5d20e77838970d67fa13481ca65f4c91e9272c 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -11,6 +11,7 @@
#include "base/string_util.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/password_manager/password_store.h"
+#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "webkit/forms/password_form_dom_manager.h"
@@ -114,8 +115,8 @@ void PasswordFormManager::PermanentlyBlacklist() {
// autofill it again.
if (!best_matches_.empty()) {
PasswordFormMap::const_iterator iter;
- PasswordStore* password_store =
- profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (!password_store) {
NOTREACHED();
return;
@@ -199,8 +200,8 @@ void PasswordFormManager::FetchMatchingLoginsFromPasswordStore() {
DCHECK_EQ(state_, PRE_MATCHING_PHASE);
DCHECK(!pending_login_query_);
state_ = MATCHING_PHASE;
- PasswordStore* password_store =
- profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (!password_store) {
NOTREACHED();
return;
@@ -347,8 +348,8 @@ void PasswordFormManager::SaveAsNewLogin(bool reset_preferred_login) {
DCHECK(!profile_->IsOffTheRecord());
- PasswordStore* password_store =
- profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ profile_, Profile::IMPLICIT_ACCESS);
if (!password_store) {
NOTREACHED();
return;
@@ -388,8 +389,8 @@ void PasswordFormManager::UpdateLogin() {
DCHECK(!IsNewLogin() && pending_credentials_.preferred);
DCHECK(!profile_->IsOffTheRecord());
- PasswordStore* password_store =
- profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ profile_, Profile::IMPLICIT_ACCESS);
if (!password_store) {
NOTREACHED();
return;

Powered by Google App Engine
This is Rietveld 408576698