Index: base/json/json_reader.h |
diff --git a/base/json/json_reader.h b/base/json/json_reader.h |
index fd053d4336bf12ad2d812e7f0cbd3fd5b2acd881..378935a709ea89f3292656dc6774c6f8a3b14578 100644 |
--- a/base/json/json_reader.h |
+++ b/base/json/json_reader.h |
@@ -94,28 +94,37 @@ 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 Value* Read(const StringPiece& json); |
+ static scoped_ptr<Value> Read(const StringPiece& json); |
+ // TODO(estade): remove this bare pointer version. |
+ static Value* DeprecatedRead(const 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 Value* Read(const StringPiece& json, int options); |
+ static scoped_ptr<Value> Read(const StringPiece& json, int options); |
+ // TODO(estade): remove this bare pointer version. |
+ static Value* DeprecatedRead(const 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 |
// an error code and a formatted error message (including error location if |
// appropriate). Otherwise, they will be unmodified. |
- static Value* ReadAndReturnError(const StringPiece& json, |
- int options, // JSONParserOptions |
- int* error_code_out, |
- std::string* error_msg_out); |
+ static scoped_ptr<Value> ReadAndReturnError(const StringPiece& json, |
+ int options, // JSONParserOptions |
+ int* error_code_out, |
+ std::string* error_msg_out); |
+ // TODO(estade): remove this bare pointer version. |
+ static Value* DeprecatedReadAndReturnError(const StringPiece& json, |
+ int options, // JSONParserOptions |
+ int* error_code_out, |
+ std::string* error_msg_out); |
// Converts a JSON parse error code into a human readable message. |
// Returns an empty string if error_code is JSON_NO_ERROR. |
static std::string ErrorCodeToString(JsonParseError error_code); |
// Parses an input string into a Value that is owned by the caller. |
- Value* ReadToValue(const std::string& json); |
+ scoped_ptr<Value> ReadToValue(const std::string& json); |
// Returns the error code if the last call to ReadToValue() failed. |
// Returns JSON_NO_ERROR otherwise. |