| 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 SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "sync/internal_api/sync_encryption_handler_impl.h" | 24 #include "sync/internal_api/sync_encryption_handler_impl.h" |
| 25 #include "sync/js/js_backend.h" | 25 #include "sync/js/js_backend.h" |
| 26 #include "sync/notifier/invalidation_handler.h" | 26 #include "sync/notifier/invalidation_handler.h" |
| 27 #include "sync/notifier/invalidator_state.h" | 27 #include "sync/notifier/invalidator_state.h" |
| 28 #include "sync/syncable/directory_change_delegate.h" | 28 #include "sync/syncable/directory_change_delegate.h" |
| 29 #include "sync/util/cryptographer.h" | 29 #include "sync/util/cryptographer.h" |
| 30 #include "sync/util/time.h" | 30 #include "sync/util/time.h" |
| 31 | 31 |
| 32 namespace syncer { | 32 namespace syncer { |
| 33 | 33 |
| 34 class ModelTypeRegistry; |
| 34 class SyncAPIServerConnectionManager; | 35 class SyncAPIServerConnectionManager; |
| 35 class WriteNode; | 36 class WriteNode; |
| 36 class WriteTransaction; | 37 class WriteTransaction; |
| 37 | 38 |
| 38 namespace sessions { | 39 namespace sessions { |
| 39 class SyncSessionContext; | 40 class SyncSessionContext; |
| 40 } | 41 } |
| 41 | 42 |
| 42 // SyncManager encapsulates syncable::Directory and serves as the parent of all | 43 // SyncManager encapsulates syncable::Directory and serves as the parent of all |
| 43 // other objects in the sync API. If multiple threads interact with the same | 44 // other objects in the sync API. If multiple threads interact with the same |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // This can be called from any thread, but only between calls to | 308 // This can be called from any thread, but only between calls to |
| 308 // OpenDirectory() and ShutdownOnSyncThread(). | 309 // OpenDirectory() and ShutdownOnSyncThread(). |
| 309 WeakHandle<SyncManager::ChangeObserver> change_observer_; | 310 WeakHandle<SyncManager::ChangeObserver> change_observer_; |
| 310 | 311 |
| 311 ObserverList<SyncManager::Observer> observers_; | 312 ObserverList<SyncManager::Observer> observers_; |
| 312 | 313 |
| 313 // The ServerConnectionManager used to abstract communication between the | 314 // The ServerConnectionManager used to abstract communication between the |
| 314 // client (the Syncer) and the sync server. | 315 // client (the Syncer) and the sync server. |
| 315 scoped_ptr<SyncAPIServerConnectionManager> connection_manager_; | 316 scoped_ptr<SyncAPIServerConnectionManager> connection_manager_; |
| 316 | 317 |
| 318 // Maintains state that affects the way we interact with different sync types. |
| 319 // This state changes when entering or exiting a configuration cycle. |
| 320 scoped_ptr<ModelTypeRegistry> model_type_registry_; |
| 321 |
| 317 // A container of various bits of information used by the SyncScheduler to | 322 // A container of various bits of information used by the SyncScheduler to |
| 318 // create SyncSessions. Must outlive the SyncScheduler. | 323 // create SyncSessions. Must outlive the SyncScheduler. |
| 319 scoped_ptr<sessions::SyncSessionContext> session_context_; | 324 scoped_ptr<sessions::SyncSessionContext> session_context_; |
| 320 | 325 |
| 321 // The scheduler that runs the Syncer. Needs to be explicitly | 326 // The scheduler that runs the Syncer. Needs to be explicitly |
| 322 // Start()ed. | 327 // Start()ed. |
| 323 scoped_ptr<SyncScheduler> scheduler_; | 328 scoped_ptr<SyncScheduler> scheduler_; |
| 324 | 329 |
| 325 // A multi-purpose status watch object that aggregates stats from various | 330 // A multi-purpose status watch object that aggregates stats from various |
| 326 // sync components. | 331 // sync components. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 375 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
| 371 | 376 |
| 372 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 377 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
| 373 | 378 |
| 374 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 379 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
| 375 }; | 380 }; |
| 376 | 381 |
| 377 } // namespace syncer | 382 } // namespace syncer |
| 378 | 383 |
| 379 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 384 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |