Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
index b90c224829c609200234f69ba377c858882eb9f7..a48d9f902db30d1265b410cdabd6da69b1a319d1 100644 |
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
@@ -1179,7 +1179,9 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
} |
} |
currentProfileView = [self createCurrentProfileView:item]; |
- displayLock = switches::IsNewProfileManagement() && item.signed_in; |
+ displayLock = switches::IsNewProfileManagement() && item.signed_in && |
+ browser_->profile()->GetPrefs()->GetBoolean( |
noms (inactive)
2014/09/17 19:12:05
nit: can think this can all fit in one line, if yo
Mike Lerman
2014/09/17 19:45:36
I wish, but I'm one character over.
|
+ prefs::kProfileIsLockable); |
} else { |
[otherProfiles addObject:[self createOtherProfileView:i]]; |
} |
@@ -1722,6 +1724,11 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
IDS_PROFILES_PROFILE_SIGNOUT_BUTTON) |
imageResourceId:IDR_ICON_PROFILES_MENU_LOCK |
action:@selector(lockProfile:)]; |
+ |
+ if (!browser_->profile()->GetPrefs()->GetBoolean( |
+ prefs::kProfileIsLockable)) { |
noms (inactive)
2014/09/17 19:12:05
nit: this should only be indented by 4
Mike Lerman
2014/09/17 19:45:36
Done.
|
+ [lockButton setEnabled:NO]; |
+ } |
[container addSubview:lockButton]; |
viewRect.origin.y = NSMaxY([lockButton frame]); |