| OLD | NEW |
| 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 #ifndef IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ | 5 #ifndef IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ |
| 6 #define IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ | 6 #define IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/ios/weak_nsobject.h" | 9 #include "base/ios/weak_nsobject.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class SyncObserverBridge : public syncer::SyncServiceObserver { | 25 class SyncObserverBridge : public syncer::SyncServiceObserver { |
| 26 public: | 26 public: |
| 27 // |service| must outlive the SyncObserverBridge. | 27 // |service| must outlive the SyncObserverBridge. |
| 28 SyncObserverBridge(id<SyncObserverModelBridge> delegate, | 28 SyncObserverBridge(id<SyncObserverModelBridge> delegate, |
| 29 syncer::SyncService* service); | 29 syncer::SyncService* service); |
| 30 | 30 |
| 31 ~SyncObserverBridge() override; | 31 ~SyncObserverBridge() override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // syncer::SyncServiceObserver implementation: | 34 // syncer::SyncServiceObserver implementation: |
| 35 void OnStateChanged() override; | 35 void OnStateChanged(syncer::SyncService* sync) override; |
| 36 void OnSyncConfigurationCompleted() override; | 36 void OnSyncConfigurationCompleted(syncer::SyncService* sync) override; |
| 37 | 37 |
| 38 base::WeakNSProtocol<id<SyncObserverModelBridge>> delegate_; | 38 base::WeakNSProtocol<id<SyncObserverModelBridge>> delegate_; |
| 39 ScopedObserver<syncer::SyncService, syncer::SyncServiceObserver> | 39 ScopedObserver<syncer::SyncService, syncer::SyncServiceObserver> |
| 40 scoped_observer_; | 40 scoped_observer_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(SyncObserverBridge); | 42 DISALLOW_COPY_AND_ASSIGN(SyncObserverBridge); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #endif // IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ | 45 #endif // IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ |
| OLD | NEW |