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

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: More review fixes 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;
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 will be updated during configuration cycles, but otherwise
tim (not reviewing) 2014/01/08 19:33:42 Perhaps saying "updated when routing info changes,
rlarocque 2014/01/09 00:31:18 Done. I went with the second suggestion.
320 // remains constant.
321 scoped_ptr<ModelTypeRegistry> model_type_registry_;
322
317 // A container of various bits of information used by the SyncScheduler to 323 // A container of various bits of information used by the SyncScheduler to
318 // create SyncSessions. Must outlive the SyncScheduler. 324 // create SyncSessions. Must outlive the SyncScheduler.
319 scoped_ptr<sessions::SyncSessionContext> session_context_; 325 scoped_ptr<sessions::SyncSessionContext> session_context_;
320 326
321 // The scheduler that runs the Syncer. Needs to be explicitly 327 // The scheduler that runs the Syncer. Needs to be explicitly
322 // Start()ed. 328 // Start()ed.
323 scoped_ptr<SyncScheduler> scheduler_; 329 scoped_ptr<SyncScheduler> scheduler_;
324 330
325 // A multi-purpose status watch object that aggregates stats from various 331 // A multi-purpose status watch object that aggregates stats from various
326 // sync components. 332 // sync components.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 376 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
371 377
372 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; 378 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_;
373 379
374 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 380 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
375 }; 381 };
376 382
377 } // namespace syncer 383 } // namespace syncer
378 384
379 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 385 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698