| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/avatar_button_error_controller_delegate.h" | 8 #include "chrome/browser/ui/avatar_button_error_controller_delegate.h" |
| 9 #include "components/signin/core/browser/signin_error_controller.h" | 9 #include "components/signin/core/browser/signin_error_controller.h" |
| 10 #include "components/sync/driver/sync_error_controller.h" | 10 #include "components/sync/driver/sync_error_controller.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 Profile* profile, | 54 Profile* profile, |
| 55 AvatarButtonErrorController* avatar_button_error_controller); | 55 AvatarButtonErrorController* avatar_button_error_controller); |
| 56 ~SyncErrorObserver() override; | 56 ~SyncErrorObserver() override; |
| 57 | 57 |
| 58 // SyncErrorController::Observer: | 58 // SyncErrorController::Observer: |
| 59 void OnErrorChanged() override; | 59 void OnErrorChanged() override; |
| 60 | 60 |
| 61 bool HasSyncError(); | 61 bool HasSyncError(); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 syncer::SyncErrorController* GetSyncErrorControllerIfNeeded(); | |
| 65 | |
| 66 Profile* profile_; | 64 Profile* profile_; |
| 67 AvatarButtonErrorController* avatar_button_error_controller_; | 65 AvatarButtonErrorController* avatar_button_error_controller_; |
| 68 | 66 |
| 69 DISALLOW_COPY_AND_ASSIGN(SyncErrorObserver); | 67 DISALLOW_COPY_AND_ASSIGN(SyncErrorObserver); |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 void UpdateSigninError(bool has_signin_error); | 70 void UpdateSigninError(bool has_signin_error); |
| 73 void UpdateSyncError(bool has_sync_error); | 71 void UpdateSyncError(bool has_sync_error); |
| 74 | 72 |
| 75 AvatarButtonErrorControllerDelegate* delegate_; | 73 AvatarButtonErrorControllerDelegate* delegate_; |
| 76 | 74 |
| 77 SigninErrorObserver avatar_signin_error_controller_; | 75 SigninErrorObserver avatar_signin_error_controller_; |
| 78 SyncErrorObserver avatar_sync_error_controller_; | 76 SyncErrorObserver avatar_sync_error_controller_; |
| 79 | 77 |
| 80 bool has_signin_error_; | 78 bool has_signin_error_; |
| 81 bool has_sync_error_; | 79 bool has_sync_error_; |
| 82 | 80 |
| 83 DISALLOW_COPY_AND_ASSIGN(AvatarButtonErrorController); | 81 DISALLOW_COPY_AND_ASSIGN(AvatarButtonErrorController); |
| 84 }; | 82 }; |
| 85 | 83 |
| 86 #endif // CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ | 84 #endif // CHROME_BROWSER_UI_AVATAR_BUTTON_ERROR_CONTROLLER_H_ |
| OLD | NEW |