| 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_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // Requests that the backend forward to the fronent any protocol events in | 197 // Requests that the backend forward to the fronent any protocol events in |
| 198 // its buffer and begin forwarding automatically from now on. Repeated calls | 198 // its buffer and begin forwarding automatically from now on. Repeated calls |
| 199 // to this function may result in the same events being emitted several | 199 // to this function may result in the same events being emitted several |
| 200 // times. | 200 // times. |
| 201 virtual void RequestBufferedProtocolEventsAndEnableForwarding() = 0; | 201 virtual void RequestBufferedProtocolEventsAndEnableForwarding() = 0; |
| 202 | 202 |
| 203 // Disables protocol event forwarding. | 203 // Disables protocol event forwarding. |
| 204 virtual void DisableProtocolEventForwarding() = 0; | 204 virtual void DisableProtocolEventForwarding() = 0; |
| 205 | 205 |
| 206 // Returns a ListValue representing all nodes for the specified types through | |
| 207 // |callback| on this thread. | |
| 208 virtual void GetAllNodesForTypes( | |
| 209 syncer::ModelTypeSet types, | |
| 210 base::Callback<void(const std::vector<syncer::ModelType>&, | |
| 211 std::vector<std::unique_ptr<base::ListValue>>)> | |
| 212 type) = 0; | |
| 213 | |
| 214 // Enables the sending of directory type debug counters. Also, for every | 206 // Enables the sending of directory type debug counters. Also, for every |
| 215 // time it is called, it makes an explicit request that updates to an update | 207 // time it is called, it makes an explicit request that updates to an update |
| 216 // for all counters be emitted. | 208 // for all counters be emitted. |
| 217 virtual void EnableDirectoryTypeDebugInfoForwarding() = 0; | 209 virtual void EnableDirectoryTypeDebugInfoForwarding() = 0; |
| 218 | 210 |
| 219 // Disables the sending of directory type debug counters. | 211 // Disables the sending of directory type debug counters. |
| 220 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; | 212 virtual void DisableDirectoryTypeDebugInfoForwarding() = 0; |
| 221 | 213 |
| 222 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; | 214 virtual base::MessageLoop* GetSyncLoopForTesting() = 0; |
| 223 | 215 |
| 224 // Triggers sync cycle to update |types|. | 216 // Triggers sync cycle to update |types|. |
| 225 virtual void RefreshTypesForTest(syncer::ModelTypeSet types) = 0; | 217 virtual void RefreshTypesForTest(syncer::ModelTypeSet types) = 0; |
| 226 | 218 |
| 227 // See SyncManager::ClearServerData. | 219 // See SyncManager::ClearServerData. |
| 228 virtual void ClearServerData( | 220 virtual void ClearServerData( |
| 229 const syncer::SyncManager::ClearServerDataCallback& callback) = 0; | 221 const syncer::SyncManager::ClearServerDataCallback& callback) = 0; |
| 230 | 222 |
| 231 // Notify the syncer that the cookie jar has changed. | 223 // Notify the syncer that the cookie jar has changed. |
| 232 // See SyncManager::OnCookieJarChanged. | 224 // See SyncManager::OnCookieJarChanged. |
| 233 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 225 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
| 234 | 226 |
| 235 private: | 227 private: |
| 236 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 228 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 237 }; | 229 }; |
| 238 | 230 |
| 239 } // namespace browser_sync | 231 } // namespace browser_sync |
| 240 | 232 |
| 241 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ | 233 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |