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

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

Issue 9949024: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-base Created 8 years, 8 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_store_factory.cc
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index a4044530cb267db1fe535fd330b59c54c219ba6f..26e17987391bd9f796e55cedeba5311901cb0d95 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -11,6 +11,8 @@
#include "chrome/browser/password_manager/password_store_default.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -63,10 +65,7 @@ PasswordStoreFactory::PasswordStoreFactory()
: RefcountedProfileKeyedServiceFactory(
"PasswordStore",
ProfileDependencyManager::GetInstance()) {
- // TODO(erg): We must always depend on WebDB; we don't want the dependency
- // graph to be different based on platform.
- //
- // DependsOn(WebDataServiceFactory::GetInstance());
+ DependsOn(WebDataServiceFactory::GetInstance());
}
PasswordStoreFactory::~PasswordStoreFactory() {}
@@ -108,7 +107,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const {
#if defined(OS_WIN)
ps = new PasswordStoreWin(
login_db, profile,
- profile->GetWebDataService(Profile::IMPLICIT_ACCESS));
+ WebDataServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS));
#elif defined(OS_MACOSX)
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseMockKeychain)) {
ps = new PasswordStoreMac(new crypto::MockKeychain(), login_db);
@@ -118,8 +117,8 @@ PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const {
#elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
// For now, we use PasswordStoreDefault. We might want to make a native
// backend for PasswordStoreX (see below) in the future though.
- ps = new PasswordStoreDefault(
- login_db, profile, profile->GetWebDataService(Profile::IMPLICIT_ACCESS));
+ ps = new PasswordStoreDefault(login_db, profile,
+ WebDataServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS));
#elif defined(OS_POSIX)
// On POSIX systems, we try to use the "native" password management system of
// the desktop environment currently running, allowing GNOME Keyring in XFCE.
@@ -174,7 +173,8 @@ PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const {
}
ps = new PasswordStoreX(login_db, profile,
- profile->GetWebDataService(Profile::IMPLICIT_ACCESS),
+ WebDataServiceFactory::GetForProfile(profile,
+ Profile::IMPLICIT_ACCESS),
backend.release());
#else
NOTIMPLEMENTED();

Powered by Google App Engine
This is Rietveld 408576698