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

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

Issue 2800031: AutoFill "me" card integration defaults to enabled on Mac (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 | « chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm ('k') | no next file » | 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // static 64 // static
65 void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) { 65 void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) {
66 prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement); 66 prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement);
67 } 67 }
68 68
69 // static 69 // static
70 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { 70 void AutoFillManager::RegisterUserPrefs(PrefService* prefs) {
71 prefs->RegisterBooleanPref(prefs::kAutoFillInfoBarShown, false); 71 prefs->RegisterBooleanPref(prefs::kAutoFillInfoBarShown, false);
72 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true); 72 prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true);
73 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false); 73 prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true);
74 74
75 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate, 75 prefs->RegisterRealPref(prefs::kAutoFillPositiveUploadRate,
76 kAutoFillPositiveUploadRateDefaultValue); 76 kAutoFillPositiveUploadRateDefaultValue);
77 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate, 77 prefs->RegisterRealPref(prefs::kAutoFillNegativeUploadRate,
78 kAutoFillNegativeUploadRateDefaultValue); 78 kAutoFillNegativeUploadRateDefaultValue);
79 } 79 }
80 80
81 void AutoFillManager::FormSubmitted(const FormData& form) { 81 void AutoFillManager::FormSubmitted(const FormData& form) {
82 if (!IsAutoFillEnabled()) 82 if (!IsAutoFillEnabled())
83 return; 83 return;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 field->set_value(number); 614 field->set_value(number);
615 } else if (has_valid_suffix_and_prefix && 615 } else if (has_valid_suffix_and_prefix &&
616 field->size() == kAutoFillPhoneNumberSuffixCount) { 616 field->size() == kAutoFillPhoneNumberSuffixCount) {
617 number = number.substr(kAutoFillPhoneNumberSuffixOffset, 617 number = number.substr(kAutoFillPhoneNumberSuffixOffset,
618 kAutoFillPhoneNumberSuffixCount); 618 kAutoFillPhoneNumberSuffixCount);
619 field->set_value(number); 619 field->set_value(number);
620 } else { 620 } else {
621 field->set_value(number); 621 field->set_value(number);
622 } 622 }
623 } 623 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698