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

Unified Diff: chrome/browser/ui/views/profiles/new_avatar_button.h

Issue 2151513002: Revamped signin/sync error surfacing on desktop user menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: chrome/browser/ui/views/profiles/new_avatar_button.h
diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.h b/chrome/browser/ui/views/profiles/new_avatar_button.h
index 0811d6d990a8edcbdd2bdfad2bfb63c5b3cba59e..94830c07508011f65c87d17272c0270df77b8336 100644
--- a/chrome/browser/ui/views/profiles/new_avatar_button.h
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.h
@@ -9,6 +9,7 @@
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/ui/views/profiles/avatar_button_style.h"
#include "components/signin/core/browser/signin_error_controller.h"
+#include "components/sync_driver/sync_error_controller.h"
#include "ui/views/controls/button/label_button.h"
class AvatarButtonDelegate;
@@ -17,7 +18,8 @@ class Profile;
// Avatar button that displays the active profile's name in the caption area.
class NewAvatarButton : public views::LabelButton,
public ProfileAttributesStorage::Observer,
- public SigninErrorController::Observer {
+ public SigninErrorController::Observer,
+ public SyncErrorController::Observer {
public:
NewAvatarButton(AvatarButtonDelegate* delegate,
AvatarButtonStyle button_style,
@@ -43,7 +45,7 @@ class NewAvatarButton : public views::LabelButton,
void OnProfileSupervisedUserIdChanged(
const base::FilePath& profile_path) override;
- // SigninErrorController::Observer:
+ // SigninErrorController::Observer and SyncErrorController::Observer
msw 2016/07/13 22:31:37 This is bad practice... maybe rename one or both f
Jane 2016/07/14 00:18:57 Do you mean changing the function name "OnErrorCha
msw 2016/07/14 02:23:33 Yes, renaming the interfaces' OnErrorChanged was m
Jane 2016/07/14 15:34:37 I discussed with Roger about this, and he suggeste
void OnErrorChanged() override;
// Called when the profile info cache has changed, which means we might
@@ -53,9 +55,9 @@ class NewAvatarButton : public views::LabelButton,
AvatarButtonDelegate* delegate_;
Profile* profile_;
- // Whether the signed in profile has an authentication error. Used to display
- // an error icon next to the button text.
- bool has_auth_error_;
+ // Whether the signed in profile has any authentication error or sync error.
+ // Used to display an error icon next to the button text.
+ bool has_sync_error_;
// The icon displayed instead of the profile name in the local profile case.
// Different assets are used depending on the OS version.

Powered by Google App Engine
This is Rietveld 408576698