Chromium Code Reviews| 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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1172 [self buildWelcomeUpgradeTutorialViewIfNeeded]; | 1172 [self buildWelcomeUpgradeTutorialViewIfNeeded]; |
| 1173 break; | 1173 break; |
| 1174 case profiles::TUTORIAL_MODE_CONFIRM_SIGNIN: | 1174 case profiles::TUTORIAL_MODE_CONFIRM_SIGNIN: |
| 1175 tutorialView = [self buildSigninConfirmationView]; | 1175 tutorialView = [self buildSigninConfirmationView]; |
| 1176 break; | 1176 break; |
| 1177 case profiles::TUTORIAL_MODE_SHOW_ERROR: | 1177 case profiles::TUTORIAL_MODE_SHOW_ERROR: |
| 1178 tutorialView = [self buildSigninErrorView]; | 1178 tutorialView = [self buildSigninErrorView]; |
| 1179 } | 1179 } |
| 1180 } | 1180 } |
| 1181 currentProfileView = [self createCurrentProfileView:item]; | 1181 currentProfileView = [self createCurrentProfileView:item]; |
| 1182 displayLock = switches::IsNewProfileManagement() && item.signed_in; | 1182 displayLock = switches::IsNewProfileManagement() && item.signed_in && |
| 1183 profiles::IsLockAvailable(browser_->profile()); | |
|
msw
2014/09/19 21:47:40
This seems to hide the lock button, but your CL de
Mike Lerman
2014/09/21 00:19:36
CL updated - thanks.
| |
| 1183 } else { | 1184 } else { |
| 1184 [otherProfiles addObject:[self createOtherProfileView:i]]; | 1185 [otherProfiles addObject:[self createOtherProfileView:i]]; |
| 1185 } | 1186 } |
| 1186 } | 1187 } |
| 1187 if (!currentProfileView) // Guest windows don't have an active profile. | 1188 if (!currentProfileView) // Guest windows don't have an active profile. |
| 1188 currentProfileView = [self createGuestProfileView]; | 1189 currentProfileView = [self createGuestProfileView]; |
| 1189 | 1190 |
| 1190 // |yOffset| is the next position at which to draw in |container| | 1191 // |yOffset| is the next position at which to draw in |container| |
| 1191 // coordinates. Add a pixel offset so that the bottom option buttons don't | 1192 // coordinates. Add a pixel offset so that the bottom option buttons don't |
| 1192 // overlap the bubble's rounded corners. | 1193 // overlap the bubble's rounded corners. |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2177 } | 2178 } |
| 2178 | 2179 |
| 2179 - (bool)shouldShowGoIncognito { | 2180 - (bool)shouldShowGoIncognito { |
| 2180 bool incognitoAvailable = | 2181 bool incognitoAvailable = |
| 2181 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2182 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2182 IncognitoModePrefs::DISABLED; | 2183 IncognitoModePrefs::DISABLED; |
| 2183 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2184 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2184 } | 2185 } |
| 2185 | 2186 |
| 2186 @end | 2187 @end |
| OLD | NEW |