Index: chrome/browser/profiles/profile_window.cc |
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc |
index 320388f389c31804652867d0be3d406c68773c11..e9f7aae3086eb4763e5209a322d4f483530df78c 100644 |
--- a/chrome/browser/profiles/profile_window.cc |
+++ b/chrome/browser/profiles/profile_window.cc |
@@ -270,6 +270,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, |
@@ -280,13 +283,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, |
@@ -295,7 +301,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, |