OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 bool IsCryptographerReady(const BaseTransaction* trans) const override; | 84 bool IsCryptographerReady(const BaseTransaction* trans) const override; |
85 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) const override; | 85 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) const override; |
86 void FlushDirectory() const override; | 86 void FlushDirectory() const override; |
87 void RequestBufferedProtocolEventsAndEnableForwarding() override; | 87 void RequestBufferedProtocolEventsAndEnableForwarding() override; |
88 void DisableProtocolEventForwarding() override; | 88 void DisableProtocolEventForwarding() override; |
89 void EnableDirectoryTypeDebugInfoForwarding() override; | 89 void EnableDirectoryTypeDebugInfoForwarding() override; |
90 void DisableDirectoryTypeDebugInfoForwarding() override; | 90 void DisableDirectoryTypeDebugInfoForwarding() override; |
91 void RefreshTypesForTest(ModelTypeSet types) override; | 91 void RefreshTypesForTest(ModelTypeSet types) override; |
92 void ClearServerData( | 92 void ClearServerData( |
93 const SyncManager::ClearServerDataCallback& callback) override; | 93 const SyncManager::ClearServerDataCallback& callback) override; |
94 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; | 94 void OnCookieJarChanged(bool account_mismatch, |
| 95 bool empty_jar, |
| 96 const base::Closure& callback) override; |
95 | 97 |
96 // InvalidationHandler implementation. | 98 // InvalidationHandler implementation. |
97 void OnInvalidatorStateChange(InvalidatorState state) override; | 99 void OnInvalidatorStateChange(InvalidatorState state) override; |
98 void OnIncomingInvalidation( | 100 void OnIncomingInvalidation( |
99 const ObjectIdInvalidationMap& invalidation_map) override; | 101 const ObjectIdInvalidationMap& invalidation_map) override; |
100 std::string GetOwnerName() const override; | 102 std::string GetOwnerName() const override; |
101 | 103 |
102 protected: | 104 protected: |
103 // The types and functions below are protected so that test | 105 // The types and functions below are protected so that test |
104 // subclasses can use them. | 106 // subclasses can use them. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Handle a migration request. | 188 // Handle a migration request. |
187 void HandleMigrationRequestedOnFrontendLoop(const ModelTypeSet types); | 189 void HandleMigrationRequestedOnFrontendLoop(const ModelTypeSet types); |
188 | 190 |
189 // Dispatched to from OnConnectionStatusChange to handle updating | 191 // Dispatched to from OnConnectionStatusChange to handle updating |
190 // frontend UI components. | 192 // frontend UI components. |
191 void HandleConnectionStatusChangeOnFrontendLoop(ConnectionStatus status); | 193 void HandleConnectionStatusChangeOnFrontendLoop(ConnectionStatus status); |
192 | 194 |
193 void ClearServerDataDoneOnFrontendLoop( | 195 void ClearServerDataDoneOnFrontendLoop( |
194 const SyncManager::ClearServerDataCallback& frontend_callback); | 196 const SyncManager::ClearServerDataCallback& frontend_callback); |
195 | 197 |
| 198 void OnCookieJarChangedDoneOnFrontendLoop(const base::Closure& callback); |
| 199 |
196 SyncClient* const sync_client_; | 200 SyncClient* const sync_client_; |
197 | 201 |
198 // The task runner where all the sync engine operations happen. | 202 // The task runner where all the sync engine operations happen. |
199 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner_; | 203 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner_; |
200 | 204 |
201 // Name used for debugging (set from profile_->GetDebugName()). | 205 // Name used for debugging (set from profile_->GetDebugName()). |
202 const std::string name_; | 206 const std::string name_; |
203 | 207 |
204 // Our core, which communicates directly to the syncapi. Use refptr instead | 208 // Our core, which communicates directly to the syncapi. Use refptr instead |
205 // of WeakHandle because |core_| is created on UI loop but released on | 209 // of WeakHandle because |core_| is created on UI loop but released on |
(...skipping 22 matching lines...) Expand all Loading... |
228 base::ThreadChecker thread_checker_; | 232 base::ThreadChecker thread_checker_; |
229 | 233 |
230 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 234 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
231 | 235 |
232 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 236 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
233 }; | 237 }; |
234 | 238 |
235 } // namespace syncer | 239 } // namespace syncer |
236 | 240 |
237 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 241 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
OLD | NEW |