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

Unified Diff: base/json/string_escape.cc

Issue 18648003: Let JsonDoubleQuote accept StringPiece (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 | « base/json/string_escape.h ('k') | base/json/string_escape_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/string_escape.cc
diff --git a/base/json/string_escape.cc b/base/json/string_escape.cc
index eaa73ce0a01a765ecca4aab6229284de5f869375..10ea6707465c548a983696475caa4e5f50297e17 100644
--- a/base/json/string_escape.cc
+++ b/base/json/string_escape.cc
@@ -78,25 +78,25 @@ void JsonDoubleQuoteT(const STR& str,
} // namespace
-void JsonDoubleQuote(const std::string& str,
+void JsonDoubleQuote(const StringPiece& str,
bool put_in_quotes,
std::string* dst) {
JsonDoubleQuoteT(str, put_in_quotes, dst);
}
-std::string GetDoubleQuotedJson(const std::string& str) {
+std::string GetDoubleQuotedJson(const StringPiece& str) {
std::string dst;
JsonDoubleQuote(str, true, &dst);
return dst;
}
-void JsonDoubleQuote(const string16& str,
+void JsonDoubleQuote(const StringPiece16& str,
bool put_in_quotes,
std::string* dst) {
JsonDoubleQuoteT(str, put_in_quotes, dst);
}
-std::string GetDoubleQuotedJson(const string16& str) {
+std::string GetDoubleQuotedJson(const StringPiece16& str) {
std::string dst;
JsonDoubleQuote(str, true, &dst);
return dst;
« no previous file with comments | « base/json/string_escape.h ('k') | base/json/string_escape_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698