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

Unified Diff: base/json/json_reader.h

Issue 1927753002: Convert callers of base::DeepCopy() to base::CreateDeepCopy() in //base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
Index: base/json/json_reader.h
diff --git a/base/json/json_reader.h b/base/json/json_reader.h
index 7b5b3b0a71169158898c6ead969d670a48c7dcfa..f647724f94a38d6c18a3aa93a51becf866b843f5 100644
--- a/base/json/json_reader.h
+++ b/base/json/json_reader.h
@@ -93,12 +93,12 @@ class BASE_EXPORT JSONReader {
// Reads and parses |json|, returning a Value. The caller owns the returned
// instance. If |json| is not a properly formed JSON string, returns NULL.
- static std::unique_ptr<Value> Read(const StringPiece& json);
+ static std::unique_ptr<Value> Read(StringPiece json);
// Reads and parses |json|, returning a Value owned by the caller. The
// parser respects the given |options|. If the input is not properly formed,
// returns NULL.
- static std::unique_ptr<Value> Read(const StringPiece& json, int options);
+ static std::unique_ptr<Value> Read(StringPiece json, int options);
// Reads and parses |json| like Read(). |error_code_out| and |error_msg_out|
// are optional. If specified and NULL is returned, they will be populated
@@ -117,7 +117,7 @@ class BASE_EXPORT JSONReader {
static std::string ErrorCodeToString(JsonParseError error_code);
// Parses an input string into a Value that is owned by the caller.
- std::unique_ptr<Value> ReadToValue(const std::string& json);
+ std::unique_ptr<Value> ReadToValue(StringPiece json);
// Returns the error code if the last call to ReadToValue() failed.
// Returns JSON_NO_ERROR otherwise.

Powered by Google App Engine
This is Rietveld 408576698