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

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

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/sync/driver/sync_error_controller.h ('k') | components/sync/driver/sync_frontend.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SyncErrorController::SyncErrorController(sync_driver::SyncService* service)
10
11 SyncErrorController::SyncErrorController(SyncService* service)
12 : service_(service) { 10 : service_(service) {
13 DCHECK(service_); 11 DCHECK(service_);
14 } 12 }
15 13
16 SyncErrorController::~SyncErrorController() {} 14 SyncErrorController::~SyncErrorController() {}
17 15
18 bool SyncErrorController::HasError() { 16 bool SyncErrorController::HasError() {
19 return service_->IsFirstSetupComplete() && service_->IsPassphraseRequired() && 17 return service_->IsFirstSetupComplete() && service_->IsPassphraseRequired() &&
20 service_->IsPassphraseRequiredForDecryption(); 18 service_->IsPassphraseRequiredForDecryption();
21 } 19 }
22 20
23 void SyncErrorController::AddObserver(Observer* observer) { 21 void SyncErrorController::AddObserver(Observer* observer) {
24 observer_list_.AddObserver(observer); 22 observer_list_.AddObserver(observer);
25 } 23 }
26 24
27 void SyncErrorController::RemoveObserver(Observer* observer) { 25 void SyncErrorController::RemoveObserver(Observer* observer) {
28 observer_list_.RemoveObserver(observer); 26 observer_list_.RemoveObserver(observer);
29 } 27 }
30 28
31 void SyncErrorController::OnStateChanged() { 29 void SyncErrorController::OnStateChanged() {
32 FOR_EACH_OBSERVER(Observer, observer_list_, OnErrorChanged()); 30 FOR_EACH_OBSERVER(Observer, observer_list_, OnErrorChanged());
33 } 31 }
34
35 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/sync_error_controller.h ('k') | components/sync/driver/sync_frontend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698