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 "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
6 | 6 |
7 #import <Carbon/Carbon.h> // kVK_Return. | 7 #import <Carbon/Carbon.h> // kVK_Return. |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL]; | 1197 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL]; |
1198 } | 1198 } |
1199 | 1199 |
1200 - (IBAction)showSignoutView:(id)sender { | 1200 - (IBAction)showSignoutView:(id)sender { |
1201 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); | 1201 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); |
1202 } | 1202 } |
1203 | 1203 |
1204 - (IBAction)showSignoutSigninView:(id)sender { | 1204 - (IBAction)showSignoutSigninView:(id)sender { |
1205 if (ProfileSyncServiceFactory::GetForProfile(browser_->profile())) | 1205 if (ProfileSyncServiceFactory::GetForProfile(browser_->profile())) |
1206 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 1206 browser_sync::ProfileSyncService::SyncEvent( |
| 1207 browser_sync::ProfileSyncService::STOP_FROM_OPTIONS); |
1207 SigninManagerFactory::GetForProfile(browser_->profile()) | 1208 SigninManagerFactory::GetForProfile(browser_->profile()) |
1208 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, | 1209 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, |
1209 signin_metrics::SignoutDelete::IGNORE_METRIC); | 1210 signin_metrics::SignoutDelete::IGNORE_METRIC); |
1210 [self showSigninUIForMode:profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN]; | 1211 [self showSigninUIForMode:profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN]; |
1211 } | 1212 } |
1212 | 1213 |
1213 - (IBAction)showAccountReauthenticationView:(id)sender { | 1214 - (IBAction)showAccountReauthenticationView:(id)sender { |
1214 DCHECK(!isGuestSession_); | 1215 DCHECK(!isGuestSession_); |
1215 [self showSigninUIForMode:profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH]; | 1216 [self showSigninUIForMode:profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH]; |
1216 } | 1217 } |
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2935 } | 2936 } |
2936 | 2937 |
2937 - (bool)shouldShowGoIncognito { | 2938 - (bool)shouldShowGoIncognito { |
2938 bool incognitoAvailable = | 2939 bool incognitoAvailable = |
2939 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2940 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
2940 IncognitoModePrefs::DISABLED; | 2941 IncognitoModePrefs::DISABLED; |
2941 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2942 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
2942 } | 2943 } |
2943 | 2944 |
2944 @end | 2945 @end |
OLD | NEW |