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

Unified Diff: chrome/browser/profiles/profile_window.cc

Issue 844193005: Add UMA metrics for profile switching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ununsed include file Created 5 years, 11 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 | « chrome/browser/profiles/profile_metrics.cc ('k') | chrome/browser/ui/cocoa/profiles/user_manager_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_window.cc
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc
index 42c1ad768dd5153026d6e6e1ce778f74aa088cbe..9b85dffd5033d81ddf137be9bae70682cdd37f88 100644
--- a/chrome/browser/profiles/profile_window.cc
+++ b/chrome/browser/profiles/profile_window.cc
@@ -274,6 +274,9 @@ void SwitchToProfile(const base::FilePath& path,
bool always_create,
ProfileManager::CreateCallback callback,
ProfileMetrics::ProfileOpen metric) {
+ ProfileMetrics::LogProfileSwitch(metric,
+ g_browser_process->profile_manager(),
+ path);
g_browser_process->profile_manager()->CreateProfileAsync(
path,
base::Bind(&OpenBrowserWindowForProfile,
@@ -284,13 +287,16 @@ void SwitchToProfile(const base::FilePath& path,
base::string16(),
base::string16(),
std::string());
- ProfileMetrics::LogProfileSwitchUser(metric);
}
void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
ProfileManager::CreateCallback callback) {
+ const base::FilePath& path = ProfileManager::GetGuestProfilePath();
+ ProfileMetrics::LogProfileSwitch(ProfileMetrics::SWITCH_PROFILE_GUEST,
+ g_browser_process->profile_manager(),
+ path);
g_browser_process->profile_manager()->CreateProfileAsync(
- ProfileManager::GetGuestProfilePath(),
+ path,
base::Bind(&OpenBrowserWindowForProfile,
callback,
false,
@@ -299,7 +305,6 @@ void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
base::string16(),
base::string16(),
std::string());
- ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST);
}
void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
« no previous file with comments | « chrome/browser/profiles/profile_metrics.cc ('k') | chrome/browser/ui/cocoa/profiles/user_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698