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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

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, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #import "chrome/browser/app_controller_mac.h" 9 #import "chrome/browser/app_controller_mac.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 @end 167 @end
168 168
169 169
170 void UserManager::Show( 170 void UserManager::Show(
171 const base::FilePath& profile_path_to_focus, 171 const base::FilePath& profile_path_to_focus,
172 profiles::UserManagerTutorialMode tutorial_mode, 172 profiles::UserManagerTutorialMode tutorial_mode,
173 profiles::UserManagerProfileSelected profile_open_action) { 173 profiles::UserManagerProfileSelected profile_open_action) {
174 DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath()); 174 DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath());
175 175
176 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER); 176 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::OPEN_USER_MANAGER);
177 if (instance_) { 177 if (instance_) {
178 // If there's a user manager window open already, just activate it. 178 // If there's a user manager window open already, just activate it.
179 [instance_->window_controller() show]; 179 [instance_->window_controller() show];
180 return; 180 return;
181 } 181 }
182 182
183 // Create the guest profile, if necessary, and open the User Manager 183 // Create the guest profile, if necessary, and open the User Manager
184 // from the guest profile. 184 // from the guest profile.
185 profiles::CreateSystemProfileForUserManager( 185 profiles::CreateSystemProfileForUserManager(
186 profile_path_to_focus, 186 profile_path_to_focus,
(...skipping 24 matching lines...) Expand all
211 const std::string& url) { 211 const std::string& url) {
212 DCHECK(!instance_); 212 DCHECK(!instance_);
213 instance_ = new UserManagerMac(system_profile); 213 instance_ = new UserManagerMac(system_profile);
214 [instance_->window_controller() showURL:GURL(url)]; 214 [instance_->window_controller() showURL:GURL(url)];
215 } 215 }
216 216
217 void UserManagerMac::WindowWasClosed() { 217 void UserManagerMac::WindowWasClosed() {
218 instance_ = NULL; 218 instance_ = NULL;
219 delete this; 219 delete this;
220 } 220 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698