summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 23:24:57 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 23:24:57 +0000
commit8bcd56e28c781e796dd53744185c28dfbc15fa38 (patch)
tree508e6ac854b5fff78c60f14fed02ccbffa1694f2 /content/ppapi_plugin
parent34b630e2252f5a1e6aaa40000d88c9b17708b295 (diff)
downloadchromium_src-8bcd56e28c781e796dd53744185c28dfbc15fa38.zip
chromium_src-8bcd56e28c781e796dd53744185c28dfbc15fa38.tar.gz
chromium_src-8bcd56e28c781e796dd53744185c28dfbc15fa38.tar.bz2
Check existence of Widevince CDM/Adapter on load failure on Win.
For bug investigation only. These code will be removed when the issue is fixed. BUG=345852,356331 Review URL: https://codereview.chromium.org/207453004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 7a4e6e536..5ca0f83 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -53,6 +53,11 @@
#endif
#if defined(OS_WIN)
+
+// TODO(xhwang): Remove after http://crbug.com/345852 is fixed.
+const char kWidevineCdmFileName[] = "widevinecdm.dll";
+const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll";
+
extern sandbox::TargetServices* g_target_services;
// Used by EnumSystemLocales for warming up.
@@ -278,6 +283,18 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
ReportLoadResult(path, LOAD_FAILED);
// Report detailed reason for load failure.
ReportLoadErrorCode(path, error);
+#if defined(OW_WIN)
+ // Extra check to help investigate http://crbug.com/345852. This should
+ // never fail because the paths are checked before registering the
+ // adapter.
+ // TODO(xhwang): Remove this after the issue is fixed. See
+ // http://crbug.com/356331
+ if (path.BaseName().MaybeAsASCII() == kWidevineCdmAdapterFileName) {
+ CHECK(base::PathExists(path));
+ CHECK(
+ base::PathExists(path.DirName().AppendASCII(kWidevineCdmFileName)));
+ }
+#endif
return;
}