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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1064843003: Add an UMA stat to be able to see if the User pods are show on start screen, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 0c8a30ddea89efa8c10f973f9e54cfaf2bcdd71b..5114cdac4bc376640ed7e3e0d34d21f02841782b 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
Ilya Sherman 2015/04/07 21:31:18 nit: Please include histogram_macros instead
#include "base/path_service.h"
#include "base/prefs/pref_member.h"
#include "base/prefs/pref_registry_simple.h"
@@ -1462,6 +1463,9 @@ void UserSessionManager::OnEasyUnlockKeyOpsFinished(
void UserSessionManager::ActiveUserChanged(
const user_manager::User* active_user) {
+ if (!user_manager::UserManager::Get()->IsCurrentUserNew())
+ SendUserPodsMetrics();
+
Profile* profile = ProfileHelper::Get()->GetProfileByUser(active_user);
// If profile has not yet been initialized, delay initialization of IME.
if (!profile)
@@ -1586,4 +1590,27 @@ void UserSessionManager::InjectStubUserContext(
authenticator_ = NULL;
}
+void UserSessionManager::SendUserPodsMetrics() {
+ bool show_users_on_signin;
+ CrosSettings::Get()->GetBoolean(kAccountsPrefShowUserNamesOnSignIn,
+ &show_users_on_signin);
+ bool is_enterprise_managed = g_browser_process->platform_part()
+ ->browser_policy_connector_chromeos()
+ ->IsEnterpriseManaged();
+ UserPodsDisplay display;
+ if (show_users_on_signin) {
+ if (is_enterprise_managed)
+ display = USER_PODS_DISPLAY_ENABLED_MANAGED;
+ else
+ display = USER_PODS_DISPLAY_ENABLED_REGULAR;
+ } else {
+ if (is_enterprise_managed)
+ display = USER_PODS_DISPLAY_DISABLED_MANAGED;
+ else
+ display = USER_PODS_DISPLAY_DISABLED_REGULAR;
+ }
+ UMA_HISTOGRAM_ENUMERATION("UserSessionManager.UserPodsDisplay", display,
+ NUM_USER_PODS_DISPLAY);
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/session/user_session_manager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698