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

Unified Diff: components/safe_json/safe_json_parser_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
Index: components/safe_json/safe_json_parser_impl.cc
diff --git a/components/safe_json/safe_json_parser_impl.cc b/components/safe_json/safe_json_parser_impl.cc
index 6d4746156835ec9cf8185b00bf3f6a54e3f811c4..52bd0a3d4c2b944194bb30b71cf6d7672e9eec04 100644
--- a/components/safe_json/safe_json_parser_impl.cc
+++ b/components/safe_json/safe_json_parser_impl.cc
@@ -61,7 +61,7 @@ void SafeJsonParserImpl::OnConnectionError() {
}
void SafeJsonParserImpl::OnParseDone(const base::ListValue& wrapper,
- mojo::String error) {
+ const base::Optional<std::string>& error) {
DCHECK(io_thread_checker_.CalledOnValidThread());
// Shut down the utility process.
@@ -73,8 +73,8 @@ void SafeJsonParserImpl::OnParseDone(const base::ListValue& wrapper,
const base::Value* value = nullptr;
CHECK(wrapper.Get(0, &value));
parsed_json.reset(value->DeepCopy());
- } else {
- error_message = error.get();
+ } else if (error.has_value()) {
+ error_message = error.value();
}
// Call ReportResults() on caller's thread.
« no previous file with comments | « components/safe_json/safe_json_parser_impl.h ('k') | components/safe_json/utility/safe_json_parser_mojo_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698