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

Unified Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

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/views/profiles/user_manager_view.cc
diff --git a/chrome/browser/ui/views/profiles/user_manager_view.cc b/chrome/browser/ui/views/profiles/user_manager_view.cc
index 8f6a80ccd6a377c090e9a8801e9cf60eeee93d11..2e0a2cdae022b64f0ae71330bb0926f9cf382d6c 100644
--- a/chrome/browser/ui/views/profiles/user_manager_view.cc
+++ b/chrome/browser/ui/views/profiles/user_manager_view.cc
@@ -42,12 +42,27 @@ 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) {
- UserManagerView::Show(
- profile_path_to_focus, profiles::USER_MANAGER_NO_TUTORIAL);
+ UserManagerView::Show(profile_path_to_focus,
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
}
void ShowUserManagerWithTutorial(profiles::UserManagerTutorialMode tutorial) {
- UserManagerView::Show(base::FilePath(), tutorial);
+ UserManagerView::Show(base::FilePath(),
+ tutorial,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
+}
+
+void ShowUserManagerThenTaskManager() {
+ UserManagerView::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER);
+}
+
+void ShowUserManagerThenAboutChrome() {
+ UserManagerView::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME);
}
void HideUserManager() {
@@ -68,8 +83,10 @@ UserManagerView::~UserManagerView() {
}
// static
-void UserManagerView::Show(const base::FilePath& profile_path_to_focus,
- profiles::UserManagerTutorialMode tutorial_mode) {
+void UserManagerView::Show(
+ const base::FilePath& profile_path_to_focus,
+ profiles::UserManagerTutorialMode tutorial_mode,
+ profiles::UserManagerProfileSelected profile_open_action) {
ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER);
if (instance_) {
// If there's a user manager window open already, just activate it.
@@ -82,6 +99,7 @@ void UserManagerView::Show(const base::FilePath& profile_path_to_focus,
profiles::CreateGuestProfileForUserManager(
profile_path_to_focus,
tutorial_mode,
+ profile_open_action,
base::Bind(&UserManagerView::OnGuestProfileCreated,
base::Passed(make_scoped_ptr(new UserManagerView)),
profile_path_to_focus));

Powered by Google App Engine
This is Rietveld 408576698