From b381e852b16e8153a81cafa387df4a78d3e534ab Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 22 Jul 2018 02:37:13 +1000 Subject: [PATCH] media: Stop registering CDM adapter as a pepper plugin https://chromium-review.googlesource.com/956255 --- chromium_src/chrome/common/chrome_paths.cc | 15 +++++++++------ chromium_src/chrome/common/chrome_paths.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/chromium_src/chrome/common/chrome_paths.cc b/chromium_src/chrome/common/chrome_paths.cc index 0022fcaed963..1330478cd624 100644 --- a/chromium_src/chrome/common/chrome_paths.cc +++ b/chromium_src/chrome/common/chrome_paths.cc @@ -8,6 +8,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/mac/bundle_locations.h" +#include "base/native_library.h" #include "base/path_service.h" #include "base/strings/string_util.h" #include "base/sys_info.h" @@ -15,7 +16,7 @@ #include "base/version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths_internal.h" -#include "chrome/common/widevine_cdm_constants.h" +#include "media/cdm/cdm_paths.h" #include "media/media_buildflags.h" #include "third_party/widevine/cdm/stub/widevine_cdm_version.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" @@ -369,13 +370,15 @@ bool PathProvider(int key, base::FilePath* result) { cur = cur.AppendASCII(kWidevineCdmBaseDirectory); break; #endif // defined(WIDEVINE_CDM_IS_COMPONENT) - // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. - // In the component case, this is the source adapter. Otherwise, it is the - // actual Pepper module that gets loaded. - case chrome::FILE_WIDEVINE_CDM_ADAPTER: + // TODO(crbug.com/663554): Remove this after component updated CDM is + // supported on Linux and ChromeOS. + case chrome::FILE_WIDEVINE_CDM: if (!GetInternalPluginsDirectory(&cur)) return false; - cur = cur.AppendASCII(kWidevineCdmAdapterFileName); + cur = + cur.Append( + media::GetPlatformSpecificDirectory(kWidevineCdmBaseDirectory)) + .AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName)); break; #endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) case chrome::FILE_RESOURCES_PACK: diff --git a/chromium_src/chrome/common/chrome_paths.h b/chromium_src/chrome/common/chrome_paths.h index 61a5012475c3..53197be07605 100644 --- a/chromium_src/chrome/common/chrome_paths.h +++ b/chromium_src/chrome/common/chrome_paths.h @@ -98,7 +98,7 @@ enum { // (subdir of DIR_PNACL_BASE). DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated // Widevine CDM files. - FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. + FILE_WIDEVINE_CDM, // Full path to the Widevine CDM. FILE_RESOURCES_PACK, // Full path to the .pak file containing // binary data (e.g., html files and images // used by internal pages).