OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <map> | 10 #include <map> |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 AutofillManager::~AutofillManager() {} | 193 AutofillManager::~AutofillManager() {} |
194 | 194 |
195 // static | 195 // static |
196 void AutofillManager::RegisterProfilePrefs( | 196 void AutofillManager::RegisterProfilePrefs( |
197 user_prefs::PrefRegistrySyncable* registry) { | 197 user_prefs::PrefRegistrySyncable* registry) { |
198 registry->RegisterBooleanPref( | 198 registry->RegisterBooleanPref( |
199 prefs::kAutofillEnabled, | 199 prefs::kAutofillEnabled, |
200 true, | 200 true, |
201 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 201 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
202 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 202 #if defined(OS_MACOSX) |
203 registry->RegisterBooleanPref( | 203 registry->RegisterBooleanPref( |
204 prefs::kAutofillAuxiliaryProfilesEnabled, | 204 prefs::kAutofillAuxiliaryProfilesEnabled, |
205 true, | 205 true, |
206 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 206 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
207 #else // defined(OS_MACOSX) || defined(OS_ANDROID) | 207 #else // defined(OS_MACOSX) |
208 registry->RegisterBooleanPref( | 208 registry->RegisterBooleanPref( |
209 prefs::kAutofillAuxiliaryProfilesEnabled, | 209 prefs::kAutofillAuxiliaryProfilesEnabled, |
210 false, | 210 false, |
211 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 211 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
212 #endif // defined(OS_MACOSX) || defined(OS_ANDROID) | 212 #endif // defined(OS_MACOSX) |
213 #if defined(OS_MACOSX) | 213 #if defined(OS_MACOSX) |
214 registry->RegisterBooleanPref( | 214 registry->RegisterBooleanPref( |
215 prefs::kAutofillMacAddressBookQueried, | 215 prefs::kAutofillMacAddressBookQueried, |
216 false, | 216 false, |
217 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 217 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
218 #endif // defined(OS_MACOSX) | 218 #endif // defined(OS_MACOSX) |
219 registry->RegisterDoublePref( | 219 registry->RegisterDoublePref( |
220 prefs::kAutofillPositiveUploadRate, | 220 prefs::kAutofillPositiveUploadRate, |
221 kAutofillPositiveUploadRateDefaultValue, | 221 kAutofillPositiveUploadRateDefaultValue, |
222 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 222 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 return false; | 1220 return false; |
1221 | 1221 |
1222 // Disregard forms that we wouldn't ever autofill in the first place. | 1222 // Disregard forms that we wouldn't ever autofill in the first place. |
1223 if (!form.ShouldBeParsed()) | 1223 if (!form.ShouldBeParsed()) |
1224 return false; | 1224 return false; |
1225 | 1225 |
1226 return true; | 1226 return true; |
1227 } | 1227 } |
1228 | 1228 |
1229 } // namespace autofill | 1229 } // namespace autofill |
OLD | NEW |