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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_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: Rebase continued 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/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index c9ae80cf3ea5c3e34b252a61faf49c5503d1f592..de9adf615ca2e0c0042feaa720a4c07cd3e0f5de 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/singleton_tabs.h"
+#include "chrome/browser/ui/user_manager.h"
#include "chrome/browser/ui/views/profiles/user_manager_view.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
@@ -721,10 +722,13 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
if (sender == users_button_) {
// If this is a guest session, close all the guest browser windows.
- if (browser_->profile()->IsGuestSession())
+ if (browser_->profile()->IsGuestSession()) {
profiles::CloseGuestProfileWindows();
- else
- chrome::ShowUserManager(base::FilePath());
+ } else {
+ UserManager::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
+ }
PostActionPerformed(ProfileMetrics::PROFILE_DESKTOP_MENU_OPEN_USER_MANAGER);
} else if (sender == go_incognito_button_) {
DCHECK(ShouldShowGoIncognito());
@@ -747,8 +751,9 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
} else if (sender == tutorial_see_whats_new_button_) {
ProfileMetrics::LogProfileNewAvatarMenuUpgrade(
ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_WHATS_NEW);
- chrome::ShowUserManagerWithTutorial(
- profiles::USER_MANAGER_TUTORIAL_OVERVIEW);
+ UserManager::Show(base::FilePath(),
+ profiles::USER_MANAGER_TUTORIAL_OVERVIEW,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
} else if (sender == remove_account_button_) {
RemoveAccount();
} else if (sender == account_removal_cancel_button_) {
@@ -772,7 +777,9 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
} else if (sender == add_person_button_) {
ProfileMetrics::LogProfileNewAvatarMenuNotYou(
ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_ADD_PERSON);
- chrome::ShowUserManager(base::FilePath());
+ UserManager::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
} else if (sender == disconnect_button_) {
ProfileMetrics::LogProfileNewAvatarMenuNotYou(
ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT);

Powered by Google App Engine
This is Rietveld 408576698