| Index: base/json/json_reader.h
|
| diff --git a/base/json/json_reader.h b/base/json/json_reader.h
|
| index b1edfb07edd4c2bd7c736cb150e24e77703deab0..daa20c5575cc19c660be79f98f1c09b9a2ecf406 100644
|
| --- a/base/json/json_reader.h
|
| +++ b/base/json/json_reader.h
|
| @@ -33,6 +33,7 @@
|
|
|
| #include "base/base_export.h"
|
| #include "base/basictypes.h"
|
| +#include "base/string_piece.h"
|
|
|
| // Chromium and Chromium OS check out gtest to different places, so we're
|
| // unable to compile on both if we include gtest_prod.h here. Instead, include
|
| @@ -121,13 +122,13 @@ class BASE_EXPORT JSONReader {
|
| // instance. If |json| is not a properly formed JSON string, returns NULL.
|
| // If |allow_trailing_comma| is true, we will ignore trailing commas in
|
| // objects and arrays even though this goes against the RFC.
|
| - static Value* Read(const std::string& json, bool allow_trailing_comma);
|
| + static Value* Read(const StringPiece& json, bool allow_trailing_comma);
|
|
|
| // 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 std::string& json,
|
| + static Value* ReadAndReturnError(const StringPiece& json,
|
| bool allow_trailing_comma,
|
| int* error_code_out,
|
| std::string* error_msg_out);
|
| @@ -151,7 +152,7 @@ class BASE_EXPORT JSONReader {
|
| // array. Otherwise, it can be any valid JSON type.
|
| // If |allow_trailing_comma| is true, we will ignore trailing commas in
|
| // objects and arrays even though this goes against the RFC.
|
| - Value* JsonToValue(const std::string& json, bool check_root,
|
| + Value* JsonToValue(const StringPiece& json, bool check_root,
|
| bool allow_trailing_comma);
|
|
|
| private:
|
|
|