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

Unified Diff: chrome/browser/autofill/personal_data_manager.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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/autofill/personal_data_manager.cc
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 76b5961a302701c2a89ecd48a2592dd2a4c14b26..c4305bdfe127ccff8686406b17b8f92e7d0967a6 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/autofill/validation.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
+#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_source.h"
@@ -495,7 +496,7 @@ bool PersonalDataManager::IsDataLoaded() const {
}
const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles() {
- if (!PrefServiceFromBrowserContext(browser_context_)->GetBoolean(
+ if (!components::UserPrefs::Get(browser_context_)->GetBoolean(
prefs::kAutofillAuxiliaryProfilesEnabled)) {
return web_profiles();
}
@@ -670,7 +671,7 @@ void PersonalDataManager::Init(BrowserContext* browser_context) {
}
bool PersonalDataManager::IsAutofillEnabled() const {
- return PrefServiceFromBrowserContext(browser_context_)->GetBoolean(
+ return components::UserPrefs::Get(browser_context_)->GetBoolean(
prefs::kAutofillEnabled);
}

Powered by Google App Engine
This is Rietveld 408576698