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

Side by Side Diff: components/sync/driver/sync_error_controller.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 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
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"
(...skipping 17 matching lines...) Expand all
28 explicit SyncErrorController(SyncService* service); 28 explicit SyncErrorController(SyncService* service);
29 ~SyncErrorController() override; 29 ~SyncErrorController() override;
30 30
31 // True if there exists an error worth elevating to the user. 31 // True if there exists an error worth elevating to the user.
32 bool HasError(); 32 bool HasError();
33 33
34 void AddObserver(Observer* observer); 34 void AddObserver(Observer* observer);
35 void RemoveObserver(Observer* observer); 35 void RemoveObserver(Observer* observer);
36 36
37 // SyncServiceObserver: 37 // SyncServiceObserver:
38 void OnStateChanged() override; 38 void OnStateChanged(syncer::SyncService* sync) override;
39 39
40 private: 40 private:
41 SyncService* service_; 41 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 } // namespace syncer 47 } // namespace syncer
48 48
49 #endif // COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_ 49 #endif // COMPONENTS_SYNC_DRIVER_SYNC_ERROR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/suggestions/suggestions_service_impl_unittest.cc ('k') | components/sync/driver/sync_error_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698