Commit 7eaa86ee authored by treib@chromium.org's avatar treib@chromium.org

New avatar menu: Don't allow supervised users to edit their profile name.

This is the Mac part of https://codereview.chromium.org/294593004

BUG=360559

Review URL: https://codereview.chromium.org/296503002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272497 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b3926aa
......@@ -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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment