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_CORE_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
| 15 #include "base/callback_forward.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
18 #include "base/threading/thread_checker.h" | 19 #include "base/threading/thread_checker.h" |
19 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
20 #include "base/trace_event/memory_dump_provider.h" | 21 #include "base/trace_event/memory_dump_provider.h" |
21 #include "components/invalidation/public/invalidation.h" | 22 #include "components/invalidation/public/invalidation.h" |
22 #include "components/sync/base/cancelation_signal.h" | 23 #include "components/sync/base/cancelation_signal.h" |
23 #include "components/sync/base/system_encryptor.h" | 24 #include "components/sync/base/system_encryptor.h" |
24 #include "components/sync/driver/glue/sync_backend_host_impl.h" | 25 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 void EnableDirectoryTypeDebugInfoForwarding(); | 155 void EnableDirectoryTypeDebugInfoForwarding(); |
155 | 156 |
156 // Disables forwarding of directory type debug counters. | 157 // Disables forwarding of directory type debug counters. |
157 void DisableDirectoryTypeDebugInfoForwarding(); | 158 void DisableDirectoryTypeDebugInfoForwarding(); |
158 | 159 |
159 // Tell the sync manager to persist its state by writing to disk. | 160 // Tell the sync manager to persist its state by writing to disk. |
160 // Called on the sync thread, both by a timer and, on Android, when the | 161 // Called on the sync thread, both by a timer and, on Android, when the |
161 // application is backgrounded. | 162 // application is backgrounded. |
162 void SaveChanges(); | 163 void SaveChanges(); |
163 | 164 |
164 void DoClearServerData( | 165 void DoClearServerData(const base::Closure& frontend_callback); |
165 const SyncManager::ClearServerDataCallback& frontend_callback); | |
166 | 166 |
167 // Notify the syncer that the cookie jar has changed. | 167 // Notify the syncer that the cookie jar has changed. |
168 void DoOnCookieJarChanged(bool account_mismatch, | 168 void DoOnCookieJarChanged(bool account_mismatch, |
169 bool empty_jar, | 169 bool empty_jar, |
170 const base::Closure& callback); | 170 const base::Closure& callback); |
171 | 171 |
172 private: | 172 private: |
173 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; | 173 friend class base::RefCountedThreadSafe<SyncBackendHostCore>; |
174 | 174 |
175 ~SyncBackendHostCore() override; | 175 ~SyncBackendHostCore() override; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 base::ThreadChecker thread_checker_; | 234 base::ThreadChecker thread_checker_; |
235 | 235 |
236 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 236 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
237 | 237 |
238 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 238 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
239 }; | 239 }; |
240 | 240 |
241 } // namespace syncer | 241 } // namespace syncer |
242 | 242 |
243 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 243 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
OLD | NEW |