Index: sync/sessions/sync_session_context.h |
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h |
index 5995ab151dbcbba209872310ce532fcfa3030da7..f2025486727f5e6fe72b041b4410cfcc21f60cff 100644 |
--- a/sync/sessions/sync_session_context.h |
+++ b/sync/sessions/sync_session_context.h |
@@ -15,19 +15,15 @@ |
#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/committer_list.h" |
#include "sync/engine/sync_engine_event.h" |
-#include "sync/engine/syncer_types.h" |
#include "sync/engine/traffic_recorder.h" |
+#include "sync/engine/updater_list.h" |
#include "sync/internal_api/public/engine/model_safe_worker.h" |
-#include "sync/protocol/sync.pb.h" |
#include "sync/sessions/debug_info_getter.h" |
namespace syncer { |
@@ -71,15 +67,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(); |
@@ -141,6 +129,14 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext { |
server_enabled_pre_commit_update_avoidance_ = value; |
} |
+ UpdaterList* updater_list() { |
+ return &updater_list_; |
+ } |
+ |
+ CommitterList* committer_list() { |
+ return &committer_list_; |
+ } |
+ |
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 |
@@ -156,24 +152,8 @@ 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_; |
+ std::vector<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. |
@@ -218,6 +198,10 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext { |
// enable the pre-commit update avoidance experiment described above. |
const bool client_enabled_pre_commit_update_avoidance_; |
+ // Classes to manage the types hooked up to receive and commit sync data. |
+ UpdaterList updater_list_; |
+ CommitterList committer_list_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
}; |