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

Unified Diff: sync/internal_api/public/engine/model_safe_worker.cc

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 4 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
Index: sync/internal_api/public/engine/model_safe_worker.cc
diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc
index cd7eaea9b56fd53c128a2885a78b3ca48ed7f58c..2212a4176d140565f0aeca00ebe0c0e8785233e7 100644
--- a/sync/internal_api/public/engine/model_safe_worker.cc
+++ b/sync/internal_api/public/engine/model_safe_worker.cc
@@ -29,15 +29,15 @@ std::string ModelSafeRoutingInfoToString(
return json;
}
-ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap(
+ModelTypeStateMap ModelSafeRoutingInfoToStateMap(
const ModelSafeRoutingInfo& routes,
const std::string& payload) {
- ModelTypePayloadMap types_with_payloads;
+ ModelTypeStateMap type_state_map;
for (ModelSafeRoutingInfo::const_iterator i = routes.begin();
i != routes.end(); ++i) {
- types_with_payloads[i->first] = payload;
+ type_state_map[i->first].payload = payload;
}
- return types_with_payloads;
+ return type_state_map;
}
ModelTypeSet GetRoutingInfoTypes(const ModelSafeRoutingInfo& routing_info) {
« no previous file with comments | « sync/internal_api/public/engine/model_safe_worker.h ('k') | sync/internal_api/public/engine/model_safe_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698