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

Side by Side Diff: chrome/browser/sync/glue/bridged_sync_notifier.cc

Issue 9512005: [Sync] Move BridgedSyncNotifier and ChromeSyncNotificationBridge to glue/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/sync/notifier/bridged_sync_notifier.h" 5 #include "chrome/browser/sync/glue/bridged_sync_notifier.h"
6 6
7 #include "chrome/browser/sync/notifier/chrome_sync_notification_bridge.h" 7 #include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
8 8
9 namespace sync_notifier { 9 namespace browser_sync {
10 10
11 BridgedSyncNotifier::BridgedSyncNotifier( 11 BridgedSyncNotifier::BridgedSyncNotifier(
12 ChromeSyncNotificationBridge* bridge, SyncNotifier* delegate) 12 ChromeSyncNotificationBridge* bridge,
13 sync_notifier::SyncNotifier* delegate)
13 : bridge_(bridge), delegate_(delegate) { 14 : bridge_(bridge), delegate_(delegate) {
14 DCHECK(bridge_); 15 DCHECK(bridge_);
15 DCHECK(delegate_.get()); 16 DCHECK(delegate_.get());
16 } 17 }
17 18
18 BridgedSyncNotifier::~BridgedSyncNotifier() { 19 BridgedSyncNotifier::~BridgedSyncNotifier() {
19 } 20 }
20 21
21 void BridgedSyncNotifier::AddObserver(SyncNotifierObserver* observer) { 22 void BridgedSyncNotifier::AddObserver(
23 sync_notifier::SyncNotifierObserver* observer) {
22 delegate_->AddObserver(observer); 24 delegate_->AddObserver(observer);
23 bridge_->AddObserver(observer); 25 bridge_->AddObserver(observer);
24 } 26 }
25 27
26 void BridgedSyncNotifier::RemoveObserver( 28 void BridgedSyncNotifier::RemoveObserver(
27 SyncNotifierObserver* observer) { 29 sync_notifier::SyncNotifierObserver* observer) {
28 bridge_->RemoveObserver(observer); 30 bridge_->RemoveObserver(observer);
29 delegate_->RemoveObserver(observer); 31 delegate_->RemoveObserver(observer);
30 } 32 }
31 33
32 void BridgedSyncNotifier::SetUniqueId(const std::string& unique_id) { 34 void BridgedSyncNotifier::SetUniqueId(const std::string& unique_id) {
33 delegate_->SetUniqueId(unique_id); 35 delegate_->SetUniqueId(unique_id);
34 } 36 }
35 37
36 void BridgedSyncNotifier::SetState(const std::string& state) { 38 void BridgedSyncNotifier::SetState(const std::string& state) {
37 delegate_->SetState(state); 39 delegate_->SetState(state);
38 } 40 }
39 41
40 void BridgedSyncNotifier::UpdateCredentials( 42 void BridgedSyncNotifier::UpdateCredentials(
41 const std::string& email, const std::string& token) { 43 const std::string& email, const std::string& token) {
42 delegate_->UpdateCredentials(email, token); 44 delegate_->UpdateCredentials(email, token);
43 } 45 }
44 46
45 void BridgedSyncNotifier::UpdateEnabledTypes( 47 void BridgedSyncNotifier::UpdateEnabledTypes(
46 syncable::ModelTypeSet enabled_types) { 48 syncable::ModelTypeSet enabled_types) {
47 delegate_->UpdateEnabledTypes(enabled_types); 49 delegate_->UpdateEnabledTypes(enabled_types);
48 } 50 }
49 51
50 void BridgedSyncNotifier::SendNotification( 52 void BridgedSyncNotifier::SendNotification(
51 syncable::ModelTypeSet changed_types) { 53 syncable::ModelTypeSet changed_types) {
52 delegate_->SendNotification(changed_types); 54 delegate_->SendNotification(changed_types);
53 } 55 }
54 56
55 } // namespace sync_notifier 57 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bridged_sync_notifier.h ('k') | chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698