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

Unified Diff: sync/internal_api/public/base/ordinal.h

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: '' 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
Index: sync/internal_api/public/base/ordinal.h
diff --git a/sync/internal_api/public/base/ordinal.h b/sync/internal_api/public/base/ordinal.h
index c347b7b90be22016563f17dc7e1caf227bd6db02..cb67b4518b10b48b83046a2b95b278bd9bc8c368 100644
--- a/sync/internal_api/public/base/ordinal.h
+++ b/sync/internal_api/public/base/ordinal.h
@@ -260,8 +260,8 @@ bool Ordinal<Traits>::EqualsOrBothInvalid(const Ordinal& other) const {
template <typename Traits>
std::string Ordinal<Traits>::ToDebugString() const {
- std::string debug_string;
- base::JsonDoubleQuote(bytes_, false /* put_in_quotes */, &debug_string);
+ std::string debug_string =
+ base::EscapeBytesAsInvalidJSONString(bytes_, false /* put_in_quotes */);
if (!is_valid_) {
debug_string = "INVALID[" + debug_string + "]";
}

Powered by Google App Engine
This is Rietveld 408576698