| 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 COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 78   void ConfigureSyncer(ConfigureReason reason, | 78   void ConfigureSyncer(ConfigureReason reason, | 
| 79                        ModelTypeSet to_download, | 79                        ModelTypeSet to_download, | 
| 80                        ModelTypeSet to_purge, | 80                        ModelTypeSet to_purge, | 
| 81                        ModelTypeSet to_journal, | 81                        ModelTypeSet to_journal, | 
| 82                        ModelTypeSet to_unapply, | 82                        ModelTypeSet to_unapply, | 
| 83                        const ModelSafeRoutingInfo& new_routing_info, | 83                        const ModelSafeRoutingInfo& new_routing_info, | 
| 84                        const base::Closure& ready_task, | 84                        const base::Closure& ready_task, | 
| 85                        const base::Closure& retry_task) override; | 85                        const base::Closure& retry_task) override; | 
| 86   void SetInvalidatorEnabled(bool invalidator_enabled) override; | 86   void SetInvalidatorEnabled(bool invalidator_enabled) override; | 
| 87   void OnIncomingInvalidation( | 87   void OnIncomingInvalidation( | 
| 88       syncer::ModelType type, | 88       ModelType type, | 
| 89       std::unique_ptr<InvalidationInterface> invalidation) override; | 89       std::unique_ptr<InvalidationInterface> invalidation) override; | 
| 90   void AddObserver(SyncManager::Observer* observer) override; | 90   void AddObserver(SyncManager::Observer* observer) override; | 
| 91   void RemoveObserver(SyncManager::Observer* observer) override; | 91   void RemoveObserver(SyncManager::Observer* observer) override; | 
| 92   SyncStatus GetDetailedStatus() const override; | 92   SyncStatus GetDetailedStatus() const override; | 
| 93   void SaveChanges() override; | 93   void SaveChanges() override; | 
| 94   void ShutdownOnSyncThread(ShutdownReason reason) override; | 94   void ShutdownOnSyncThread(ShutdownReason reason) override; | 
| 95   UserShare* GetUserShare() override; | 95   UserShare* GetUserShare() override; | 
| 96   std::unique_ptr<syncer_v2::ModelTypeConnector> GetModelTypeConnectorProxy() | 96   std::unique_ptr<ModelTypeConnector> GetModelTypeConnectorProxy() override; | 
| 97       override; |  | 
| 98   const std::string cache_guid() override; | 97   const std::string cache_guid() override; | 
| 99   bool ReceivedExperiment(Experiments* experiments) override; | 98   bool ReceivedExperiment(Experiments* experiments) override; | 
| 100   bool HasUnsyncedItems() override; | 99   bool HasUnsyncedItems() override; | 
| 101   SyncEncryptionHandler* GetEncryptionHandler() override; | 100   SyncEncryptionHandler* GetEncryptionHandler() override; | 
| 102   std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() | 101   std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() | 
| 103       override; | 102       override; | 
| 104   void RegisterDirectoryTypeDebugInfoObserver( | 103   void RegisterDirectoryTypeDebugInfoObserver( | 
| 105       syncer::TypeDebugInfoObserver* observer) override; | 104       TypeDebugInfoObserver* observer) override; | 
| 106   void UnregisterDirectoryTypeDebugInfoObserver( | 105   void UnregisterDirectoryTypeDebugInfoObserver( | 
| 107       syncer::TypeDebugInfoObserver* observer) override; | 106       TypeDebugInfoObserver* observer) override; | 
| 108   bool HasDirectoryTypeDebugInfoObserver( | 107   bool HasDirectoryTypeDebugInfoObserver( | 
| 109       syncer::TypeDebugInfoObserver* observer) override; | 108       TypeDebugInfoObserver* observer) override; | 
| 110   void RequestEmitDebugInfo() override; | 109   void RequestEmitDebugInfo() override; | 
| 111   void ClearServerData(const ClearServerDataCallback& callback) override; | 110   void ClearServerData(const ClearServerDataCallback& callback) override; | 
| 112   void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 111   void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 
| 113 | 112 | 
| 114   // SyncEncryptionHandler::Observer implementation. | 113   // SyncEncryptionHandler::Observer implementation. | 
| 115   void OnPassphraseRequired( | 114   void OnPassphraseRequired( | 
| 116       PassphraseRequiredReason reason, | 115       PassphraseRequiredReason reason, | 
| 117       const sync_pb::EncryptedData& pending_keys) override; | 116       const sync_pb::EncryptedData& pending_keys) override; | 
| 118   void OnPassphraseAccepted() override; | 117   void OnPassphraseAccepted() override; | 
| 119   void OnBootstrapTokenUpdated(const std::string& bootstrap_token, | 118   void OnBootstrapTokenUpdated(const std::string& bootstrap_token, | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 164   void RefreshTypes(ModelTypeSet types) override; | 163   void RefreshTypes(ModelTypeSet types) override; | 
| 165 | 164 | 
| 166   // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. | 165   // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. | 
| 167   // Called when IP address of primary interface changes. | 166   // Called when IP address of primary interface changes. | 
| 168   void OnIPAddressChanged() override; | 167   void OnIPAddressChanged() override; | 
| 169   // Called when the connection type of the system has changed. | 168   // Called when the connection type of the system has changed. | 
| 170   void OnConnectionTypeChanged( | 169   void OnConnectionTypeChanged( | 
| 171       net::NetworkChangeNotifier::ConnectionType) override; | 170       net::NetworkChangeNotifier::ConnectionType) override; | 
| 172 | 171 | 
| 173   // NudgeHandler implementation. | 172   // NudgeHandler implementation. | 
| 174   void NudgeForInitialDownload(syncer::ModelType type) override; | 173   void NudgeForInitialDownload(ModelType type) override; | 
| 175   void NudgeForCommit(syncer::ModelType type) override; | 174   void NudgeForCommit(ModelType type) override; | 
| 176   void NudgeForRefresh(syncer::ModelType type) override; | 175   void NudgeForRefresh(ModelType type) override; | 
| 177 | 176 | 
| 178   const SyncScheduler* scheduler() const; | 177   const SyncScheduler* scheduler() const; | 
| 179 | 178 | 
| 180   bool GetHasInvalidAuthTokenForTest() const; | 179   bool GetHasInvalidAuthTokenForTest() const; | 
| 181 | 180 | 
| 182  protected: | 181  protected: | 
| 183   // Helper functions.  Virtual for testing. | 182   // Helper functions.  Virtual for testing. | 
| 184   virtual void NotifyInitializationSuccess(); | 183   virtual void NotifyInitializationSuccess(); | 
| 185   virtual void NotifyInitializationFailure(); | 184   virtual void NotifyInitializationFailure(); | 
| 186 | 185 | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 334   std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 333   std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 
| 335 | 334 | 
| 336   base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 335   base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 
| 337 | 336 | 
| 338   DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 337   DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 
| 339 }; | 338 }; | 
| 340 | 339 | 
| 341 }  // namespace syncer | 340 }  // namespace syncer | 
| 342 | 341 | 
| 343 #endif  // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 342 #endif  // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 
| OLD | NEW | 
|---|