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> |
(...skipping 25 matching lines...) Expand all Loading... |
36 const std::vector<scoped_refptr<ModelSafeWorker>>& workers, | 36 const std::vector<scoped_refptr<ModelSafeWorker>>& workers, |
37 const scoped_refptr<ExtensionsActivity>& extensions_activity, | 37 const scoped_refptr<ExtensionsActivity>& extensions_activity, |
38 const WeakHandle<JsEventHandler>& event_handler, | 38 const WeakHandle<JsEventHandler>& event_handler, |
39 const GURL& service_url, | 39 const GURL& service_url, |
40 const std::string& sync_user_agent, | 40 const std::string& sync_user_agent, |
41 std::unique_ptr<HttpPostProviderFactory> http_bridge_factory, | 41 std::unique_ptr<HttpPostProviderFactory> http_bridge_factory, |
42 const SyncCredentials& credentials, | 42 const SyncCredentials& credentials, |
43 const std::string& invalidator_client_id, | 43 const std::string& invalidator_client_id, |
44 std::unique_ptr<SyncManagerFactory> sync_manager_factory, | 44 std::unique_ptr<SyncManagerFactory> sync_manager_factory, |
45 bool delete_sync_data_folder, | 45 bool delete_sync_data_folder, |
| 46 bool enable_local_sync_backend, |
| 47 const base::FilePath& local_sync_backend_folder, |
46 const std::string& restored_key_for_bootstrapping, | 48 const std::string& restored_key_for_bootstrapping, |
47 const std::string& restored_keystore_key_for_bootstrapping, | 49 const std::string& restored_keystore_key_for_bootstrapping, |
48 std::unique_ptr<EngineComponentsFactory> engine_components_factory, | 50 std::unique_ptr<EngineComponentsFactory> engine_components_factory, |
49 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, | 51 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, |
50 const base::Closure& report_unrecoverable_error_function, | 52 const base::Closure& report_unrecoverable_error_function, |
51 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state, | 53 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state, |
52 const std::map<ModelType, int64_t>& invalidation_versions); | 54 const std::map<ModelType, int64_t>& invalidation_versions); |
53 ~DoInitializeOptions(); | 55 ~DoInitializeOptions(); |
54 | 56 |
55 base::MessageLoop* sync_loop; | 57 base::MessageLoop* sync_loop; |
56 SyncBackendRegistrar* registrar; | 58 SyncBackendRegistrar* registrar; |
57 std::vector<scoped_refptr<ModelSafeWorker>> workers; | 59 std::vector<scoped_refptr<ModelSafeWorker>> workers; |
58 scoped_refptr<ExtensionsActivity> extensions_activity; | 60 scoped_refptr<ExtensionsActivity> extensions_activity; |
59 WeakHandle<JsEventHandler> event_handler; | 61 WeakHandle<JsEventHandler> event_handler; |
60 GURL service_url; | 62 GURL service_url; |
61 std::string sync_user_agent; | 63 std::string sync_user_agent; |
62 // Overridden by tests. | 64 // Overridden by tests. |
63 std::unique_ptr<HttpPostProviderFactory> http_bridge_factory; | 65 std::unique_ptr<HttpPostProviderFactory> http_bridge_factory; |
64 SyncCredentials credentials; | 66 SyncCredentials credentials; |
65 const std::string invalidator_client_id; | 67 const std::string invalidator_client_id; |
66 std::unique_ptr<SyncManagerFactory> sync_manager_factory; | 68 std::unique_ptr<SyncManagerFactory> sync_manager_factory; |
67 std::string lsid; | 69 std::string lsid; |
68 bool delete_sync_data_folder; | 70 bool delete_sync_data_folder; |
| 71 bool enable_local_sync_backend; |
| 72 const base::FilePath local_sync_backend_folder; |
69 std::string restored_key_for_bootstrapping; | 73 std::string restored_key_for_bootstrapping; |
70 std::string restored_keystore_key_for_bootstrapping; | 74 std::string restored_keystore_key_for_bootstrapping; |
71 std::unique_ptr<EngineComponentsFactory> engine_components_factory; | 75 std::unique_ptr<EngineComponentsFactory> engine_components_factory; |
72 const WeakHandle<UnrecoverableErrorHandler> unrecoverable_error_handler; | 76 const WeakHandle<UnrecoverableErrorHandler> unrecoverable_error_handler; |
73 base::Closure report_unrecoverable_error_function; | 77 base::Closure report_unrecoverable_error_function; |
74 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state; | 78 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state; |
75 const std::map<ModelType, int64_t> invalidation_versions; | 79 const std::map<ModelType, int64_t> invalidation_versions; |
76 }; | 80 }; |
77 | 81 |
78 // Helper struct to handle currying params to | 82 // Helper struct to handle currying params to |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 std::map<ModelType, int64_t> last_invalidation_versions_; | 319 std::map<ModelType, int64_t> last_invalidation_versions_; |
316 | 320 |
317 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 321 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
318 | 322 |
319 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 323 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
320 }; | 324 }; |
321 | 325 |
322 } // namespace syncer | 326 } // namespace syncer |
323 | 327 |
324 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 328 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
OLD | NEW |