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 "chrome/browser/password_manager/password_manager.h" | 5 #include "chrome/browser/password_manager/password_manager.h" |
6 | 6 |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // a boolean histogram. | 56 // a boolean histogram. |
57 if (password_manager_enabled) | 57 if (password_manager_enabled) |
58 content::RecordAction(UserMetricsAction("PasswordManager_Enabled")); | 58 content::RecordAction(UserMetricsAction("PasswordManager_Enabled")); |
59 else | 59 else |
60 content::RecordAction(UserMetricsAction("PasswordManager_Disabled")); | 60 content::RecordAction(UserMetricsAction("PasswordManager_Disabled")); |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 // static | 65 // static |
66 void PasswordManager::RegisterUserPrefs( | 66 void PasswordManager::RegisterProfilePrefs( |
67 user_prefs::PrefRegistrySyncable* registry) { | 67 user_prefs::PrefRegistrySyncable* registry) { |
68 registry->RegisterBooleanPref( | 68 registry->RegisterBooleanPref( |
69 prefs::kPasswordManagerEnabled, | 69 prefs::kPasswordManagerEnabled, |
70 true, | 70 true, |
71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
72 registry->RegisterBooleanPref( | 72 registry->RegisterBooleanPref( |
73 prefs::kPasswordManagerAllowShowPasswords, | 73 prefs::kPasswordManagerAllowShowPasswords, |
74 true, | 74 true, |
75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
76 } | 76 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 return; | 380 return; |
381 } | 381 } |
382 default: | 382 default: |
383 FOR_EACH_OBSERVER( | 383 FOR_EACH_OBSERVER( |
384 LoginModelObserver, | 384 LoginModelObserver, |
385 observers_, | 385 observers_, |
386 OnAutofillDataAvailable(preferred_match.username_value, | 386 OnAutofillDataAvailable(preferred_match.username_value, |
387 preferred_match.password_value)); | 387 preferred_match.password_value)); |
388 } | 388 } |
389 } | 389 } |
OLD | NEW |