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

Unified Diff: sync/syncable/entry.cc

Issue 100823007: Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS page encodings Created 7 years 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/internal_api/public/base/progress_marker_map.cc ('k') | tools/gn/trace.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/entry.cc
diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc
index 3891c55402444383091bf5e4c0946e0c725ee584..852c33e32edee914422dfbf8c4d1d6c5e138df13 100644
--- a/sync/syncable/entry.cc
+++ b/sync/syncable/entry.cc
@@ -147,11 +147,9 @@ std::ostream& operator<<(std::ostream& os, const Entry& entry) {
os << g_metas_columns[i].name << ": " << field << ", ";
}
for ( ; i < PROTO_FIELDS_END; ++i) {
- std::string escaped_str;
- base::JsonDoubleQuote(
+ std::string escaped_str = base::EscapeBytesAsInvalidJSONString(
kernel->ref(static_cast<ProtoField>(i)).SerializeAsString(),
- false,
- &escaped_str);
+ false);
os << g_metas_columns[i].name << ": " << escaped_str << ", ";
}
for ( ; i < UNIQUE_POSITION_FIELDS_END; ++i) {
« no previous file with comments | « sync/internal_api/public/base/progress_marker_map.cc ('k') | tools/gn/trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698