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

Unified 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: Hide rather than disable lock for hd users Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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]);

Powered by Google App Engine
This is Rietveld 408576698