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

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 2832049: AutoFill auxiliary profiles should be off on non-Mac platforms. (Closed)
Patch Set: Created 10 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/autofill_manager.h" 5 #include "chrome/browser/autofill/autofill_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 // static 83 // static
84 void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) { 84 void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) {
85 prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement); 85 prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement);
86 } 86 }
87 87
88 // static 88 // static
89 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { 89 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) {
90 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true); 90 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true);
91 #if defined(OS_MACOSX)
91 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true); 92 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true);
92 93 #else
94 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false);
95 #endif
93 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate, 96 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate,
94 kAutoFillPositiveUploadRateDefaultValue); 97 kAutoFillPositiveUploadRateDefaultValue);
95 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate, 98 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate,
96 kAutoFillNegativeUploadRateDefaultValue); 99 kAutoFillNegativeUploadRateDefaultValue);
97 } 100 }
98 101
99 void AutoFillManager::FormSubmitted(const FormData& form) { 102 void AutoFillManager::FormSubmitted(const FormData& form) {
100 if (!IsAutoFillEnabled()) 103 if (!IsAutoFillEnabled())
101 return; 104 return;
102 105
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 field->set_value(number); 597 field->set_value(number);
595 } else if (has_valid_suffix_and_prefix && 598 } else if (has_valid_suffix_and_prefix &&
596 field->size() == kAutoFillPhoneNumberSuffixCount) { 599 field->size() == kAutoFillPhoneNumberSuffixCount) {
597 number = number.substr(kAutoFillPhoneNumberSuffixOffset, 600 number = number.substr(kAutoFillPhoneNumberSuffixOffset,
598 kAutoFillPhoneNumberSuffixCount); 601 kAutoFillPhoneNumberSuffixCount);
599 field->set_value(number); 602 field->set_value(number);
600 } else { 603 } else {
601 field->set_value(number); 604 field->set_value(number);
602 } 605 }
603 } 606 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698