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

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

Issue 132453004: Add Profile metric counting to new User Manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed minor formatting comments Created 6 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
Index: chrome/browser/profiles/profile_window.cc
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc
index 821239cf55bc1bc18484ebb8893d0731fa445892..08d6b05f5268b0da4aef88b7466bbf6f08e28f9b 100644
--- a/chrome/browser/profiles/profile_window.cc
+++ b/chrome/browser/profiles/profile_window.cc
@@ -123,11 +123,11 @@ void FindOrCreateNewWindowForProfile(
#endif // defined(OS_IOS)
}
-void SwitchToProfile(
- const base::FilePath& path,
- chrome::HostDesktopType desktop_type,
- bool always_create,
- ProfileSwitchingDoneCallback callback) {
+void SwitchToProfile(const base::FilePath& path,
+ chrome::HostDesktopType desktop_type,
+ bool always_create,
+ ProfileSwitchingDoneCallback callback,
+ ProfileMetrics::ProfileOpen metric) {
g_browser_process->profile_manager()->CreateProfileAsync(
path,
base::Bind(&OpenBrowserWindowForProfile,
@@ -138,6 +138,7 @@ void SwitchToProfile(
base::string16(),
base::string16(),
std::string());
+ ProfileMetrics::LogProfileSwitchUser(metric);
}
void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
@@ -152,10 +153,12 @@ void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
base::string16(),
base::string16(),
std::string());
+ ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST);
}
void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
- ProfileSwitchingDoneCallback callback) {
+ ProfileSwitchingDoneCallback callback,
+ ProfileMetrics::ProfileAdd metric) {
ProfileManager::CreateMultiProfileAsync(
base::string16(),
base::string16(),
@@ -165,6 +168,7 @@ void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
true,
desktop_type),
std::string());
+ ProfileMetrics::LogProfileAddNewUser(metric);
}
void CloseGuestProfileWindows() {

Powered by Google App Engine
This is Rietveld 408576698