diff options
Diffstat (limited to 'chrome/browser/password_manager')
7 files changed, 17 insertions, 13 deletions
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc index 9b0c2b2..66c90d8 100644 --- a/chrome/browser/password_manager/password_manager.cc +++ b/chrome/browser/password_manager/password_manager.cc @@ -57,13 +57,13 @@ void ReportMetrics(bool password_manager_enabled) { } // anonymous namespace // static -void PasswordManager::RegisterUserPrefs(PrefService* prefs) { +void PasswordManager::RegisterUserPrefs(PrefServiceSyncable* prefs) { prefs->RegisterBooleanPref(prefs::kPasswordManagerEnabled, true, - PrefService::SYNCABLE_PREF); + PrefServiceSyncable::SYNCABLE_PREF); prefs->RegisterBooleanPref(prefs::kPasswordManagerAllowShowPasswords, true, - PrefService::UNSYNCABLE_PREF); + PrefServiceSyncable::UNSYNCABLE_PREF); } // static diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h index 1e5a9f0..ac0db2d 100644 --- a/chrome/browser/password_manager/password_manager.h +++ b/chrome/browser/password_manager/password_manager.h @@ -21,7 +21,7 @@ class PasswordManagerDelegate; class PasswordManagerTest; class PasswordFormManager; -class PrefService; +class PrefServiceSyncable; // Per-tab password manager. Handles creation and management of UI elements, // receiving password form data from the renderer and managing the password @@ -31,7 +31,7 @@ class PasswordManager : public LoginModel, public content::WebContentsObserver, public content::WebContentsUserData<PasswordManager> { public: - static void RegisterUserPrefs(PrefService* prefs); + static void RegisterUserPrefs(PrefServiceSyncable* prefs); static void CreateForWebContentsAndDelegate( content::WebContents* contents, diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc index e297d7c..b8e664a 100644 --- a/chrome/browser/password_manager/password_manager_unittest.cc +++ b/chrome/browser/password_manager/password_manager_unittest.cc @@ -348,7 +348,8 @@ TEST_F(PasswordManagerTest, InitiallyInvisibleForm) { TEST_F(PasswordManagerTest, SavingDependsOnManagerEnabledPreference) { // Test that saving passwords depends on the password manager enabled // preference. - TestingPrefService* prefService = testing_profile_->GetTestingPrefService(); + TestingPrefServiceSyncable* prefService = + testing_profile_->GetTestingPrefService(); prefService->SetUserPref(prefs::kPasswordManagerEnabled, Value::CreateBooleanValue(true)); EXPECT_TRUE(manager()->IsSavingEnabled()); @@ -363,7 +364,8 @@ TEST_F(PasswordManagerTest, FillPasswordsOnDisabledManager) { std::vector<PasswordForm*> result; PasswordForm* existing = new PasswordForm(MakeSimpleForm()); result.push_back(existing); - TestingPrefService* prefService = testing_profile_->GetTestingPrefService(); + TestingPrefServiceSyncable* prefService = + testing_profile_->GetTestingPrefService(); prefService->SetUserPref(prefs::kPasswordManagerEnabled, Value::CreateBooleanValue(false)); EXPECT_CALL(delegate_, FillPasswordForm(_)); diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc index 70922f0..d2da9db 100644 --- a/chrome/browser/password_manager/password_store_factory.cc +++ b/chrome/browser/password_manager/password_store_factory.cc @@ -192,12 +192,12 @@ PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const { return ps; } -void PasswordStoreFactory::RegisterUserPrefs(PrefService* prefs) { +void PasswordStoreFactory::RegisterUserPrefs(PrefServiceSyncable* prefs) { #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) \ && defined(OS_POSIX) prefs->RegisterIntegerPref(prefs::kLocalProfileId, kInvalidLocalProfileId, - PrefService::UNSYNCABLE_PREF); + PrefServiceSyncable::UNSYNCABLE_PREF); // Notice that the preprocessor conditions above are exactly those that will // result in using PasswordStoreX in CreatePasswordStore() below. diff --git a/chrome/browser/password_manager/password_store_factory.h b/chrome/browser/password_manager/password_store_factory.h index cd85063..8eea9ae 100644 --- a/chrome/browser/password_manager/password_store_factory.h +++ b/chrome/browser/password_manager/password_store_factory.h @@ -11,6 +11,7 @@ #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h" class PasswordStore; +class PrefServiceSyncable; class Profile; #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) @@ -44,7 +45,7 @@ class PasswordStoreFactory : public RefcountedProfileKeyedServiceFactory { // ProfileKeyedServiceFactory: virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( Profile* profile) const OVERRIDE; - virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE; + virtual void RegisterUserPrefs(PrefServiceSyncable* prefs) OVERRIDE; virtual bool ServiceRedirectedInIncognito() const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc index eae3161..2e5dc10 100644 --- a/chrome/browser/password_manager/password_store_x.cc +++ b/chrome/browser/password_manager/password_store_x.cc @@ -270,11 +270,11 @@ ssize_t PasswordStoreX::MigrateLogins() { #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) // static -void PasswordStoreX::RegisterUserPrefs(PrefService* prefs) { +void PasswordStoreX::RegisterUserPrefs(PrefServiceSyncable* prefs) { // Normally we should be on the UI thread here, but in tests we might not. prefs->RegisterBooleanPref(prefs::kPasswordsUseLocalProfileId, false, // default: passwords don't use local ids - PrefService::UNSYNCABLE_PREF); + PrefServiceSyncable::UNSYNCABLE_PREF); } // static diff --git a/chrome/browser/password_manager/password_store_x.h b/chrome/browser/password_manager/password_store_x.h index ab69ca7..4a25ae9 100644 --- a/chrome/browser/password_manager/password_store_x.h +++ b/chrome/browser/password_manager/password_store_x.h @@ -13,6 +13,7 @@ class LoginDatabase; class PrefService; +class PrefServiceSyncable; class Profile; // PasswordStoreX is used on Linux and other non-Windows, non-Mac OS X @@ -56,7 +57,7 @@ class PasswordStoreX : public PasswordStoreDefault { #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) // Registers the pref setting used for the methods below. - static void RegisterUserPrefs(PrefService* prefs); + static void RegisterUserPrefs(PrefServiceSyncable* prefs); // Returns true if passwords have been tagged with the local profile id. static bool PasswordsUseLocalProfileId(PrefService* prefs); |