diff options
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]; +} |