| 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_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 6 #define COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "components/sync/engine_impl/sync_engine_event_listener.h" | 30 #include "components/sync/engine_impl/sync_engine_event_listener.h" |
| 31 #include "components/sync/js/js_backend.h" | 31 #include "components/sync/js/js_backend.h" |
| 32 #include "components/sync/syncable/directory_change_delegate.h" | 32 #include "components/sync/syncable/directory_change_delegate.h" |
| 33 #include "net/base/network_change_notifier.h" | 33 #include "net/base/network_change_notifier.h" |
| 34 | 34 |
| 35 class GURL; | 35 class GURL; |
| 36 | 36 |
| 37 namespace syncer { | 37 namespace syncer { |
| 38 | 38 |
| 39 class ModelTypeRegistry; | 39 class ModelTypeRegistry; |
| 40 class SyncAPIServerConnectionManager; | 40 class LoopbackConnectionManager; |
| 41 class SyncCycleContext; | 41 class SyncCycleContext; |
| 42 class TypeDebugInfoObserver; | 42 class TypeDebugInfoObserver; |
| 43 class WriteNode; | 43 class WriteNode; |
| 44 class WriteTransaction; | 44 class WriteTransaction; |
| 45 | 45 |
| 46 // SyncManager encapsulates syncable::Directory and serves as the parent of all | 46 // SyncManager encapsulates syncable::Directory and serves as the parent of all |
| 47 // other objects in the sync API. If multiple threads interact with the same | 47 // other objects in the sync API. If multiple threads interact with the same |
| 48 // local sync repository (i.e. the same sqlite database), they should share a | 48 // local sync repository (i.e. the same sqlite database), they should share a |
| 49 // single SyncManager instance. The caller should typically create one | 49 // single SyncManager instance. The caller should typically create one |
| 50 // SyncManager for the lifetime of a user session. | 50 // SyncManager for the lifetime of a user session. |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 UserShare share_; | 271 UserShare share_; |
| 272 | 272 |
| 273 // This can be called from any thread, but only between calls to | 273 // This can be called from any thread, but only between calls to |
| 274 // OpenDirectory() and ShutdownOnSyncThread(). | 274 // OpenDirectory() and ShutdownOnSyncThread(). |
| 275 WeakHandle<SyncManager::ChangeObserver> change_observer_; | 275 WeakHandle<SyncManager::ChangeObserver> change_observer_; |
| 276 | 276 |
| 277 base::ObserverList<SyncManager::Observer> observers_; | 277 base::ObserverList<SyncManager::Observer> observers_; |
| 278 | 278 |
| 279 // The ServerConnectionManager used to abstract communication between the | 279 // The ServerConnectionManager used to abstract communication between the |
| 280 // client (the Syncer) and the sync server. | 280 // client (the Syncer) and the sync server. |
| 281 std::unique_ptr<SyncAPIServerConnectionManager> connection_manager_; | 281 std::unique_ptr<LoopbackConnectionManager> connection_manager_; |
| 282 | 282 |
| 283 // Maintains state that affects the way we interact with different sync types. | 283 // Maintains state that affects the way we interact with different sync types. |
| 284 // This state changes when entering or exiting a configuration cycle. | 284 // This state changes when entering or exiting a configuration cycle. |
| 285 std::unique_ptr<ModelTypeRegistry> model_type_registry_; | 285 std::unique_ptr<ModelTypeRegistry> model_type_registry_; |
| 286 | 286 |
| 287 // A container of various bits of information used by the SyncScheduler to | 287 // A container of various bits of information used by the SyncScheduler to |
| 288 // create SyncCycles. Must outlive the SyncScheduler. | 288 // create SyncCycles. Must outlive the SyncScheduler. |
| 289 std::unique_ptr<SyncCycleContext> cycle_context_; | 289 std::unique_ptr<SyncCycleContext> cycle_context_; |
| 290 | 290 |
| 291 // The scheduler that runs the Syncer. Needs to be explicitly | 291 // The scheduler that runs the Syncer. Needs to be explicitly |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 334 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
| 335 | 335 |
| 336 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 336 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
| 337 | 337 |
| 338 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 338 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
| 339 }; | 339 }; |
| 340 | 340 |
| 341 } // namespace syncer | 341 } // namespace syncer |
| 342 | 342 |
| 343 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ | 343 #endif // COMPONENTS_SYNC_CORE_IMPL_SYNC_MANAGER_IMPL_H_ |
| OLD | NEW |