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

Side by Side Diff: components/sync_driver/sync_error_controller.h

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "base/observer_list.h"
11 #include "components/sync_driver/sync_service_observer.h"
12
13 namespace sync_driver {
14 class SyncService;
15 }
16
17 // Keep track of sync errors and expose them to observers in the UI.
18 class SyncErrorController : public sync_driver::SyncServiceObserver {
19 public:
20 // The observer class for SyncErrorController lets the controller notify
21 // observers when an error arises or changes.
22 class Observer {
23 public:
24 virtual ~Observer() {}
25 virtual void OnErrorChanged() = 0;
26 };
27
28 explicit SyncErrorController(sync_driver::SyncService* service);
29 ~SyncErrorController() override;
30
31 // True if there exists an error worth elevating to the user.
32 bool HasError();
33
34 void AddObserver(Observer* observer);
35 void RemoveObserver(Observer* observer);
36
37 // sync_driver::SyncServiceObserver:
38 void OnStateChanged() override;
39
40 private:
41 sync_driver::SyncService* service_;
42 base::ObserverList<Observer, true> observer_list_;
43
44 DISALLOW_COPY_AND_ASSIGN(SyncErrorController);
45 };
46
47 #endif // COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/sync_driver/sync_driver_switches.cc ('k') | components/sync_driver/sync_error_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698