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

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

Issue 180243025: Changing the UsersPerSession UMA metric to only count possible multi profile sessions and do this u… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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/multi_profile_uma.cc ('k') | chrome/browser/lifetime/application_lifetime.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 3046dd1261c1d967845350b5fa013b557dca3fe1..5340caea8cbe0951c045abffbd581c55297ace6c 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -7,6 +7,7 @@
#include <cstddef>
#include <set>
+#include "ash/multi_profile_uma.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -2039,6 +2040,13 @@ void UserManagerImpl::DoUpdateAccountLocale(
}
void UserManagerImpl::UpdateNumberOfUsers() {
+ int users = GetLoggedInUsers().size();
Dmitry Polukhin 2014/03/07 04:39:10 Nit, I would make it size_t for consistency.
+ if (users) {
+ // Write the user number as UMA stat when a multi user session is possible.
+ if ((users + GetUsersAdmittedForMultiProfile().size()) > 1)
+ ash::MultiProfileUMA::RecordUserCount(users);
+ }
+
base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers,
base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
}
« no previous file with comments | « ash/multi_profile_uma.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698