summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-15 13:36:35 -0700
committerKristian Monsen <kristianm@google.com>2011-06-15 13:36:35 -0700
commit6e1a1d3242a4de2a633c62ba45948dd2d0620990 (patch)
tree622361d91a1c8837e5ece6faccd7114824acab88
parentdb1ceda641abc4fa05b6bbf5df686830c4a82cdc (diff)
downloadexternal_chromium-6e1a1d3242a4de2a633c62ba45948dd2d0620990.zip
external_chromium-6e1a1d3242a4de2a633c62ba45948dd2d0620990.tar.gz
external_chromium-6e1a1d3242a4de2a633c62ba45948dd2d0620990.tar.bz2
Removing all prefs usage for Android in autofill
We do not use any of the functionality that is removed with #ifdef's. Will remove local changes in the prefs files in a later CL. Change-Id: I242f785ecf7618206d9f890aa4e78d4d09482a24
-rw-r--r--Android.mk9
-rw-r--r--android/autofill/profile_android.cc5
-rw-r--r--chrome/browser/autofill/autofill_download.cc4
-rw-r--r--chrome/browser/autofill/autofill_manager.cc4
-rw-r--r--chrome/browser/autofill/autofill_manager.h4
5 files changed, 13 insertions, 13 deletions
diff --git a/Android.mk b/Android.mk
index 9c84c57..9b30a33 100644
--- a/Android.mk
+++ b/Android.mk
@@ -364,18 +364,9 @@ LOCAL_SRC_FILES += \
chrome/browser/autofill/phone_number.cc \
chrome/browser/autofill/select_control_handler.cc \
\
- chrome/browser/prefs/default_pref_store.cc \
- chrome/browser/prefs/overlay_persistent_pref_store.cc \
- chrome/browser/prefs/pref_service.cc \
- chrome/browser/prefs/pref_value_map.cc \
- chrome/browser/prefs/pref_value_store.cc \
- chrome/browser/prefs/value_map_pref_store.cc \
- \
chrome/common/guid.cc \
chrome/common/guid_posix.cc \
chrome/common/json_value_serializer.cc \
- chrome/common/pref_names.cc \
- chrome/common/pref_store.cc \
chrome/common/url_constants.cc \
\
chrome/common/net/url_fetcher.cc \
diff --git a/android/autofill/profile_android.cc b/android/autofill/profile_android.cc
index 4b14d7e..86f93bc 100644
--- a/android/autofill/profile_android.cc
+++ b/android/autofill/profile_android.cc
@@ -64,10 +64,7 @@ PersonalDataManager* ProfileImplAndroid::GetPersonalDataManager()
PrefService* ProfileImplAndroid::GetPrefs() {
- if (!preferences_.get()) {
- preferences_.reset(PrefService::CreatePrefService(path_, NULL, NULL));
- }
- return preferences_.get();
+ return NULL;
}
URLRequestContextGetter* ProfileImplAndroid::GetRequestContext() {
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index 783ba64..c20e25c 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -166,8 +166,10 @@ void AutoFillDownloadManager::SetPositiveUploadRate(double rate) {
DCHECK_GE(rate, 0.0);
DCHECK_LE(rate, 1.0);
DCHECK(profile_);
+#ifndef ANDROID
PrefService* preferences = profile_->GetPrefs();
preferences->SetDouble(prefs::kAutoFillPositiveUploadRate, rate);
+#endif
}
void AutoFillDownloadManager::SetNegativeUploadRate(double rate) {
@@ -177,8 +179,10 @@ void AutoFillDownloadManager::SetNegativeUploadRate(double rate) {
DCHECK_GE(rate, 0.0);
DCHECK_LE(rate, 1.0);
DCHECK(profile_);
+#ifndef ANDROID
PrefService* preferences = profile_->GetPrefs();
preferences->SetDouble(prefs::kAutoFillNegativeUploadRate, rate);
+#endif
}
bool AutoFillDownloadManager::StartRequest(
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 4340aeb..64374b4 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -239,11 +239,14 @@ AutoFillManager::~AutoFillManager() {
download_manager_.SetObserver(NULL);
}
+#ifndef ANDROID
// static
void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement);
}
+#endif
+#ifndef ANDROID
// static
void AutoFillManager::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true);
@@ -257,6 +260,7 @@ void AutoFillManager::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterDoublePref(prefs::kAutoFillNegativeUploadRate,
kAutoFillNegativeUploadRateDefaultValue);
}
+#endif
#ifndef ANDROID
void AutoFillManager::DidNavigateMainFramePostCommit(
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index d7dc87f..e584429 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -52,11 +52,15 @@ class AutoFillManager :
explicit AutoFillManager(TabContents* tab_contents);
virtual ~AutoFillManager();
+#ifndef ANDROID
// Registers our browser prefs.
static void RegisterBrowserPrefs(PrefService* prefs);
+#endif
+#ifndef ANDROID
// Registers our Enable/Disable AutoFill pref.
static void RegisterUserPrefs(PrefService* prefs);
+#endif
// Returns the TabContents hosting this AutoFillManager.
TabContents* tab_contents() const { return tab_contents_; }