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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 546953002: Don't focus a profile by default in the User Manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 888
889 - (IBAction)switchToProfile:(id)sender { 889 - (IBAction)switchToProfile:(id)sender {
890 // Check the event flags to see if a new window should be created. 890 // Check the event flags to see if a new window should be created.
891 bool alwaysCreate = ui::WindowOpenDispositionFromNSEvent( 891 bool alwaysCreate = ui::WindowOpenDispositionFromNSEvent(
892 [NSApp currentEvent]) == NEW_WINDOW; 892 [NSApp currentEvent]) == NEW_WINDOW;
893 avatarMenu_->SwitchToProfile([sender tag], alwaysCreate, 893 avatarMenu_->SwitchToProfile([sender tag], alwaysCreate,
894 ProfileMetrics::SWITCH_PROFILE_ICON); 894 ProfileMetrics::SWITCH_PROFILE_ICON);
895 } 895 }
896 896
897 - (IBAction)showUserManager:(id)sender { 897 - (IBAction)showUserManager:(id)sender {
898 chrome::ShowUserManager(browser_->profile()->GetPath()); 898 chrome::ShowUserManager(base::FilePath());
899 [self postActionPerformed: 899 [self postActionPerformed:
900 ProfileMetrics::PROFILE_DESKTOP_MENU_OPEN_USER_MANAGER]; 900 ProfileMetrics::PROFILE_DESKTOP_MENU_OPEN_USER_MANAGER];
901 } 901 }
902 902
903 - (IBAction)exitGuest:(id)sender { 903 - (IBAction)exitGuest:(id)sender {
904 DCHECK(browser_->profile()->IsGuestSession()); 904 DCHECK(browser_->profile()->IsGuestSession());
905 chrome::ShowUserManager(base::FilePath()); 905 chrome::ShowUserManager(base::FilePath());
906 profiles::CloseGuestProfileWindows(); 906 profiles::CloseGuestProfileWindows();
907 } 907 }
908 908
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 } 2178 }
2179 2179
2180 - (bool)shouldShowGoIncognito { 2180 - (bool)shouldShowGoIncognito {
2181 bool incognitoAvailable = 2181 bool incognitoAvailable =
2182 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2182 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2183 IncognitoModePrefs::DISABLED; 2183 IncognitoModePrefs::DISABLED;
2184 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2184 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2185 } 2185 }
2186 2186
2187 @end 2187 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698