Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
| diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
| index a9987fc61641fda97ab3696cef6e94b5150738c7..91586d684cbac990b7249918cc1c07db30391948 100644 |
| --- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
| +++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc |
| @@ -703,9 +703,8 @@ void PnaclCoordinator::CachedFileDidOpen(int32_t pp_error) { |
| callback_factory_.NewCallback( |
| &PnaclCoordinator::BitcodeStreamDidFinish); |
| - // TODO(dschuff): need to use url_util_->ResolveRelativeToURL? |
|
jvoung (off chromium)
2013/01/15 20:35:48
It looks like the pexe URL is obtained from the ma
|
| if (!streaming_downloader_->OpenStream(pexe_url_, cb, this)) { |
| - ReportNonPpapiError(ERROR_PNACL_PEXE_FETCH, |
| + ReportNonPpapiError(ERROR_PNACL_PEXE_FETCH_OTHER, |
| nacl::string("failed to open stream ") + pexe_url_); |
| } |
| } |
| @@ -717,15 +716,19 @@ void PnaclCoordinator::BitcodeStreamDidFinish(int32_t pp_error) { |
| // Defer reporting the error and cleanup until after the translation |
| // thread returns, because it may be accessing the coordinator's |
| // objects or writing to the files. |
| - // TODO(dschuff,jvoung): If this is a PP_ERROR_ABORTED, we probably |
| - // want the UMA stat to show that the user aborted the action |
| - // (vs a network error). |
| - // We also want to track the total number of bytes of the pexe |
| - // to know the typical application sizes. |
| translate_finish_error_ = pp_error; |
| - nacl::stringstream ss; |
| - ss << "PnaclCoordinator: pexe load failed (pp_error=" << pp_error << ")."; |
| - error_info_.SetReport(ERROR_PNACL_PEXE_FETCH, ss.str()); |
| + if (pp_error == PP_ERROR_ABORTED) { |
| + error_info_.SetReport(ERROR_PNACL_PEXE_FETCH_ABORTED, |
| + "PnaclCoordinator: pexe load failed. Aborted."); |
| + } |
| + if (pp_error == PP_ERROR_NOACCESS) { |
| + error_info_.SetReport(ERROR_PNACL_PEXE_FETCH_NOACCESS, |
| + "PnaclCoordinator: pexe load failed. No access."); |
| + } else { |
| + nacl::stringstream ss; |
| + ss << "PnaclCoordinator: pexe load failed (pp_error=" << pp_error << ")."; |
| + error_info_.SetReport(ERROR_PNACL_PEXE_FETCH_OTHER, ss.str()); |
| + } |
| translate_thread_->AbortSubprocesses(); |
| } |
| } |