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

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: Fixes 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
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cecbdded0f6a729b6d59e6739379b1815e8b9524..2c0f017946ba7b5da80e7ac9e4c97f26dc5d70b1 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",
+ GetLoggedInUsers().size());
+ }
+
g_browser_process->local_state()->SetString(kLastLoggedInRegularUser,
(active_user_->GetType() == User::USER_TYPE_REGULAR) ? email : "");
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698