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

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..195060008290c96c90b6bb81a313890d2959436b 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;
blundell 2016/11/08 08:32:41 tiny nit: I think it would be nicer to use |error.
yzshen1 2016/11/09 17:13:22 Done.
}
// Call ReportResults() on caller's thread.

Powered by Google App Engine
This is Rietveld 408576698