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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 296503002: [Mac] New avatar menu: Don't allow supervised users to edit their profile name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aa013c16d706dde2b4e4e23c8b221e97ad446f2d..bcd4f1c7c5ea4b5765cc891ff455b8bbb4e2d25a 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -1179,6 +1179,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
}
// Profile name, centered.
+ bool editingAllowed = !isGuestSession_ && !browser_->profile()->IsManaged();
base::scoped_nsobject<EditableProfileNameButton> profileName(
[[EditableProfileNameButton alloc]
initWithFrame:NSMakeRect(xOffset, yOffset,
@@ -1187,7 +1188,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
profile:browser_->profile()
profileName:base::SysUTF16ToNSString(
profiles::GetAvatarNameForProfile(browser_->profile()))
- editingAllowed:!isGuestSession_]);
+ editingAllowed:editingAllowed]);
[container addSubview:profileName];
yOffset = NSMaxY([profileName frame]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698