diff options
author | mlerman <mlerman@chromium.org> | 2014-09-24 12:31:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-24 19:31:36 +0000 |
commit | e29d00321d1b5ef5d46097d94f3a4a8be7029ec2 (patch) | |
tree | 829a0f760f17490f374d6470fa78fea5f2ec4f84 /chrome/browser/app_controller_mac.mm | |
parent | efcbfea7efbf5488fa6b602b5960e4d9c59a5361 (diff) | |
download | chromium_src-e29d00321d1b5ef5d46097d94f3a4a8be7029ec2.zip chromium_src-e29d00321d1b5ef5d46097d94f3a4a8be7029ec2.tar.gz chromium_src-e29d00321d1b5ef5d46097d94f3a4a8be7029ec2.tar.bz2 |
Access to Chrome via the System Tray should go through the User Manager.
If the most recent profile is locked and the user uses the Windows
system tray to access the Task Manager or About Chrome, the user will
now first be presented with the User Manager, and only after selecting
or unlocking a profile will they be brought automatically to their
original destination.
BUG=409030
TEST=Enable --new-profile-management. Have at least one background app
running under your profile (e.g. Hangouts). Close Chrome. In the
system tray, Chrome ->Task Manager or About Chrome. Only after unlocking
your profile or opening a new profile, you'll see the original selection.
Review URL: https://codereview.chromium.org/564453003
Cr-Commit-Position: refs/heads/master@{#296489}
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 5f4b192..6d384b3 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -69,6 +69,7 @@ #include "chrome/browser/ui/host_desktop.h" #include "chrome/browser/ui/startup/startup_browser_creator.h" #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" +#include "chrome/browser/ui/user_manager.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/cloud_print/cloud_print_class_mac.h" @@ -1006,7 +1007,9 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { // for a locked profile, we have to show the User Manager instead as the // locked profile needs authentication. if (IsProfileSignedOut(lastProfile)) { - chrome::ShowUserManager(lastProfile->GetPath()); + UserManager::Show(lastProfile->GetPath(), + profiles::USER_MANAGER_NO_TUTORIAL, + profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); return; } @@ -1207,10 +1210,13 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { // implemented as forced incognito, we can't open a new guest browser either, // so we have to show the User Manager as well. Profile* lastProfile = [self lastProfile]; - if (lastProfile->IsGuestSession() || IsProfileSignedOut(lastProfile)) - chrome::ShowUserManager(lastProfile->GetPath()); - else + if (lastProfile->IsGuestSession() || IsProfileSignedOut(lastProfile)) { + UserManager::Show(lastProfile->GetPath(), + profiles::USER_MANAGER_NO_TUTORIAL, + profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); + } else { CreateBrowser(lastProfile); + } // We've handled the reopen event, so return NO to tell AppKit not // to do anything. |