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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc

Issue 11881038: Refine PNaCl pexe fetch UMA errors to know if the user aborted, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort Created 7 years, 11 months 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: 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?
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.");
Nick Bray (chromium) 2013/01/15 23:12:49 No french spacing. I'd suggesting making it a sin
jvoung (off chromium) 2013/01/16 01:31:24 Pardon my french spacing. Done. I mean... done.
+ }
+ if (pp_error == PP_ERROR_NOACCESS) {
+ error_info_.SetReport(ERROR_PNACL_PEXE_FETCH_NOACCESS,
+ "PnaclCoordinator: pexe load failed. No access.");
Nick Bray (chromium) 2013/01/15 23:12:49 Ditto.
jvoung (off chromium) 2013/01/16 01:31:24 Done -- cleaned up some of the other instances whi
+ } 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();
}
}

Powered by Google App Engine
This is Rietveld 408576698