| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |