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

Unified Diff: base/json/json_string_value_serializer.cc

Issue 1394993004: Make ValueDeserializer::Deserialize return scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and add todo about not failed trybot Created 5 years, 2 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_string_value_serializer.h ('k') | base/json/json_value_serializer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_string_value_serializer.cc
diff --git a/base/json/json_string_value_serializer.cc b/base/json/json_string_value_serializer.cc
index f2d078f30eed712d5bca57d6971bd3bb1dfd34a7..af7e010a3ab3343c070c6246cc1fff0646dea9e0 100644
--- a/base/json/json_string_value_serializer.cc
+++ b/base/json/json_string_value_serializer.cc
@@ -48,12 +48,11 @@ JSONStringValueDeserializer::JSONStringValueDeserializer(
JSONStringValueDeserializer::~JSONStringValueDeserializer() {}
-Value* JSONStringValueDeserializer::Deserialize(int* error_code,
- std::string* error_str) {
+scoped_ptr<Value> JSONStringValueDeserializer::Deserialize(
+ int* error_code,
+ std::string* error_str) {
return base::JSONReader::ReadAndReturnError(
- json_string_,
- allow_trailing_comma_ ? base::JSON_ALLOW_TRAILING_COMMAS
- : base::JSON_PARSE_RFC,
- error_code, error_str)
- .release();
+ json_string_, allow_trailing_comma_ ? base::JSON_ALLOW_TRAILING_COMMAS
+ : base::JSON_PARSE_RFC,
+ error_code, error_str);
}
« no previous file with comments | « base/json/json_string_value_serializer.h ('k') | base/json/json_value_serializer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698