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

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

Issue 2483013002: Mojo C++ bindings: Remove more use_new_wrapper_types=false. (Closed)
Patch Set: . Created 4 years, 1 month 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/utility/safe_json_parser_mojo_impl.h ('k') | no next file » | 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 f3d11aae88e93242cd76a8eb7ab97f74e3df41e7..7d7458c79963c1e65ae17ca09047737c3cb09efd 100644
--- a/components/safe_json/utility/safe_json_parser_mojo_impl.cc
+++ b/components/safe_json/utility/safe_json_parser_mojo_impl.cc
@@ -24,18 +24,18 @@ void SafeJsonParserMojoImpl::Create(
std::move(request));
}
-void SafeJsonParserMojoImpl::Parse(const mojo::String& json,
+void SafeJsonParserMojoImpl::Parse(const std::string& json,
const ParseCallback& callback) {
int error_code;
std::string error;
std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
- json.get(), base::JSON_PARSE_RFC, &error_code, &error);
+ json, base::JSON_PARSE_RFC, &error_code, &error);
base::ListValue wrapper;
if (value) {
wrapper.Append(std::move(value));
- callback.Run(wrapper, nullptr);
+ callback.Run(wrapper, base::nullopt);
} else {
- callback.Run(wrapper, error);
+ callback.Run(wrapper, base::make_optional(std::move(error)));
}
}
« no previous file with comments | « components/safe_json/utility/safe_json_parser_mojo_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698