Chromium Code Reviews| 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 662d58dd5fd99acf1eb9484636163f2553a7e100..4172e9e2176101674c16ee8147b92da2c4ce4e5c 100644 |
| --- a/chrome/browser/ui/views/profiles/new_avatar_button.h |
| +++ b/chrome/browser/ui/views/profiles/new_avatar_button.h |
| @@ -7,6 +7,7 @@ |
| #include "base/macros.h" |
| #include "chrome/browser/profiles/profile_attributes_storage.h" |
| +#include "chrome/browser/sync/avatar_sync_error.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" |
| @@ -19,34 +20,28 @@ class Profile; |
| class NewAvatarButton : public views::LabelButton, |
| public ProfileAttributesStorage::Observer { |
| public: |
| - class SigninErrorObserver : public SigninErrorController::Observer { |
| + class AvatarSyncErrorObserver : public AvatarSyncError { |
| public: |
| - SigninErrorObserver(NewAvatarButton* parent_button, Profile* profile); |
| - ~SigninErrorObserver() override; |
| - |
| - private: |
| - // SigninErrorController::Observer: |
| + AvatarSyncErrorObserver(Profile* profile, NewAvatarButton* parent_button); |
| void OnErrorChanged() override; |
| + private: |
| NewAvatarButton* parent_button_; |
| - Profile* profile_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(SigninErrorObserver); |
| }; |
| - class SyncErrorObserver : public SyncErrorController::Observer { |
| + class SigninErrorObserver : public SigninErrorController::Observer { |
| public: |
| - SyncErrorObserver(NewAvatarButton* parent_button, Profile* profile); |
| - ~SyncErrorObserver() override; |
| + SigninErrorObserver(NewAvatarButton* parent_button, Profile* profile); |
| + ~SigninErrorObserver() override; |
| private: |
| - // SyncErrorController::Observer: |
| + // SigninErrorController::Observer: |
| void OnErrorChanged() override; |
| NewAvatarButton* parent_button_; |
| Profile* profile_; |
| - DISALLOW_COPY_AND_ASSIGN(SyncErrorObserver); |
| + DISALLOW_COPY_AND_ASSIGN(SigninErrorObserver); |
| }; |
| NewAvatarButton(AvatarButtonDelegate* delegate, |
| @@ -80,14 +75,15 @@ class NewAvatarButton : public views::LabelButton, |
| void Update(); |
| SigninErrorObserver signin_error_observer_; |
| - SyncErrorObserver sync_error_observer_; |
| + AvatarSyncErrorObserver avatar_sync_error_; |
| AvatarButtonDelegate* delegate_; |
| Profile* profile_; |
| // 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_error_; |
| + bool has_signin_error_; |
| + bool has_sync_error_; |
|
Roger Tawa OOO till Jul 10th
2016/07/26 14:34:24
I don't think you need this member anymore. Anywh
Jane
2016/07/26 17:31:17
Done.
|
| // The icon displayed instead of the profile name in the local profile case. |
| // Different assets are used depending on the OS version. |