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

Unified Diff: chrome/browser/ui/ash/multi_user_window_manager.cc

Issue 52713008: Adding UMA statistics for multi profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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/ui/ash/multi_user_window_manager.cc
diff --git a/chrome/browser/ui/ash/multi_user_window_manager.cc b/chrome/browser/ui/ash/multi_user_window_manager.cc
index b54fdb74eea3dcf94e6a568d8f625744da5c4a9f..03419fcdb53318629e86d938d309458318b07c5e 100644
--- a/chrome/browser/ui/ash/multi_user_window_manager.cc
+++ b/chrome/browser/ui/ash/multi_user_window_manager.cc
@@ -7,6 +7,7 @@
#include "apps/shell_window.h"
#include "apps/shell_window_registry.h"
#include "ash/ash_switches.h"
+#include "ash/multi_profile_uma.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
@@ -95,17 +96,22 @@ MultiUserWindowManager* MultiUserWindowManager::GetInstance() {
}
MultiUserWindowManager* MultiUserWindowManager::CreateInstance() {
+ ash::MultiProfileUMA::SessionMode mode =
+ ash::MultiProfileUMA::SESSION_SINGLE_USER_MODE;
if (!g_instance &&
ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() &&
!ash::switches::UseFullMultiProfileMode()) {
g_instance = CreateInstanceInternal(
ash::Shell::GetInstance()->session_state_delegate()->GetUserID(0));
multi_user_mode_ = MULTI_PROFILE_MODE_SEPARATED;
+ mode = ash::MultiProfileUMA::SESSION_SEPARATE_DESKTOP_MODE;
} else if (ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled()) {
multi_user_mode_ = MULTI_PROFILE_MODE_MIXED;
+ mode = ash::MultiProfileUMA::SESSION_SIDE_BY_SIDE_MODE;
} else {
multi_user_mode_ = MULTI_PROFILE_MODE_OFF;
}
+ ash::MultiProfileUMA::RecordSessionMode(mode);
return g_instance;
}
@@ -199,6 +205,9 @@ void MultiUserWindowManager::ShowWindowForUser(aura::Window* window,
if (user_id != owner && ash::wm::GetWindowState(window)->IsMinimized())
return;
+ ash::MultiProfileUMA::RecordTeleportAction(
+ ash::MultiProfileUMA::TELEPORT_WINDOW_RETURN_BY_MINIMIZE);
+
WindowToEntryMap::iterator it = window_to_entry_.find(window);
it->second->set_show_for_user(user_id);
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/browser/ui/ash/session_state_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698