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

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

Issue 631163004: Mac - show user manager before opening browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use different app_controller_mac method. use different TaskMgr call. Created 6 years, 2 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_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/profiles/profile_metrics.h" 10 #include "chrome/browser/profiles/profile_metrics.h"
(...skipping 28 matching lines...) Expand all
39 UserManagerView* instance_ = NULL; 39 UserManagerView* instance_ = NULL;
40 40
41 } // namespace 41 } // namespace
42 42
43 // UserManager ----------------------------------------------------------------- 43 // UserManager -----------------------------------------------------------------
44 44
45 void UserManager::Show( 45 void UserManager::Show(
46 const base::FilePath& profile_path_to_focus, 46 const base::FilePath& profile_path_to_focus,
47 profiles::UserManagerTutorialMode tutorial_mode, 47 profiles::UserManagerTutorialMode tutorial_mode,
48 profiles::UserManagerProfileSelected profile_open_action) { 48 profiles::UserManagerProfileSelected profile_open_action) {
49 DCHECK(profile_path_to_focus != ProfileManager::GetGuestProfilePath());
50
49 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER); 51 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER);
50 if (instance_) { 52 if (instance_) {
51 // If we are showing the User Manager after locking a profile, change the 53 // If we are showing the User Manager after locking a profile, change the
52 // active profile to Guest. 54 // active profile to Guest.
53 profiles::SetActiveProfileToGuestIfLocked(); 55 profiles::SetActiveProfileToGuestIfLocked();
54 56
55 // If there's a user manager window open already, just activate it. 57 // If there's a user manager window open already, just activate it.
56 instance_->GetWidget()->Activate(); 58 instance_->GetWidget()->Activate();
57 return; 59 return;
58 } 60 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Now that the window is closed, we can allow a new one to be opened. 199 // Now that the window is closed, we can allow a new one to be opened.
198 // (WindowClosing comes in asynchronously from the call to Close() and we 200 // (WindowClosing comes in asynchronously from the call to Close() and we
199 // may have already opened a new instance). 201 // may have already opened a new instance).
200 if (instance_ == this) 202 if (instance_ == this)
201 instance_ = NULL; 203 instance_ = NULL;
202 } 204 }
203 205
204 bool UserManagerView::UseNewStyleForThisDialog() const { 206 bool UserManagerView::UseNewStyleForThisDialog() const {
205 return false; 207 return false;
206 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698