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

Unified Diff: sync/sessions/sync_session_context.h

Issue 25638003: sync: Implement per-type commit interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix win compile Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_context.h
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index 718cc6caad0ac90c54dfef6ea6d43ecb018bdd28..3133c32a2ef3e4b85e76aed0a3480aba4d09b28c 100644
--- a/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -22,7 +22,9 @@
#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_engine_event.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/traffic_recorder.h"
@@ -71,8 +73,10 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
return routing_info_;
}
- void set_routing_info(const ModelSafeRoutingInfo& routing_info) {
- routing_info_ = routing_info;
+ void set_routing_info(const ModelSafeRoutingInfo& routing_info);
+
+ CommitContributorMap* commit_contributor_map() {
+ return &commit_contributor_map_;
}
const std::vector<scoped_refptr<ModelSafeWorker> >& workers() const {
@@ -154,6 +158,14 @@ class SYNC_EXPORT_PRIVATE SyncSessionContext {
// Must be updated manually when SBR's state is modified.
ModelSafeRoutingInfo routing_info_;
+ // 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::vector<scoped_refptr<ModelSafeWorker> > workers_;
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698