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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

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 | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index d61b4838a944f5e38b2b154a740287fb437f33d8..f94acb1f25fe422fb57f041538c316a9effd676d 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -599,17 +599,13 @@ void ProfileChooserView::Init() {
void ProfileChooserView::OnAvatarMenuChanged(
AvatarMenu* avatar_menu) {
- // Do not refresh the avatar menu if the user is on a signin related view.
- if (view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN ||
- view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT ||
- view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH) {
- return;
+ if (view_mode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER ||
+ view_mode_ == profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT) {
+ // Refresh the view with the new menu. We can't just update the local copy
+ // as this may have been triggered by a sign out action, in which case
+ // the view is being destroyed.
+ ShowView(view_mode_, avatar_menu);
}
-
- // Refresh the view with the new menu. We can't just update the local copy
- // as this may have been triggered by a sign out action, in which case
- // the view is being destroyed.
- ShowView(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu);
}
void ProfileChooserView::OnRefreshTokenAvailable(
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698