| 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_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "components/sync/syncable/change_reorder_buffer.h" | 31 #include "components/sync/syncable/change_reorder_buffer.h" |
| 32 #include "components/sync/syncable/directory_change_delegate.h" | 32 #include "components/sync/syncable/directory_change_delegate.h" |
| 33 #include "components/sync/syncable/user_share.h" | 33 #include "components/sync/syncable/user_share.h" |
| 34 #include "net/base/network_change_notifier.h" | 34 #include "net/base/network_change_notifier.h" |
| 35 | 35 |
| 36 class GURL; | 36 class GURL; |
| 37 | 37 |
| 38 namespace syncer { | 38 namespace syncer { |
| 39 | 39 |
| 40 class ModelTypeRegistry; | 40 class ModelTypeRegistry; |
| 41 class SyncServerConnectionManager; |
| 41 class SyncCycleContext; | 42 class SyncCycleContext; |
| 42 class TypeDebugInfoObserver; | 43 class TypeDebugInfoObserver; |
| 43 class WriteNode; | 44 class WriteNode; |
| 44 class WriteTransaction; | 45 class WriteTransaction; |
| 45 | 46 |
| 46 // SyncManager encapsulates syncable::Directory and serves as the parent of all | 47 // 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 | 48 // 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 | 49 // local sync repository (i.e. the same sqlite database), they should share a |
| 49 // single SyncManager instance. The caller should typically create one | 50 // single SyncManager instance. The caller should typically create one |
| 50 // SyncManager for the lifetime of a user session. | 51 // SyncManager for the lifetime of a user session. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 UserShare share_; | 271 UserShare share_; |
| 271 | 272 |
| 272 // 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 |
| 273 // OpenDirectory() and ShutdownOnSyncThread(). | 274 // OpenDirectory() and ShutdownOnSyncThread(). |
| 274 WeakHandle<SyncManager::ChangeObserver> change_observer_; | 275 WeakHandle<SyncManager::ChangeObserver> change_observer_; |
| 275 | 276 |
| 276 base::ObserverList<SyncManager::Observer> observers_; | 277 base::ObserverList<SyncManager::Observer> observers_; |
| 277 | 278 |
| 278 // The ServerConnectionManager used to abstract communication between the | 279 // The ServerConnectionManager used to abstract communication between the |
| 279 // client (the Syncer) and the sync server. | 280 // client (the Syncer) and the sync server. |
| 280 std::unique_ptr<ServerConnectionManager> connection_manager_; | 281 std::unique_ptr<SyncServerConnectionManager> connection_manager_; |
| 281 | 282 |
| 282 // 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. |
| 283 // This state changes when entering or exiting a configuration cycle. | 284 // This state changes when entering or exiting a configuration cycle. |
| 284 std::unique_ptr<ModelTypeRegistry> model_type_registry_; | 285 std::unique_ptr<ModelTypeRegistry> model_type_registry_; |
| 285 | 286 |
| 286 // 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 |
| 287 // create SyncCycles. Must outlive the SyncScheduler. | 288 // create SyncCycles. Must outlive the SyncScheduler. |
| 288 std::unique_ptr<SyncCycleContext> cycle_context_; | 289 std::unique_ptr<SyncCycleContext> cycle_context_; |
| 289 | 290 |
| 290 // 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... |
| 333 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 334 std::unique_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
| 334 | 335 |
| 335 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 336 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
| 336 | 337 |
| 337 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 338 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
| 338 }; | 339 }; |
| 339 | 340 |
| 340 } // namespace syncer | 341 } // namespace syncer |
| 341 | 342 |
| 342 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ | 343 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_MANAGER_IMPL_H_ |
| OLD | NEW |