Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1208)

Unified Diff: chrome/browser/password_manager/password_manager_setting_migrator_service.cc

Issue 1356573002: [Smart Lock, Settings Reconciliation] Histograms for tracking initial pref values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reconcile
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_setting_migrator_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..10797ec18bcdf6fd253d39ba59f01c23ba6d9d3a 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 kMaxInitialValues = 4;
+ UMA_HISTOGRAM_ENUMERATION(
+ "PasswordManager.SettingsReconciliation.InitialValues",
+ (static_cast<int>(initial_new_pref_value_) << 1 |
+ static_cast<int>(initial_legacy_pref_value_)),
+ kMaxInitialValues);
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.
}
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_setting_migrator_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698