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

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

Issue 2803023005: Switch base::Value typemapping to be by value instead of by unique_ptr.
Patch Set: Created 3 years, 8 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
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 1595192008e1725804a0c790a2ec3e0195367272..6d25a3b27d61df7f707117e7586bbd526ecc567c 100644
--- a/components/safe_json/utility/safe_json_parser_mojo_impl.cc
+++ b/components/safe_json/utility/safe_json_parser_mojo_impl.cc
@@ -32,9 +32,9 @@ void SafeJsonParserMojoImpl::Parse(const std::string& json,
std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
json, base::JSON_PARSE_RFC, &error_code, &error);
if (value) {
- callback.Run(std::move(value), base::nullopt);
+ callback.Run(*value, base::nullopt);
} else {
- callback.Run(nullptr, base::make_optional(std::move(error)));
+ callback.Run(base::nullopt, base::make_optional(std::move(error)));
}
}
« no previous file with comments | « components/safe_json/safe_json_parser_impl.cc ('k') | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698