Index: chrome/browser/password_manager/password_manager_setting_migrator_service.cc |
diff --git a/chrome/browser/password_manager/password_manager_setting_migrator_service.cc b/chrome/browser/password_manager/password_manager_setting_migrator_service.cc |
index 301b1367abeaa1edac95534be76ed55cad8e75f5..29f40b3d1de924e9927d2787f07d29cd9bd70a09 100644 |
--- a/chrome/browser/password_manager/password_manager_setting_migrator_service.cc |
+++ b/chrome/browser/password_manager/password_manager_setting_migrator_service.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
+#include "base/metrics/histogram_macros.h" |
#include "chrome/browser/chrome_notification_types.h" |
#include "chrome/browser/prefs/pref_service_syncable_util.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -120,9 +121,13 @@ void PasswordManagerSettingMigratorService::Observe( |
DCHECK_EQ(chrome::NOTIFICATION_PROFILE_ADDED, type); |
SaveCurrentPrefState(profile_->GetPrefs(), &initial_new_pref_value_, |
&initial_legacy_pref_value_); |
+ const int max_init_val = 4; |
engedy
2015/09/28 10:03:48
nit: kMaxInitialValues
In general, avoid abbrevia
melandory
2015/09/29 09:33:41
Done.
|
+ UMA_HISTOGRAM_ENUMERATION( |
+ "PasswordManager.SettingsReconciliation.InitialValues", |
+ (static_cast<int>(initial_new_pref_value_) << 1 | |
+ static_cast<int>(initial_legacy_pref_value_)), |
+ max_init_val); |
if (!password_manager::IsSettingsMigrationActive()) { |
- // TODO(melandory) Add histogram which will log initial values for the both |
- // settings. |
return; |
} |
if (ProfileSyncServiceFactory::HasProfileSyncService(profile_)) |
@@ -230,4 +235,6 @@ void PasswordManagerSettingMigratorService::MigrateAfterModelAssociation( |
UpdatePreferencesValues(prefs, false); |
} |
} |
+ // TODO(melandory) Add histogram which will log combination of initial and |
+ // final values for the both preferences. |
} |