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

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

Issue 555923002: [Mac] Set the avatar button auth error before initially drawing the button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
index 5f2bae8041eb8424a1f71364c2e4a895a017da64..5be11c9d3361feb10fa51e944f527a6b32bfd450 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
@@ -182,6 +182,10 @@ NSImage* GetImageFromResourceID(int resourceId) {
profiles::GetSigninErrorController(browser->profile());
[button_ setCell:cell.get()];
+
+ if (errorController)
+ [cell setHasError:errorController->HasError() withTitle:[button_ title]];
+
[self setView:button_];
[button_ setBezelStyle:NSShadowlessSquareBezelStyle];
@@ -196,8 +200,6 @@ NSImage* GetImageFromResourceID(int resourceId) {
[button_ setAction:@selector(buttonClicked:)];
[self updateAvatarButtonAndLayoutParent:NO];
- if (errorController)
- [cell setHasError:errorController->HasError() withTitle:[button_ title]];
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center addObserver:self
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698