| Index: sync/sessions/sync_session_context.h
|
| diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
|
| index d195943686e9068339ce4cecb512fcd157e890d6..5995ab151dbcbba209872310ce532fcfa3030da7 100644
|
| --- a/sync/sessions/sync_session_context.h
|
| +++ b/sync/sessions/sync_session_context.h
|
| @@ -3,15 +3,12 @@
|
| // found in the LICENSE file.
|
|
|
| // SyncSessionContext encapsulates the contextual information and engine
|
| -// components specific to a SyncSession. A context is accessible via
|
| -// a SyncSession so that session SyncerCommands and parts of the engine have
|
| -// a convenient way to access other parts. In this way it can be thought of as
|
| -// the surrounding environment for the SyncSession. The components of this
|
| -// environment are either valid or not valid for the entire context lifetime,
|
| -// or they are valid for explicitly scoped periods of time by using Scoped
|
| -// installation utilities found below. This means that the context assumes no
|
| -// ownership whatsoever of any object that was not created by the context
|
| -// itself.
|
| +// components specific to a SyncSession. Unlike the SyncSession, the context
|
| +// can be reused across several sync cycles.
|
| +//
|
| +// The context does not take ownership of its pointer members. It's up to
|
| +// the surrounding classes to ensure those members remain valid while the
|
| +// context is in use.
|
| //
|
| // It can only be used from the SyncerThread.
|
|
|
| @@ -70,8 +67,8 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| return directory_;
|
| }
|
|
|
| - const ModelSafeRoutingInfo& routing_info() const {
|
| - return routing_info_;
|
| + ModelTypeSet enabled_types() const {
|
| + return enabled_types_;
|
| }
|
|
|
| void set_routing_info(const ModelSafeRoutingInfo& routing_info);
|
| @@ -84,10 +81,6 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| return &commit_contributor_map_;
|
| }
|
|
|
| - const std::vector<scoped_refptr<ModelSafeWorker> >& workers() const {
|
| - return workers_;
|
| - }
|
| -
|
| ExtensionsActivity* extensions_activity() {
|
| return extensions_activity_.get();
|
| }
|
| @@ -159,9 +152,9 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| ServerConnectionManager* const connection_manager_;
|
| syncable::Directory* const directory_;
|
|
|
| - // A cached copy of SyncBackendRegistrar's routing info.
|
| - // Must be updated manually when SBR's state is modified.
|
| - ModelSafeRoutingInfo routing_info_;
|
| + // The set of enabled types. Derrived from the routing info set with
|
| + // set_routing_info().
|
| + ModelTypeSet enabled_types_;
|
|
|
| // A map of 'update handlers', one for each enabled type.
|
| // This must be kept in sync with the routing info. Our temporary solution to
|
| @@ -180,7 +173,7 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| STLValueDeleter<CommitContributorMap> commit_contributor_deleter_;
|
|
|
| // The set of ModelSafeWorkers. Used to execute tasks of various threads.
|
| - std::vector<scoped_refptr<ModelSafeWorker> > workers_;
|
| + std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_;
|
|
|
| // We use this to stuff extensions activity into CommitMessages so the server
|
| // can correlate commit traffic with extension-related bookmark mutations.
|
|
|