Commit e72d9bd0 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

(reland) media: Remove DIR_COMPONENT_WIDEVINE_CDM

Revert commit a62756b1 and reland
3294249d with fix.

Original CL description:

- DIR_COMPONENT_WIDEVINE_CDM is not used anymore.
- Update WidevineCdmComponentInstallerPolicy::GetRelativeInstallDir()
  to use kWidevineCdmBaseDirectory instead of hardcoded string.

TBR=waffles@chromium.org,thestig@chromium.org

Change-Id: I802a9575076e4f93e9ac302d40197117108de4d6
Reviewed-on: https://chromium-review.googlesource.com/791934Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519464}
parent c3c19465
...@@ -356,7 +356,7 @@ bool WidevineCdmComponentInstallerPolicy::VerifyInstallation( ...@@ -356,7 +356,7 @@ bool WidevineCdmComponentInstallerPolicy::VerifyInstallation(
// <profile>\AppData\Local\Google\Chrome\User Data\WidevineCdm\. // <profile>\AppData\Local\Google\Chrome\User Data\WidevineCdm\.
base::FilePath WidevineCdmComponentInstallerPolicy::GetRelativeInstallDir() base::FilePath WidevineCdmComponentInstallerPolicy::GetRelativeInstallDir()
const { const {
return base::FilePath(FILE_PATH_LITERAL("WidevineCdm")); return base::FilePath::FromUTF8Unsafe(kWidevineCdmBaseDirectory);
} }
void WidevineCdmComponentInstallerPolicy::GetHash( void WidevineCdmComponentInstallerPolicy::GetHash(
......
...@@ -373,13 +373,6 @@ bool PathProvider(int key, base::FilePath* result) { ...@@ -373,13 +373,6 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.Append(FILE_PATH_LITERAL("pnacl")); cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
break; break;
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#if defined(WIDEVINE_CDM_IS_COMPONENT)
case chrome::DIR_COMPONENT_WIDEVINE_CDM:
if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
return false;
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
break;
#endif // defined(WIDEVINE_CDM_IS_COMPONENT)
// TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings.
// In the component case, this is the source adapter. Otherwise, it is the // In the component case, this is the source adapter. Otherwise, it is the
// actual Pepper module that gets loaded. // actual Pepper module that gets loaded.
......
...@@ -93,8 +93,6 @@ enum { ...@@ -93,8 +93,6 @@ enum {
DIR_PNACL_BASE, // Full path to the base dir for PNaCl. DIR_PNACL_BASE, // Full path to the base dir for PNaCl.
DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version
// (subdir of DIR_PNACL_BASE). // (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_ADAPTER, // Full path to the Widevine CDM adapter file.
FILE_RESOURCES_PACK, // Full path to the .pak file containing FILE_RESOURCES_PACK, // Full path to the .pak file containing
// binary data (e.g., html files and images // binary data (e.g., html files and images
......
...@@ -17,7 +17,9 @@ const char kWidevineKeySystem[] = "com.widevine.alpha"; ...@@ -17,7 +17,9 @@ const char kWidevineKeySystem[] = "com.widevine.alpha";
const char kWidevineCdmGuid[] = "AD87877A-0213-49A8-8849-9E93B075E477"; const char kWidevineCdmGuid[] = "AD87877A-0213-49A8-8849-9E93B075E477";
// Widevine CDM files are in a directory with this name. // Widevine CDM files are in a directory with this name. This path is also
// hardcoded in some build files and changing it requires changing the build
// files as well.
const char kWidevineCdmBaseDirectory[] = "WidevineCdm"; const char kWidevineCdmBaseDirectory[] = "WidevineCdm";
// This name is used by UMA. Do not change it! // This name is used by UMA. Do not change it!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment