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

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

Issue 530113002: Refresh the avatar bubble with the current view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only refresh if necessary 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | 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 3cecab24012d903501d002ad5f5abeb516fac227..2a919e2e82aaf0b230940c809895953c99116a88 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -311,18 +311,11 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
// AvatarMenuObserver:
virtual void OnAvatarMenuChanged(AvatarMenu* avatar_menu) OVERRIDE {
- // Do not refresh the avatar menu if the user is on a signin related view.
profiles::BubbleViewMode viewMode = [controller_ viewMode];
- if (viewMode == profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN ||
- viewMode == profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT ||
- viewMode == profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH) {
- return;
+ if (viewMode == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER ||
+ viewMode == profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT) {
+ [controller_ initMenuContentsWithView:viewMode];
}
-
- // While the bubble is open, the avatar menu can only change from the
- // profile chooser view by modifying the current profile's photo or name.
- [controller_
- initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER];
}
// content::NotificationObserver:
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698