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

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

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. 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 SyncErrorController::SyncErrorController(sync_driver::SyncService* service) 9 namespace syncer {
10
11 SyncErrorController::SyncErrorController(SyncService* service)
10 : service_(service) { 12 : service_(service) {
11 DCHECK(service_); 13 DCHECK(service_);
12 } 14 }
13 15
14 SyncErrorController::~SyncErrorController() {} 16 SyncErrorController::~SyncErrorController() {}
15 17
16 bool SyncErrorController::HasError() { 18 bool SyncErrorController::HasError() {
17 return service_->IsFirstSetupComplete() && service_->IsPassphraseRequired() && 19 return service_->IsFirstSetupComplete() && service_->IsPassphraseRequired() &&
18 service_->IsPassphraseRequiredForDecryption(); 20 service_->IsPassphraseRequiredForDecryption();
19 } 21 }
20 22
21 void SyncErrorController::AddObserver(Observer* observer) { 23 void SyncErrorController::AddObserver(Observer* observer) {
22 observer_list_.AddObserver(observer); 24 observer_list_.AddObserver(observer);
23 } 25 }
24 26
25 void SyncErrorController::RemoveObserver(Observer* observer) { 27 void SyncErrorController::RemoveObserver(Observer* observer) {
26 observer_list_.RemoveObserver(observer); 28 observer_list_.RemoveObserver(observer);
27 } 29 }
28 30
29 void SyncErrorController::OnStateChanged() { 31 void SyncErrorController::OnStateChanged() {
30 FOR_EACH_OBSERVER(Observer, observer_list_, OnErrorChanged()); 32 FOR_EACH_OBSERVER(Observer, observer_list_, OnErrorChanged());
31 } 33 }
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