Chromium Code Reviews| 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. |