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

Unified Diff: base/json/json_reader.cc

Issue 10003001: Update JSONReader to take base::StringPiece instead of std::string (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync with Parser changes Created 8 years, 7 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/json_reader.h ('k') | chrome/browser/plugin_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_reader.cc
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc
index fb1459b4ceb33aa42225c431888c8f2767a5dc53..593273ebd44f03f98f8cfdda0fda5ec54a6900da 100644
--- a/base/json/json_reader.cc
+++ b/base/json/json_reader.cc
@@ -38,20 +38,20 @@ JSONReader::~JSONReader() {
}
// static
-Value* JSONReader::Read(const std::string& json) {
+Value* JSONReader::Read(const StringPiece& json) {
internal::JSONParser parser(JSON_PARSE_RFC);
return parser.Parse(json);
}
// static
-Value* JSONReader::Read(const std::string& json,
+Value* JSONReader::Read(const StringPiece& json,
int options) {
internal::JSONParser parser(options);
return parser.Parse(json);
}
// static
-Value* JSONReader::ReadAndReturnError(const std::string& json,
+Value* JSONReader::ReadAndReturnError(const StringPiece& json,
int options,
int* error_code_out,
std::string* error_msg_out) {
« no previous file with comments | « base/json/json_reader.h ('k') | chrome/browser/plugin_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698