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

Unified Diff: components/safe_json/utility/safe_json_parser_mojo_impl.cc

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 4 years 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 | « components/safe_json/safe_json_parser_impl.cc ('k') | components/typemaps.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_json/utility/safe_json_parser_mojo_impl.cc
diff --git a/components/safe_json/utility/safe_json_parser_mojo_impl.cc b/components/safe_json/utility/safe_json_parser_mojo_impl.cc
index 7d7458c79963c1e65ae17ca09047737c3cb09efd..905f17962ba5d187d5e1fca821e2f8a346bf2e2f 100644
--- a/components/safe_json/utility/safe_json_parser_mojo_impl.cc
+++ b/components/safe_json/utility/safe_json_parser_mojo_impl.cc
@@ -30,12 +30,10 @@ void SafeJsonParserMojoImpl::Parse(const std::string& json,
std::string error;
std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
json, base::JSON_PARSE_RFC, &error_code, &error);
- base::ListValue wrapper;
if (value) {
- wrapper.Append(std::move(value));
- callback.Run(wrapper, base::nullopt);
+ callback.Run(std::move(value), base::nullopt);
} else {
- callback.Run(wrapper, base::make_optional(std::move(error)));
+ callback.Run(nullptr, base::make_optional(std::move(error)));
}
}
« no previous file with comments | « components/safe_json/safe_json_parser_impl.cc ('k') | components/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698