Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_H_ | |
| 6 #define CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_H_ | |
| 7 | |
| 8 #include "components/sync_driver/sync_error_controller.h" | |
| 9 | |
| 10 class Profile; | |
| 11 | |
| 12 // Keep track of sync errors that are worth elevating to the user and expose | |
| 13 // them to observers in the avatar button UI. | |
| 14 class AvatarSyncError : public SyncErrorController::Observer { | |
|
Roger Tawa OOO till Jul 10th
2016/07/26 14:34:24
Rename to AvatarSyncErrorController might be bette
Jane
2016/07/26 17:31:17
Done.
| |
| 15 public: | |
| 16 explicit AvatarSyncError(Profile* profile); | |
| 17 ~AvatarSyncError() override; | |
| 18 | |
| 19 // SyncErrorController::Observer: | |
| 20 void OnErrorChanged() override; | |
| 21 | |
| 22 bool HasSyncError() { return has_sync_error_; } | |
|
Roger Tawa OOO till Jul 10th
2016/07/26 14:34:24
According to style guide this method should be nam
Jane
2016/07/26 17:31:17
Done.
| |
| 23 | |
| 24 private: | |
| 25 SyncErrorController* GetSyncErrorControllerIfNeeded(Profile* profile); | |
| 26 | |
| 27 Profile* profile_; | |
| 28 bool has_sync_error_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(AvatarSyncError); | |
| 31 }; | |
| 32 | |
| 33 #endif // CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_H_ | |
| OLD | NEW |