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

Side by Side Diff: ios/chrome/browser/sync/sync_observer_bridge.mm

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/chrome/browser/sync/sync_observer_bridge.h" 5 #include "ios/chrome/browser/sync/sync_observer_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/sync/driver/sync_service.h" 8 #include "components/sync/driver/sync_service.h"
9 9
10 SyncObserverBridge::SyncObserverBridge(id<SyncObserverModelBridge> delegate, 10 SyncObserverBridge::SyncObserverBridge(id<SyncObserverModelBridge> delegate,
11 sync_driver::SyncService* sync_service) 11 syncer::SyncService* sync_service)
12 : delegate_(delegate), scoped_observer_(this) { 12 : delegate_(delegate), scoped_observer_(this) {
13 DCHECK(delegate); 13 DCHECK(delegate);
14 if (sync_service) 14 if (sync_service)
15 scoped_observer_.Add(sync_service); 15 scoped_observer_.Add(sync_service);
16 } 16 }
17 17
18 SyncObserverBridge::~SyncObserverBridge() { 18 SyncObserverBridge::~SyncObserverBridge() {
19 } 19 }
20 20
21 void SyncObserverBridge::OnStateChanged() { 21 void SyncObserverBridge::OnStateChanged() {
22 [delegate_ onSyncStateChanged]; 22 [delegate_ onSyncStateChanged];
23 } 23 }
24 24
25 void SyncObserverBridge::OnSyncConfigurationCompleted() { 25 void SyncObserverBridge::OnSyncConfigurationCompleted() {
26 if ([delegate_ respondsToSelector:@selector(onSyncConfigurationCompleted:)]) 26 if ([delegate_ respondsToSelector:@selector(onSyncConfigurationCompleted:)])
27 [delegate_ onSyncConfigurationCompleted]; 27 [delegate_ onSyncConfigurationCompleted];
28 } 28 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/sync_observer_bridge.h ('k') | ios/chrome/browser/sync/sync_setup_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698