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

Unified Diff: chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm

Issue 139343016: [Mac] Fix new avatar button bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm
index ca1f78f4d2b5595ee523d495c02131b47574a427..7eca9578418565ae670de3d93acc16a1dc46fb06 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm
@@ -181,6 +181,12 @@ const CGFloat kAvatarLabelRightSpacing = 2;
// Updates the avatar information from the profile cache.
- (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent {
+ // No updates are needed for an incognito or guest window, as the avatar
+ // is always fixed.
+ Profile* profile = browser_->profile();
+ if (profile->IsOffTheRecord() || profile->IsGuestSession())
+ return;
+
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
size_t index =
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698