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

Unified Diff: chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm

Issue 199533004: [Mac, Win] Show a user manager tutorial once per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw nits Created 6 years, 9 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
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | chrome/browser/ui/cocoa/browser/user_manager_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
index e719fe083ef699329c4b8976b914cb3c259639bd..69e4eca4697c7f1e812960eb439330a3520b562e 100644
--- a/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
@@ -30,6 +30,7 @@
#include "chrome/browser/ui/chrome_style.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
+#import "chrome/browser/ui/cocoa/user_manager_mac.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -585,20 +586,16 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
- (IBAction)switchToProfile:(id)sender {
// Check the event flags to see if a new window should be created.
- bool always_create = ui::WindowOpenDispositionFromNSEvent(
+ bool alwaysCreate = ui::WindowOpenDispositionFromNSEvent(
[NSApp currentEvent]) == NEW_WINDOW;
- avatarMenu_->SwitchToProfile([sender tag], always_create,
+ avatarMenu_->SwitchToProfile([sender tag], alwaysCreate,
ProfileMetrics::SWITCH_PROFILE_ICON);
}
- (IBAction)showUserManager:(id)sender {
- // Only non-guest users appear in the User Manager.
- base::FilePath profile_path;
- if (!isGuestSession_) {
- size_t active_index = avatarMenu_->GetActiveProfileIndex();
- profile_path = avatarMenu_->GetItemAt(active_index).profile_path;
- }
- chrome::ShowUserManager(profile_path);
+ // Guest users cannot appear in the User Manager, nor display a tutorial.
+ profiles::ShowUserManagerMaybeWithTutorial(
+ isGuestSession_ ? NULL : browser_->profile());
}
- (IBAction)switchToGuestProfile:(id)sender {
@@ -1223,4 +1220,3 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
return label.autorelease();
}
@end
-
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | chrome/browser/ui/cocoa/browser/user_manager_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698