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