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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

Issue 564453003: Access to Chrome via the System Tray should go through the User Manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Listen to the window Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 957d95ba57bb6b8b04cab3e077f8fa47836a668c..da49662c30d916976504f6548447b7df59dc6d67 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -27,14 +27,31 @@ namespace chrome {
// Declared in browser_dialogs.h so others don't have to depend on this header.
void ShowUserManager(const base::FilePath& profile_path_to_focus) {
- UserManagerMac::Show(
- profile_path_to_focus, profiles::USER_MANAGER_NO_TUTORIAL);
+ UserManagerMac::Show(profile_path_to_focus,
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
}
void ShowUserManagerWithTutorial(profiles::UserManagerTutorialMode tutorial) {
- UserManagerMac::Show(base::FilePath(), tutorial);
+ UserManagerMac::Show(base::FilePath(),
+ tutorial,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
}
+void ShowUserManagerThenTaskManager() {
+ UserManagerMac::Show(base::FilePath(),
noms (inactive) 2014/09/12 14:44:16 Peter's comment aside. I would combine these two i
Mike Lerman 2014/09/15 13:44:04 I'll wait on Peter's comments before I start refac
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER);
+}
+
+void ShowUserManagerThenAboutChrome() {
+ UserManagerMac::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME);
+}
+
+void ShowUserManagerThenTaskManager
noms (inactive) 2014/09/12 14:44:16 is this a typo?
Mike Lerman 2014/09/15 13:44:04 The best kind!
+
void HideUserManager() {
UserManagerMac::Hide();
}
@@ -175,8 +192,10 @@ UserManagerMac::~UserManagerMac() {
}
// static
-void UserManagerMac::Show(const base::FilePath& profile_path_to_focus,
- profiles::UserManagerTutorialMode tutorial_mode) {
+void UserManagerMac::Show(
+ const base::FilePath& profile_path_to_focus,
+ profiles::UserManagerTutorialMode tutorial_mode,
+ profiles::UserManagerProfileSelected profile_open_action) {
if (instance_) {
// If there's a user manager window open already, just activate it.
[instance_->window_controller_ show];
@@ -188,6 +207,7 @@ void UserManagerMac::Show(const base::FilePath& profile_path_to_focus,
profiles::CreateGuestProfileForUserManager(
profile_path_to_focus,
tutorial_mode,
+ profile_open_action,
base::Bind(&UserManagerMac::OnGuestProfileCreated));
}

Powered by Google App Engine
This is Rietveld 408576698