| 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 - (IBAction)showAccountRemovalView:(id)sender { | 1161 - (IBAction)showAccountRemovalView:(id)sender { |
| 1162 DCHECK(!isGuestSession_); | 1162 DCHECK(!isGuestSession_); |
| 1163 | 1163 |
| 1164 // Tag is either |kPrimaryProfileTag| for the primary account, or equal to the | 1164 // Tag is either |kPrimaryProfileTag| for the primary account, or equal to the |
| 1165 // index in |currentProfileAccounts_| for a secondary account. | 1165 // index in |currentProfileAccounts_| for a secondary account. |
| 1166 int tag = [sender tag]; | 1166 int tag = [sender tag]; |
| 1167 if (tag == kPrimaryProfileTag) { | 1167 if (tag == kPrimaryProfileTag) { |
| 1168 accountIdToRemove_ = SigninManagerFactory::GetForProfile( | 1168 accountIdToRemove_ = SigninManagerFactory::GetForProfile( |
| 1169 browser_->profile())->GetAuthenticatedAccountId(); | 1169 browser_->profile())->GetAuthenticatedAccountId(); |
| 1170 } else { | 1170 } else { |
| 1171 DCHECK(ContainsKey(currentProfileAccounts_, tag)); | 1171 DCHECK(base::ContainsKey(currentProfileAccounts_, tag)); |
| 1172 accountIdToRemove_ = currentProfileAccounts_[tag]; | 1172 accountIdToRemove_ = currentProfileAccounts_[tag]; |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL]; | 1175 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL]; |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 - (IBAction)showSignoutView:(id)sender { | 1178 - (IBAction)showSignoutView:(id)sender { |
| 1179 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); | 1179 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); |
| 1180 } | 1180 } |
| 1181 | 1181 |
| (...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 } | 2889 } |
| 2890 | 2890 |
| 2891 - (bool)shouldShowGoIncognito { | 2891 - (bool)shouldShowGoIncognito { |
| 2892 bool incognitoAvailable = | 2892 bool incognitoAvailable = |
| 2893 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2893 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2894 IncognitoModePrefs::DISABLED; | 2894 IncognitoModePrefs::DISABLED; |
| 2895 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2895 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2896 } | 2896 } |
| 2897 | 2897 |
| 2898 @end | 2898 @end |
| OLD | NEW |