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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

Issue 844193005: Add UMA metrics for profile switching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use existing histogram and fix issues raised by mlerman@ 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 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/views/profiles/user_manager_view.h" 5 #include "chrome/browser/ui/views/profiles/user_manager_view.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/lifetime/application_lifetime.h" 8 #include "chrome/browser/lifetime/application_lifetime.h"
9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 9 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } // namespace 43 } // namespace
44 44
45 // UserManager ----------------------------------------------------------------- 45 // UserManager -----------------------------------------------------------------
46 46
47 void UserManager::Show( 47 void UserManager::Show(
48 const base::FilePath& profile_path_to_focus, 48 const base::FilePath& profile_path_to_focus,
49 profiles::UserManagerTutorialMode tutorial_mode, 49 profiles::UserManagerTutorialMode tutorial_mode,
50 profiles::UserManagerProfileSelected profile_open_action) { 50 profiles::UserManagerProfileSelected profile_open_action) {
51 DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath()); 51 DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath());
52 52
53 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER); 53 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::OPEN_USER_MANAGER);
54 if (instance_) { 54 if (instance_) {
55 // If we are showing the User Manager after locking a profile, change the 55 // If we are showing the User Manager after locking a profile, change the
56 // active profile to Guest. 56 // active profile to Guest.
57 profiles::SetActiveProfileToGuestIfLocked(); 57 profiles::SetActiveProfileToGuestIfLocked();
58 58
59 // If there's a user manager window open already, just activate it. 59 // If there's a user manager window open already, just activate it.
60 instance_->GetWidget()->Activate(); 60 instance_->GetWidget()->Activate();
61 return; 61 return;
62 } 62 }
63 63
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Now that the window is closed, we can allow a new one to be opened. 201 // Now that the window is closed, we can allow a new one to be opened.
202 // (WindowClosing comes in asynchronously from the call to Close() and we 202 // (WindowClosing comes in asynchronously from the call to Close() and we
203 // may have already opened a new instance). 203 // may have already opened a new instance).
204 if (instance_ == this) 204 if (instance_ == this)
205 instance_ = NULL; 205 instance_ = NULL;
206 } 206 }
207 207
208 bool UserManagerView::UseNewStyleForThisDialog() const { 208 bool UserManagerView::UseNewStyleForThisDialog() const {
209 return false; 209 return false;
210 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698