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

Unified Diff: sync/syncable/entry.cc

Issue 10989063: Changed DB to store node positions as Ordinals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed memory leak error in unittest Created 8 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/syncable/entry.h ('k') | sync/syncable/entry_kernel.h » ('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 ba64299c7340271cae8ac2e3280b5c40a2ed7256..5593426a74e7e0d6ced15ce13003a99c5bea9ade 100644
--- a/sync/syncable/entry.cc
+++ b/sync/syncable/entry.cc
@@ -6,7 +6,7 @@
#include <iomanip>
-#include "net/base/escape.h"
+#include "base/json/string_escape.h"
#include "sync/syncable/base_transaction.h"
#include "sync/syncable/blob.h"
#include "sync/syncable/directory.h"
@@ -127,9 +127,16 @@ 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(
+ kernel->ref(static_cast<ProtoField>(i)).SerializeAsString(),
+ false,
+ &escaped_str);
+ os << g_metas_columns[i].name << ": " << escaped_str << ", ";
+ }
+ for ( ; i < ORDINAL_FIELDS_END; ++i) {
os << g_metas_columns[i].name << ": "
- << net::EscapePath(
- kernel->ref(static_cast<ProtoField>(i)).SerializeAsString())
+ << kernel->ref(static_cast<OrdinalField>(i)).ToDebugString()
<< ", ";
}
os << "TempFlags: ";
« no previous file with comments | « sync/syncable/entry.h ('k') | sync/syncable/entry_kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698