diff options
author | blundell <blundell@chromium.org> | 2015-10-26 00:35:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-26 07:36:22 +0000 |
commit | 3755a8969a76477ebedd601340234d7335a8856e (patch) | |
tree | a624ec57997de42971b5938d539787fa2daf9609 /ios | |
parent | 9e0d9ad0fac6e614cd655ee823e35ef795338a40 (diff) | |
download | chromium_src-3755a8969a76477ebedd601340234d7335a8856e.zip chromium_src-3755a8969a76477ebedd601340234d7335a8856e.tar.gz chromium_src-3755a8969a76477ebedd601340234d7335a8856e.tar.bz2 |
[ios] Forward new SyncServiceObserver callback to ObjC bridge
A recent CL introduced a new optional observer method in the
SyncServiceObserver interface. This CL forwards that callback in the
iOS-specific Objective-C bridge of that interface.
BUG=512825
Review URL: https://codereview.chromium.org/1420093003
Cr-Commit-Position: refs/heads/master@{#356017}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/chrome/browser/sync/sync_observer_bridge.h | 5 | ||||
-rw-r--r-- | ios/chrome/browser/sync/sync_observer_bridge.mm | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ios/chrome/browser/sync/sync_observer_bridge.h b/ios/chrome/browser/sync/sync_observer_bridge.h index 0ea0ca1..7f78a23 100644 --- a/ios/chrome/browser/sync/sync_observer_bridge.h +++ b/ios/chrome/browser/sync/sync_observer_bridge.h @@ -15,8 +15,10 @@ namespace sync_driver { class SyncService; } -@protocol SyncObserverModelBridge +@protocol SyncObserverModelBridge<NSObject> - (void)onSyncStateChanged; +@optional +- (void)onSyncConfigurationCompleted; @end // C++ class to monitor profile sync status in Objective-C type. @@ -31,6 +33,7 @@ class SyncObserverBridge : public sync_driver::SyncServiceObserver { private: // sync_driver::SyncServiceObserver implementation: void OnStateChanged() override; + void OnSyncConfigurationCompleted() override; base::WeakNSProtocol<id<SyncObserverModelBridge>> delegate_; ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver> diff --git a/ios/chrome/browser/sync/sync_observer_bridge.mm b/ios/chrome/browser/sync/sync_observer_bridge.mm index 0ccb02a..8e6f883 100644 --- a/ios/chrome/browser/sync/sync_observer_bridge.mm +++ b/ios/chrome/browser/sync/sync_observer_bridge.mm @@ -21,3 +21,8 @@ SyncObserverBridge::~SyncObserverBridge() { void SyncObserverBridge::OnStateChanged() { [delegate_ onSyncStateChanged]; } + +void SyncObserverBridge::OnSyncConfigurationCompleted() { + if ([delegate_ respondsToSelector:@selector(onSyncConfigurationCompleted:)]) + [delegate_ onSyncConfigurationCompleted]; +} |