| Index: sync/sessions/sync_session_context.h
|
| diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
|
| index 2e2433e41defcc82d737e5c3a6981e60d34ff951..6303de8bcac87bddc36e77aff9aaa640e8a98c23 100644
|
| --- a/sync/sessions/sync_session_context.h
|
| +++ b/sync/sessions/sync_session_context.h
|
| @@ -15,24 +15,18 @@
|
| #ifndef SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
|
| #define SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
|
|
|
| -#include <map>
|
| #include <string>
|
| -#include <vector>
|
|
|
| -#include "base/stl_util.h"
|
| #include "sync/base/sync_export.h"
|
| -#include "sync/engine/sync_directory_commit_contributor.h"
|
| -#include "sync/engine/sync_directory_update_handler.h"
|
| #include "sync/engine/sync_engine_event.h"
|
| -#include "sync/engine/syncer_types.h"
|
| #include "sync/engine/traffic_recorder.h"
|
| -#include "sync/internal_api/public/engine/model_safe_worker.h"
|
| -#include "sync/protocol/sync.pb.h"
|
| #include "sync/sessions/debug_info_getter.h"
|
| +#include "sync/sessions/model_type_registry.h"
|
|
|
| namespace syncer {
|
|
|
| class ExtensionsActivity;
|
| +class ModelTypeRegistry;
|
| class ServerConnectionManager;
|
|
|
| namespace syncable {
|
| @@ -50,11 +44,11 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| SyncSessionContext(
|
| ServerConnectionManager* connection_manager,
|
| syncable::Directory* directory,
|
| - const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
|
| ExtensionsActivity* extensions_activity,
|
| const std::vector<SyncEngineEventListener*>& listeners,
|
| DebugInfoGetter* debug_info_getter,
|
| TrafficRecorder* traffic_recorder,
|
| + ModelTypeRegistry* model_type_registry,
|
| bool keystore_encryption_enabled,
|
| bool client_enabled_pre_commit_update_avoidance,
|
| const std::string& invalidator_client_id);
|
| @@ -72,15 +66,7 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| return enabled_types_;
|
| }
|
|
|
| - void set_routing_info(const ModelSafeRoutingInfo& routing_info);
|
| -
|
| - UpdateHandlerMap* update_handler_map() {
|
| - return &update_handler_map_;
|
| - }
|
| -
|
| - CommitContributorMap* commit_contributor_map() {
|
| - return &commit_contributor_map_;
|
| - }
|
| + void SetRoutingInfo(const ModelSafeRoutingInfo& routing_info);
|
|
|
| ExtensionsActivity* extensions_activity() {
|
| return extensions_activity_.get();
|
| @@ -142,6 +128,10 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| server_enabled_pre_commit_update_avoidance_ = value;
|
| }
|
|
|
| + ModelTypeRegistry* model_type_registry() {
|
| + return model_type_registry_;
|
| + }
|
| +
|
| private:
|
| // Rather than force clients to set and null-out various context members, we
|
| // extend our encapsulation boundary to scoped helpers that take care of this
|
| @@ -157,25 +147,6 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
| // 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
|
| - // that problem is to initialize this map in set_routing_info().
|
| - UpdateHandlerMap update_handler_map_;
|
| -
|
| - // Deleter for the |update_handler_map_|.
|
| - STLValueDeleter<UpdateHandlerMap> update_handler_deleter_;
|
| -
|
| - // A map of 'commit contributors', one for each enabled type.
|
| - // This must be kept in sync with the routing info. Our temporary solution to
|
| - // that problem is to initialize this map in set_routing_info().
|
| - CommitContributorMap commit_contributor_map_;
|
| -
|
| - // Deleter for the |commit_contributor_map_|.
|
| - STLValueDeleter<CommitContributorMap> commit_contributor_deleter_;
|
| -
|
| - // The set of ModelSafeWorkers. Used to execute tasks of various threads.
|
| - 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.
|
| scoped_refptr<ExtensionsActivity> extensions_activity_;
|
| @@ -196,6 +167,8 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
|
|
|
| TrafficRecorder* traffic_recorder_;
|
|
|
| + ModelTypeRegistry* model_type_registry_;
|
| +
|
| // Satus information to be sent up to the server.
|
| sync_pb::ClientStatus client_status_;
|
|
|
|
|