Chromium Code Reviews| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 | 194 |
| 195 AutofillManager::~AutofillManager() {} | 195 AutofillManager::~AutofillManager() {} |
| 196 | 196 |
| 197 // static | 197 // static |
| 198 void AutofillManager::RegisterProfilePrefs( | 198 void AutofillManager::RegisterProfilePrefs( |
| 199 user_prefs::PrefRegistrySyncable* registry) { | 199 user_prefs::PrefRegistrySyncable* registry) { |
| 200 registry->RegisterBooleanPref( | 200 registry->RegisterBooleanPref( |
| 201 prefs::kAutofillEnabled, | 201 prefs::kAutofillEnabled, |
| 202 true, | 202 true, |
| 203 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 203 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 204 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 204 #if defined(OS_ANDROID) |
| 205 registry->RegisterBooleanPref( | 205 registry->RegisterBooleanPref( |
| 206 prefs::kAutofillAuxiliaryProfilesEnabled, | 206 prefs::kAutofillAuxiliaryProfilesEnabled, |
| 207 true, | 207 true, |
| 208 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 208 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 209 #else // defined(OS_MACOSX) || defined(OS_ANDROID) | 209 #else // defined(OS_ANDROID) |
|
Ilya Sherman
2014/05/30 23:39:48
Hmm, what happens if the user enables access to th
erikchen
2014/06/02 21:21:17
I've added a new pref for mac.
| |
| 210 registry->RegisterBooleanPref( | 210 registry->RegisterBooleanPref( |
| 211 prefs::kAutofillAuxiliaryProfilesEnabled, | 211 prefs::kAutofillAuxiliaryProfilesEnabled, |
| 212 false, | 212 false, |
| 213 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 213 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 214 #endif // defined(OS_MACOSX) || defined(OS_ANDROID) | 214 #endif // defined(OS_MACOSX) || defined(OS_ANDROID) |
|
Ilya Sherman
2014/05/30 23:39:48
nit: Please update this comment.
Ilya Sherman
2014/05/30 23:39:48
What happens to users who have already granted Chr
erikchen
2014/05/31 00:14:08
ack. The logic in this CL for personal_data_manage
Ilya Sherman
2014/05/31 00:39:15
Hmm, that looks a little more complicated than wha
erikchen
2014/06/02 21:21:17
I've added a new pref for mac, as well as a migrat
| |
| 215 #if defined(OS_MACOSX) | 215 #if defined(OS_MACOSX) |
| 216 registry->RegisterBooleanPref( | 216 registry->RegisterBooleanPref( |
| 217 prefs::kAutofillAuxiliaryProfilesQueried, | 217 prefs::kAutofillAuxiliaryProfilesQueried, |
| 218 false, | 218 false, |
| 219 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 219 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 220 #endif // defined(OS_MACOSX) | 220 #endif // defined(OS_MACOSX) |
| 221 registry->RegisterDoublePref( | 221 registry->RegisterDoublePref( |
| 222 prefs::kAutofillPositiveUploadRate, | 222 prefs::kAutofillPositiveUploadRate, |
| 223 kAutofillPositiveUploadRateDefaultValue, | 223 kAutofillPositiveUploadRateDefaultValue, |
| 224 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 224 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1160 return false; | 1160 return false; |
| 1161 | 1161 |
| 1162 // Disregard forms that we wouldn't ever autofill in the first place. | 1162 // Disregard forms that we wouldn't ever autofill in the first place. |
| 1163 if (!form.ShouldBeParsed(true)) | 1163 if (!form.ShouldBeParsed(true)) |
| 1164 return false; | 1164 return false; |
| 1165 | 1165 |
| 1166 return true; | 1166 return true; |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 } // namespace autofill | 1169 } // namespace autofill |
| OLD | NEW |