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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2849163003: media: Move the callsite of CdmHostFiles::InitVerification() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 004dc39589c2ff43f222491fbb965dd1846eeead..0cf70f6687770ff3047eb6beefd0bf9778091f3c 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -390,6 +390,18 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
if (is_broker_ || !IsCdm(path))
cdm_host_files.reset(); // Close all opened files.
#endif // defined(OS_WIN) || defined(OS_MACOSX)
+
+ // Verify CDM host. On Windows and Mac, this is called unsandboxed. On Linux,
+ // this is called sandboxed.
+ if (cdm_host_files) {
+ DCHECK(IsCdm(path));
+ if (!cdm_host_files->VerifyFiles(library.get(), path)) {
Will Harris 2017/05/01 20:59:00 what exactly does VerifyFiles do? We agreed in th
xhwang 2017/05/01 23:05:45 As discussed offline, added links and updated func
+ LOG(WARNING) << "CDM host verification failed.";
+ // TODO(xhwang): Add a new load result if needed.
+ ReportLoadResult(path, INIT_FAILED);
+ return;
+ }
+ }
#endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
#if defined(OS_WIN)
@@ -478,18 +490,6 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
ReportLoadResult(path, INIT_FAILED);
return;
}
-#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
- // Now the process is sandboxed. Verify CDM host.
- if (cdm_host_files) {
- DCHECK(IsCdm(path));
- if (!cdm_host_files->VerifyFiles(library.get(), path)) {
- LOG(WARNING) << "CDM host verification failed.";
- // TODO(xhwang): Add a new load result if needed.
- ReportLoadResult(path, INIT_FAILED);
- return;
- }
- }
-#endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
}
// Initialization succeeded, so keep the plugin DLL loaded.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698