| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "components/sync/base/model_type.h" | 15 #include "components/sync/base/model_type.h" |
| 16 #include "components/sync/base/weak_handle.h" | 16 #include "components/sync/base/weak_handle.h" |
| 17 #include "components/sync/driver/backend_data_type_configurer.h" | 17 #include "components/sync/driver/backend_data_type_configurer.h" |
| 18 #include "components/sync/engine/configure_reason.h" | 18 #include "components/sync/engine/configure_reason.h" |
| 19 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 19 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
| 20 #include "components/sync/engine/shutdown_reason.h" | 20 #include "components/sync/engine/shutdown_reason.h" |
| 21 #include "components/sync/engine/sync_manager.h" | 21 #include "components/sync/engine/sync_manager.h" |
| 22 #include "components/sync/engine/sync_manager_factory.h" | 22 #include "components/sync/engine/sync_manager_factory.h" |
| 23 | 23 |
| 24 class GURL; | 24 class GURL; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 47 ~SyncBackendHost() override; | 47 ~SyncBackendHost() override; |
| 48 | 48 |
| 49 // Called on the frontend's thread to kick off asynchronous initialization. | 49 // Called on the frontend's thread to kick off asynchronous initialization. |
| 50 // Optionally deletes the "Sync Data" folder during init in order to make | 50 // Optionally deletes the "Sync Data" folder during init in order to make |
| 51 // sure we're starting fresh. | 51 // sure we're starting fresh. |
| 52 // | 52 // |
| 53 // |saved_nigori_state| is optional nigori state to restore from a previous | 53 // |saved_nigori_state| is optional nigori state to restore from a previous |
| 54 // backend instance. May be null. | 54 // backend instance. May be null. |
| 55 virtual void Initialize( | 55 virtual void Initialize( |
| 56 SyncFrontend* frontend, | 56 SyncFrontend* frontend, |
| 57 base::Thread* sync_thread, | 57 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner, |
| 58 const WeakHandle<JsEventHandler>& event_handler, | 58 const WeakHandle<JsEventHandler>& event_handler, |
| 59 const GURL& service_url, | 59 const GURL& service_url, |
| 60 const std::string& sync_user_agent, | 60 const std::string& sync_user_agent, |
| 61 const SyncCredentials& credentials, | 61 const SyncCredentials& credentials, |
| 62 bool delete_sync_data_folder, | 62 bool delete_sync_data_folder, |
| 63 bool enable_local_sync_backend, | 63 bool enable_local_sync_backend, |
| 64 const base::FilePath& local_sync_backend_folder, | 64 const base::FilePath& local_sync_backend_folder, |
| 65 std::unique_ptr<SyncManagerFactory> sync_manager_factory, | 65 std::unique_ptr<SyncManagerFactory> sync_manager_factory, |
| 66 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, | 66 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, |
| 67 const base::Closure& report_unrecoverable_error_function, | 67 const base::Closure& report_unrecoverable_error_function, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // See SyncManager::OnCookieJarChanged. | 198 // See SyncManager::OnCookieJarChanged. |
| 199 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 199 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
| 200 | 200 |
| 201 private: | 201 private: |
| 202 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 202 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 } // namespace syncer | 205 } // namespace syncer |
| 206 | 206 |
| 207 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ | 207 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |