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

Unified Diff: base/json/json_reader.cc

Issue 1124223012: Change JSONReader::ReadToValue to return a scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromedriver Created 5 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') | base/json/json_reader_unittest.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 e17d450ebfae57cf065dc0ac205494de87e5f3b3..343cbc714e8c9902618ce8648acc701d843bc3e1 100644
--- a/base/json/json_reader.cc
+++ b/base/json/json_reader.cc
@@ -6,6 +6,7 @@
#include "base/json/json_parser.h"
#include "base/logging.h"
+#include "base/values.h"
namespace base {
@@ -99,8 +100,8 @@ std::string JSONReader::ErrorCodeToString(JsonParseError error_code) {
}
}
-Value* JSONReader::ReadToValue(const std::string& json) {
- return parser_->Parse(json);
+scoped_ptr<Value> JSONReader::ReadToValue(const std::string& json) {
+ return make_scoped_ptr(parser_->Parse(json));
}
JSONReader::JsonParseError JSONReader::error_code() const {
« no previous file with comments | « base/json/json_reader.h ('k') | base/json/json_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698