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 ModelType type, | 88 syncer::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<ModelTypeConnector> GetModelTypeConnectorProxy() override; | 96 std::unique_ptr<syncer_v2::ModelTypeConnector> GetModelTypeConnectorProxy() |
| 97 override; |
97 const std::string cache_guid() override; | 98 const std::string cache_guid() override; |
98 bool ReceivedExperiment(Experiments* experiments) override; | 99 bool ReceivedExperiment(Experiments* experiments) override; |
99 bool HasUnsyncedItems() override; | 100 bool HasUnsyncedItems() override; |
100 SyncEncryptionHandler* GetEncryptionHandler() override; | 101 SyncEncryptionHandler* GetEncryptionHandler() override; |
101 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() | 102 std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() |
102 override; | 103 override; |
103 void RegisterDirectoryTypeDebugInfoObserver( | 104 void RegisterDirectoryTypeDebugInfoObserver( |
104 TypeDebugInfoObserver* observer) override; | 105 syncer::TypeDebugInfoObserver* observer) override; |
105 void UnregisterDirectoryTypeDebugInfoObserver( | 106 void UnregisterDirectoryTypeDebugInfoObserver( |
106 TypeDebugInfoObserver* observer) override; | 107 syncer::TypeDebugInfoObserver* observer) override; |
107 bool HasDirectoryTypeDebugInfoObserver( | 108 bool HasDirectoryTypeDebugInfoObserver( |
108 TypeDebugInfoObserver* observer) override; | 109 syncer::TypeDebugInfoObserver* observer) override; |
109 void RequestEmitDebugInfo() override; | 110 void RequestEmitDebugInfo() override; |
110 void ClearServerData(const ClearServerDataCallback& callback) override; | 111 void ClearServerData(const ClearServerDataCallback& callback) override; |
111 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 112 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; |
112 | 113 |
113 // SyncEncryptionHandler::Observer implementation. | 114 // SyncEncryptionHandler::Observer implementation. |
114 void OnPassphraseRequired( | 115 void OnPassphraseRequired( |
115 PassphraseRequiredReason reason, | 116 PassphraseRequiredReason reason, |
116 const sync_pb::EncryptedData& pending_keys) override; | 117 const sync_pb::EncryptedData& pending_keys) override; |
117 void OnPassphraseAccepted() override; | 118 void OnPassphraseAccepted() override; |
118 void OnBootstrapTokenUpdated(const std::string& bootstrap_token, | 119 void OnBootstrapTokenUpdated(const std::string& bootstrap_token, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void RefreshTypes(ModelTypeSet types) override; | 164 void RefreshTypes(ModelTypeSet types) override; |
164 | 165 |
165 // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. | 166 // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. |
166 // Called when IP address of primary interface changes. | 167 // Called when IP address of primary interface changes. |
167 void OnIPAddressChanged() override; | 168 void OnIPAddressChanged() override; |
168 // Called when the connection type of the system has changed. | 169 // Called when the connection type of the system has changed. |
169 void OnConnectionTypeChanged( | 170 void OnConnectionTypeChanged( |
170 net::NetworkChangeNotifier::ConnectionType) override; | 171 net::NetworkChangeNotifier::ConnectionType) override; |
171 | 172 |
172 // NudgeHandler implementation. | 173 // NudgeHandler implementation. |
173 void NudgeForInitialDownload(ModelType type) override; | 174 void NudgeForInitialDownload(syncer::ModelType type) override; |
174 void NudgeForCommit(ModelType type) override; | 175 void NudgeForCommit(syncer::ModelType type) override; |
175 void NudgeForRefresh(ModelType type) override; | 176 void NudgeForRefresh(syncer::ModelType type) override; |
176 | 177 |
177 const SyncScheduler* scheduler() const; | 178 const SyncScheduler* scheduler() const; |
178 | 179 |
179 bool GetHasInvalidAuthTokenForTest() const; | 180 bool GetHasInvalidAuthTokenForTest() const; |
180 | 181 |
181 protected: | 182 protected: |
182 // Helper functions. Virtual for testing. | 183 // Helper functions. Virtual for testing. |
183 virtual void NotifyInitializationSuccess(); | 184 virtual void NotifyInitializationSuccess(); |
184 virtual void NotifyInitializationFailure(); | 185 virtual void NotifyInitializationFailure(); |
185 | 186 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 334 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
334 | 335 |
335 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 336 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
336 | 337 |
337 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 338 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
338 }; | 339 }; |
339 | 340 |
340 } // namespace syncer | 341 } // namespace syncer |
341 | 342 |
342 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 343 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ |
OLD | NEW |