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_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 void PasswordManager::RegisterProfilePrefs( | 135 void PasswordManager::RegisterProfilePrefs( |
136 user_prefs::PrefRegistrySyncable* registry) { | 136 user_prefs::PrefRegistrySyncable* registry) { |
137 registry->RegisterBooleanPref( | 137 registry->RegisterBooleanPref( |
138 prefs::kPasswordManagerSavingEnabled, | 138 prefs::kPasswordManagerSavingEnabled, |
139 true, | 139 true, |
140 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 140 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
141 registry->RegisterBooleanPref(prefs::kPasswordManagerAutoSignin, true); | 141 registry->RegisterBooleanPref(prefs::kPasswordManagerAutoSignin, true); |
142 registry->RegisterBooleanPref(prefs::kPasswordManagerAllowShowPasswords, | 142 registry->RegisterBooleanPref(prefs::kPasswordManagerAllowShowPasswords, |
143 true); | 143 true); |
144 registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains); | 144 registry->RegisterListPref(prefs::kPasswordManagerGroupsForDomains); |
| 145 #if defined(OS_MACOSX) |
| 146 registry->RegisterIntegerPref(prefs::kKeychainMigrationStatus, |
| 147 static_cast<int>(MigrationStatus::NOT_STARTED)); |
| 148 #endif |
145 } | 149 } |
146 | 150 |
147 #if defined(OS_WIN) | 151 #if defined(OS_WIN) |
148 // static | 152 // static |
149 void PasswordManager::RegisterLocalPrefs(PrefRegistrySimple* registry) { | 153 void PasswordManager::RegisterLocalPrefs(PrefRegistrySimple* registry) { |
150 registry->RegisterInt64Pref(prefs::kOsPasswordLastChanged, 0); | 154 registry->RegisterInt64Pref(prefs::kOsPasswordLastChanged, 0); |
151 registry->RegisterBooleanPref(prefs::kOsPasswordBlank, false); | 155 registry->RegisterBooleanPref(prefs::kOsPasswordBlank, false); |
152 } | 156 } |
153 #endif | 157 #endif |
154 | 158 |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 if (ServerTypeToPrediction((*field)->server_type(), &prediction_type)) | 761 if (ServerTypeToPrediction((*field)->server_type(), &prediction_type)) |
758 predictions[form->ToFormData()][prediction_type] = *(*field); | 762 predictions[form->ToFormData()][prediction_type] = *(*field); |
759 } | 763 } |
760 } | 764 } |
761 if (predictions.empty()) | 765 if (predictions.empty()) |
762 return; | 766 return; |
763 driver->AutofillDataReceived(predictions); | 767 driver->AutofillDataReceived(predictions); |
764 } | 768 } |
765 | 769 |
766 } // namespace password_manager | 770 } // namespace password_manager |
OLD | NEW |