diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 16:31:22 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 16:31:22 +0000 |
commit | 3b6fbfb0ba0143b4bd680b6e21e3ec4a7a8f4620 (patch) | |
tree | c824e892d814c090245531c46a406524e35e1087 /content/ppapi_plugin/ppapi_thread.cc | |
parent | 34f661ce8f8e364a7fef5d69f277e84083f497d0 (diff) | |
download | chromium_src-3b6fbfb0ba0143b4bd680b6e21e3ec4a7a8f4620.zip chromium_src-3b6fbfb0ba0143b4bd680b6e21e3ec4a7a8f4620.tar.gz chromium_src-3b6fbfb0ba0143b4bd680b6e21e3ec4a7a8f4620.tar.bz2 |
Add FILE_MISSING in PpapiThread::LoadResult for UMA reporting.
Missing plugin file is a common cause of plugin loading failure. Explictly
report this case instead of relying on system error codes.
Note that for plugins with dependencies, this only catches the case that the
real plugin file is missing. Missing dependencies will still be reported through
error codes. One example of this is that the widevinecdmadapter.dll file depends
on widevinecdm.dll.
BUG=345852
Review URL: https://codereview.chromium.org/320523002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin/ppapi_thread.cc')
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index cb0abde..2d5e3db 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/cpu.h" #include "base/debug/crash_logging.h" +#include "base/file_util.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/metrics/sparse_histogram.h" @@ -275,6 +276,10 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path, if (!library.is_valid()) { LOG(ERROR) << "Failed to load Pepper module from " << path.value() << " (error: " << error.ToString() << ")"; + if (!base::PathExists(path)) { + ReportLoadResult(path, FILE_MISSING); + return; + } ReportLoadResult(path, LOAD_FAILED); // Report detailed reason for load failure. ReportLoadErrorCode(path, error); |