Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 93433006: sync: Introduce ModelTypeRegistry and helpers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + address comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
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 SyncAPIServerConnectionManager; 34 class SyncAPIServerConnectionManager;
35 class WriteNode; 35 class WriteNode;
36 class WriteTransaction; 36 class WriteTransaction;
37 class ModelTypeRegistry;
Nicolas Zea 2014/01/16 21:08:26 nit: abc order
rlarocque 2014/01/16 21:51:29 Done.
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
44 // local sync repository (i.e. the same sqlite database), they should share a 45 // local sync repository (i.e. the same sqlite database), they should share a
45 // single SyncManager instance. The caller should typically create one 46 // single SyncManager instance. The caller should typically create one
46 // SyncManager for the lifetime of a user session. 47 // SyncManager for the lifetime of a user session.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698