Remove StringPiece from JSONReader interface to avoid exporting
BUG=b:23907815
Change-Id: I1a5ad3dffa08254850fa813a8434ff3c2170e348
diff --git a/libweave/external/base/json/json_reader.cc b/libweave/external/base/json/json_reader.cc
index ad3ea98..edff8dc 100644
--- a/libweave/external/base/json/json_reader.cc
+++ b/libweave/external/base/json/json_reader.cc
@@ -43,29 +43,29 @@
}
// static
-Value* JSONReader::DeprecatedRead(const StringPiece& json) {
+Value* JSONReader::DeprecatedRead(const std::string& json) {
return Read(json).release();
}
// static
-scoped_ptr<Value> JSONReader::Read(const StringPiece& json) {
+scoped_ptr<Value> JSONReader::Read(const std::string& json) {
internal::JSONParser parser(JSON_PARSE_RFC);
return make_scoped_ptr(parser.Parse(json));
}
// static
-Value* JSONReader::DeprecatedRead(const StringPiece& json, int options) {
+Value* JSONReader::DeprecatedRead(const std::string& json, int options) {
return Read(json, options).release();
}
// static
-scoped_ptr<Value> JSONReader::Read(const StringPiece& json, int options) {
+scoped_ptr<Value> JSONReader::Read(const std::string& json, int options) {
internal::JSONParser parser(options);
return make_scoped_ptr(parser.Parse(json));
}
// static
-Value* JSONReader::DeprecatedReadAndReturnError(const StringPiece& json,
+Value* JSONReader::DeprecatedReadAndReturnError(const std::string& json,
int options,
int* error_code_out,
std::string* error_msg_out) {
@@ -74,7 +74,7 @@
}
// static
-scoped_ptr<Value> JSONReader::ReadAndReturnError(const StringPiece& json,
+scoped_ptr<Value> JSONReader::ReadAndReturnError(const std::string& json,
int options,
int* error_code_out,
std::string* error_msg_out) {
diff --git a/libweave/external/base/json/json_reader.h b/libweave/external/base/json/json_reader.h
index 378935a..e177ab8 100644
--- a/libweave/external/base/json/json_reader.h
+++ b/libweave/external/base/json/json_reader.h
@@ -33,7 +33,6 @@
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "base/strings/string_piece.h"
namespace base {
@@ -94,27 +93,27 @@
// 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 scoped_ptr<Value> Read(const StringPiece& json);
+ static scoped_ptr<Value> Read(const std::string& json);
// TODO(estade): remove this bare pointer version.
- static Value* DeprecatedRead(const StringPiece& json);
+ static Value* DeprecatedRead(const std::string& 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 scoped_ptr<Value> Read(const StringPiece& json, int options);
+ static scoped_ptr<Value> Read(const std::string& json, int options);
// TODO(estade): remove this bare pointer version.
- static Value* DeprecatedRead(const StringPiece& json, int options);
+ static Value* DeprecatedRead(const std::string& 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 scoped_ptr<Value> ReadAndReturnError(const StringPiece& json,
+ static scoped_ptr<Value> ReadAndReturnError(const std::string& 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,
+ static Value* DeprecatedReadAndReturnError(const std::string& json,
int options, // JSONParserOptions
int* error_code_out,
std::string* error_msg_out);