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

Unified Diff: sync/syncable/model_type_payload_map.cc

Issue 10197004: [Sync] Convert SyncSessionSnapshot to a copy-able class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lint Created 8 years, 8 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
« sync/sessions/session_state.h ('K') | « sync/sync.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/model_type_payload_map.cc
diff --git a/sync/syncable/model_type_payload_map.cc b/sync/syncable/model_type_payload_map.cc
index 99502b096db4da611d8f43ce96f93f624029b351..aa8bb046eb553f7df053becd8044c97af0aa003e 100644
--- a/sync/syncable/model_type_payload_map.cc
+++ b/sync/syncable/model_type_payload_map.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/base64.h"
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -59,7 +60,10 @@ DictionaryValue* ModelTypePayloadMapToValue(
DictionaryValue* value = new DictionaryValue();
for (ModelTypePayloadMap::const_iterator it = type_payloads.begin();
it != type_payloads.end(); ++it) {
- value->SetString(syncable::ModelTypeToString(it->first), it->second);
+ std::string base64_marker;
+ bool encoded = base::Base64Encode(it->second, &base64_marker);
+ DCHECK(encoded);
+ value->SetString(syncable::ModelTypeToString(it->first), base64_marker);
tim (not reviewing) 2012/04/24 01:22:08 I think you'll need to update the unittest?
Nicolas Zea 2012/04/24 18:06:51 Done.
}
return value;
}
« sync/sessions/session_state.h ('K') | « sync/sync.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698