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

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

Issue 10828345: Extract PrefServiceBase into chrome/browser/api. Use in api and autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 4 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
« no previous file with comments | « chrome/browser/autofill/autofill_common_test.cc ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_download.cc
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index cdd56a122ab1b0a6d11c2716d5d0430051dc6fb2..46c7707dec06aeeefb8920e314b772fb7c9b681e 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/autofill/autofill_metrics.h"
#include "chrome/browser/autofill/autofill_xml_parser.h"
#include "chrome/browser/autofill/form_structure.h"
-#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/api/prefs/pref_service_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "googleurl/src/gurl.h"
@@ -56,7 +56,7 @@ AutofillDownloadManager::AutofillDownloadManager(Profile* profile,
negative_upload_rate_(0),
fetcher_id_for_unittest_(0) {
DCHECK(observer_);
- PrefService* preferences = profile_->GetPrefs();
+ PrefServiceBase* preferences = PrefServiceBase::ForProfile(profile_);
positive_upload_rate_ =
preferences->GetDouble(prefs::kAutofillPositiveUploadRate);
negative_upload_rate_ =
@@ -143,7 +143,7 @@ void AutofillDownloadManager::SetPositiveUploadRate(double rate) {
positive_upload_rate_ = rate;
DCHECK_GE(rate, 0.0);
DCHECK_LE(rate, 1.0);
- PrefService* preferences = profile_->GetPrefs();
+ PrefServiceBase* preferences = PrefServiceBase::ForProfile(profile_);
preferences->SetDouble(prefs::kAutofillPositiveUploadRate, rate);
}
@@ -153,7 +153,7 @@ void AutofillDownloadManager::SetNegativeUploadRate(double rate) {
negative_upload_rate_ = rate;
DCHECK_GE(rate, 0.0);
DCHECK_LE(rate, 1.0);
- PrefService* preferences = profile_->GetPrefs();
+ PrefServiceBase* preferences = PrefServiceBase::ForProfile(profile_);
preferences->SetDouble(prefs::kAutofillNegativeUploadRate, rate);
}
« no previous file with comments | « chrome/browser/autofill/autofill_common_test.cc ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698