OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ |
6 #define COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "components/sync_driver/sync_service_observer.h" | 11 #include "components/sync/driver/sync_service_observer.h" |
12 | 12 |
13 namespace sync_driver { | 13 namespace sync_driver { |
14 class SyncService; | 14 class SyncService; |
15 } | 15 } |
16 | 16 |
17 // Keep track of sync errors and expose them to observers in the UI. | 17 // Keep track of sync errors and expose them to observers in the UI. |
18 class SyncErrorController : public sync_driver::SyncServiceObserver { | 18 class SyncErrorController : public sync_driver::SyncServiceObserver { |
19 public: | 19 public: |
20 // The observer class for SyncErrorController lets the controller notify | 20 // The observer class for SyncErrorController lets the controller notify |
21 // observers when an error arises or changes. | 21 // observers when an error arises or changes. |
(...skipping 16 matching lines...) Expand all Loading... |
38 void OnStateChanged() override; | 38 void OnStateChanged() override; |
39 | 39 |
40 private: | 40 private: |
41 sync_driver::SyncService* service_; | 41 sync_driver::SyncService* service_; |
42 base::ObserverList<Observer, true> observer_list_; | 42 base::ObserverList<Observer, true> observer_list_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(SyncErrorController); | 44 DISALLOW_COPY_AND_ASSIGN(SyncErrorController); |
45 }; | 45 }; |
46 | 46 |
47 #endif // COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ | 47 #endif // COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ |
OLD | NEW |