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

Unified Diff: components/user_manager/known_user.cc

Issue 2959733002: Added UMA stat to track migration of profile_ever_initialized attribute. (Closed)
Patch Set: Updated TODO comment. Created 3 years, 6 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/known_user.cc
diff --git a/components/user_manager/known_user.cc b/components/user_manager/known_user.cc
index 22db652965cebf6f1a4cd8e6e30d1b6a156c4742..5de67a05753841064f993cb35376802dc4b6a0c2 100644
--- a/components/user_manager/known_user.cc
+++ b/components/user_manager/known_user.cc
@@ -10,6 +10,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
#include "base/values.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/scoped_user_pref_update.h"
@@ -456,8 +457,13 @@ bool IsUsingSAML(const AccountId& account_id) {
bool WasProfileEverInitialized(const AccountId& account_id) {
bool profile_ever_initialized;
- if (GetBooleanPref(account_id, kProfileEverInitialized,
- &profile_ever_initialized))
+ const bool pref_set = GetBooleanPref(account_id, kProfileEverInitialized,
+ &profile_ever_initialized);
+ // TODO(atwilson): Remove migration code below once this UMA stat reports
+ // that migration is completed - crbug.com/736760.
+ UMA_HISTOGRAM_BOOLEAN("UserManager.ProfileEverInitializedMigrationCompleted",
+ pref_set);
+ if (pref_set)
return profile_ever_initialized;
// Sessions created before we started setting the session_initialized flag
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698