| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_manager/core/browser/password_manager.h" | 5 #include "components/password_manager/core/browser/password_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 } // namespace | 90 } // namespace |
| 91 | 91 |
| 92 // static | 92 // static |
| 93 void PasswordManager::RegisterProfilePrefs( | 93 void PasswordManager::RegisterProfilePrefs( |
| 94 user_prefs::PrefRegistrySyncable* registry) { | 94 user_prefs::PrefRegistrySyncable* registry) { |
| 95 registry->RegisterBooleanPref( | 95 registry->RegisterBooleanPref( |
| 96 prefs::kPasswordManagerSavingEnabled, | 96 prefs::kPasswordManagerSavingEnabled, |
| 97 true, | 97 true, |
| 98 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 98 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 99 registry->RegisterBooleanPref( | 99 registry->RegisterBooleanPref(prefs::kPasswordManagerAutoSignin, true); |
| 100 prefs::kPasswordManagerAutoSignin, true, | 100 registry->RegisterBooleanPref(prefs::kPasswordManagerAllowShowPasswords, |
| 101 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 101 true); |
| 102 registry->RegisterBooleanPref( | 102 registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains); |
| 103 prefs::kPasswordManagerAllowShowPasswords, true, | |
| 104 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 105 registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains, | |
| 106 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 107 } | 103 } |
| 108 | 104 |
| 109 #if defined(OS_WIN) | 105 #if defined(OS_WIN) |
| 110 // static | 106 // static |
| 111 void PasswordManager::RegisterLocalPrefs(PrefRegistrySimple* registry) { | 107 void PasswordManager::RegisterLocalPrefs(PrefRegistrySimple* registry) { |
| 112 registry->RegisterInt64Pref(prefs::kOsPasswordLastChanged, 0); | 108 registry->RegisterInt64Pref(prefs::kOsPasswordLastChanged, 0); |
| 113 registry->RegisterBooleanPref(prefs::kOsPasswordBlank, false); | 109 registry->RegisterBooleanPref(prefs::kOsPasswordBlank, false); |
| 114 } | 110 } |
| 115 #endif | 111 #endif |
| 116 | 112 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 predictions[form->ToFormData()] = *(*field); | 656 predictions[form->ToFormData()] = *(*field); |
| 661 } | 657 } |
| 662 } | 658 } |
| 663 } | 659 } |
| 664 if (predictions.empty()) | 660 if (predictions.empty()) |
| 665 return; | 661 return; |
| 666 driver->AutofillDataReceived(predictions); | 662 driver->AutofillDataReceived(predictions); |
| 667 } | 663 } |
| 668 | 664 |
| 669 } // namespace password_manager | 665 } // namespace password_manager |
| OLD | NEW |