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

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

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ChromeOS test - part deux Created 6 years, 2 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
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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = item.signed_in &&
1183 profiles::IsLockAvailable(browser_->profile());
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698