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

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

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 #include "components/sync/driver/sync_error_controller.h" 5 #include "components/sync/driver/sync_error_controller.h"
6 6
7 #include "components/sync/driver/sync_service.h" 7 #include "components/sync/driver/sync_service.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 void SyncErrorController::AddObserver(Observer* observer) { 23 void SyncErrorController::AddObserver(Observer* observer) {
24 observer_list_.AddObserver(observer); 24 observer_list_.AddObserver(observer);
25 } 25 }
26 26
27 void SyncErrorController::RemoveObserver(Observer* observer) { 27 void SyncErrorController::RemoveObserver(Observer* observer) {
28 observer_list_.RemoveObserver(observer); 28 observer_list_.RemoveObserver(observer);
29 } 29 }
30 30
31 void SyncErrorController::OnStateChanged() { 31 void SyncErrorController::OnStateChanged(syncer::SyncService* sync) {
32 for (auto& observer : observer_list_) 32 for (auto& observer : observer_list_)
33 observer.OnErrorChanged(); 33 observer.OnErrorChanged();
34 } 34 }
35 35
36 } // namespace syncer 36 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/sync_error_controller.h ('k') | components/sync/driver/sync_service_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698