summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-03 02:29:25 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-03 02:29:25 +0000
commit1350815259420160cfd2bdf8d94fbf9f80bc379b (patch)
treead675da1d5cf72d76e6ccccfb782cb2336259f9b /chrome/browser/autofill
parent150c51dcb5815eb198d58f5b2f35e2b6dca78aa2 (diff)
downloadchromium_src-1350815259420160cfd2bdf8d94fbf9f80bc379b.zip
chromium_src-1350815259420160cfd2bdf8d94fbf9f80bc379b.tar.gz
chromium_src-1350815259420160cfd2bdf8d94fbf9f80bc379b.tar.bz2
AutoFill auxiliary profiles should be off on non-Mac platforms.
These changes conditionally turn off auxiliary profiles at compile time for non-Mac platforms. BUG=48217 TEST=Manual test on Windows: Surf to a form and trigger AutoFill suggestions. Review URL: http://codereview.chromium.org/2832049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc5
-rw-r--r--chrome/browser/autofill/personal_data_manager.cc6
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index dbe01d0..aec30ee 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -88,8 +88,11 @@ void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) {
// static
void AutoFillManager::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true);
+#if defined(OS_MACOSX)
prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true);
-
+#else
+ prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false);
+#endif
prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate,
kAutoFillPositiveUploadRateDefaultValue);
prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate,
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 43c06d1..9e85f88 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -405,6 +405,12 @@ const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() {
bool auxiliary_profiles_enabled = profile_->GetPrefs()->GetBoolean(
prefs::kAutoFillAuxiliaryProfilesEnabled);
+
+#if !defined(OS_MACOSX)
+ DCHECK(!auxiliary_profiles_enabled)
+ << "Auxiliary profiles supported on Mac only";
+#endif
+
if (auxiliary_profiles_enabled) {
profiles_.clear();