Commit b9ebd386 authored by noms's avatar noms Committed by Commit bot

[Mac] Don't pre-emptively update the profile name in the avatar bubble after an update.

If the user entered name is accepted and saved, then the entire view is refreshed and the
new name is displayed. Automatically committing the name is too eager, since
UpdateProfileName might reject the name in some cases (if it's identical to the original
one), and we might ignore the display rules around single profiles and "You".

BUG=428683
TEST=Start Chrome with --enable-new-avatar-menu. Make sure you only have one, brand new
profile. Open chrome://settings and in the avatar bubble (which should display "You")
enter the same name that the profile has in chrome://settings (like Person 1). The name
displayed in the bubble should stay as "You"

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

Cr-Commit-Position: refs/heads/master@{#302509}
parent 06671bb8
......@@ -726,7 +726,6 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
profiles::UpdateProfileName(profile_, newProfileName);
[controller_
postActionPerformed:ProfileMetrics::PROFILE_DESKTOP_MENU_EDIT_NAME];
[self setTitle:base::SysUTF16ToNSString(newProfileName)];
} else {
// Since the text is empty and not allowed, revert it from the textbox.
[profileNameTextField_ setStringValue:[self title]];
......
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