| 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 <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 17 #include "components/invalidation/public/invalidation.h" | 17 #include "components/invalidation/public/invalidation.h" |
| 18 #include "components/sync/base/cancelation_signal.h" | 18 #include "components/sync/base/cancelation_signal.h" |
| 19 #include "components/sync/core/shutdown_reason.h" | 19 #include "components/sync/core/shutdown_reason.h" |
| 20 #include "components/sync/core/sync_encryption_handler.h" | 20 #include "components/sync/core/sync_encryption_handler.h" |
| 21 #include "components/sync/driver/glue/sync_backend_host_impl.h" | 21 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
| 22 #include "components/sync/driver/system_encryptor.h" | 22 #include "components/sync/driver/system_encryptor.h" |
| 23 #include "components/sync/sessions/type_debug_info_observer.h" | 23 #include "components/sync/engine/cycle/type_debug_info_observer.h" |
| 24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 namespace browser_sync { | 26 namespace browser_sync { |
| 27 | 27 |
| 28 class SyncBackendHostImpl; | 28 class SyncBackendHostImpl; |
| 29 | 29 |
| 30 // Utility struct for holding initialization options. | 30 // Utility struct for holding initialization options. |
| 31 struct DoInitializeOptions { | 31 struct DoInitializeOptions { |
| 32 DoInitializeOptions( | 32 DoInitializeOptions( |
| 33 base::MessageLoop* sync_loop, | 33 base::MessageLoop* sync_loop, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 public syncer::TypeDebugInfoObserver { | 99 public syncer::TypeDebugInfoObserver { |
| 100 public: | 100 public: |
| 101 SyncBackendHostCore(const std::string& name, | 101 SyncBackendHostCore(const std::string& name, |
| 102 const base::FilePath& sync_data_folder_path, | 102 const base::FilePath& sync_data_folder_path, |
| 103 bool has_sync_setup_completed, | 103 bool has_sync_setup_completed, |
| 104 const base::WeakPtr<SyncBackendHostImpl>& backend); | 104 const base::WeakPtr<SyncBackendHostImpl>& backend); |
| 105 | 105 |
| 106 // SyncManager::Observer implementation. The Core just acts like an air | 106 // SyncManager::Observer implementation. The Core just acts like an air |
| 107 // traffic controller here, forwarding incoming messages to appropriate | 107 // traffic controller here, forwarding incoming messages to appropriate |
| 108 // landing threads. | 108 // landing threads. |
| 109 void OnSyncCycleCompleted( | 109 void OnSyncCycleCompleted(const syncer::SyncCycleSnapshot& snapshot) override; |
| 110 const syncer::sessions::SyncSessionSnapshot& snapshot) override; | |
| 111 void OnInitializationComplete( | 110 void OnInitializationComplete( |
| 112 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 111 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 113 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 112 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 114 debug_info_listener, | 113 debug_info_listener, |
| 115 bool success, | 114 bool success, |
| 116 syncer::ModelTypeSet restored_types) override; | 115 syncer::ModelTypeSet restored_types) override; |
| 117 void OnConnectionStatusChange(syncer::ConnectionStatus status) override; | 116 void OnConnectionStatusChange(syncer::ConnectionStatus status) override; |
| 118 void OnActionableError(const syncer::SyncProtocolError& sync_error) override; | 117 void OnActionableError(const syncer::SyncProtocolError& sync_error) override; |
| 119 void OnMigrationRequested(syncer::ModelTypeSet types) override; | 118 void OnMigrationRequested(syncer::ModelTypeSet types) override; |
| 120 void OnProtocolEvent(const syncer::ProtocolEvent& event) override; | 119 void OnProtocolEvent(const syncer::ProtocolEvent& event) override; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 std::map<syncer::ModelType, int64_t> last_invalidation_versions_; | 331 std::map<syncer::ModelType, int64_t> last_invalidation_versions_; |
| 333 | 332 |
| 334 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 333 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
| 335 | 334 |
| 336 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 335 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
| 337 }; | 336 }; |
| 338 | 337 |
| 339 } // namespace browser_sync | 338 } // namespace browser_sync |
| 340 | 339 |
| 341 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 340 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
| OLD | NEW |