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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 25098009: Log UMA metrics for multiprofile actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wording Created 7 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
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 9e20d44897a41a88a65549b9d90602a3c401e7d9..d07e01da34326eea6dada13ba1d2cf381c1bb7ed 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -401,14 +401,20 @@ void UserManagerImpl::UserLoggedIn(const std::string& email,
logged_in_users_.insert(logged_in_users_.begin(), active_user_);
SetLRUUser(active_user_);
- if (!primary_user_)
+ if (!primary_user_) {
primary_user_ = active_user_;
+ if (primary_user_->GetType() == User::USER_TYPE_REGULAR)
+ SendRegularUserLoginMetrics(email);
+ }
UMA_HISTOGRAM_ENUMERATION("UserManager.LoginUserType",
active_user_->GetType(), User::NUM_USER_TYPES);
- if (active_user_->GetType() == User::USER_TYPE_REGULAR)
- SendRegularUserLoginMetrics(email);
+ if (IsMultipleProfilesAllowed()) {
+ UMA_HISTOGRAM_COUNTS_100("MultiProfile.UserCount",
+ GetUsersAdmittedForMultiProfile().size());
oshima 2013/09/28 11:45:19 shouldn't this be in MultiProfileUMA too?
xiyuan 2013/09/28 14:50:26 GetUsersAdmittedForMultiProfile() returns the user
Tim Song 2013/09/30 17:19:39 Very nice catch Xiyuan. I misunderstood what GetUs
+ }
+
g_browser_process->local_state()->SetString(kLastLoggedInRegularUser,
(active_user_->GetType() == User::USER_TYPE_REGULAR) ? email : "");

Powered by Google App Engine
This is Rietveld 408576698