Don't create Widevine-related folders when Widevine support is disabled (issue #1713)

This commit is contained in:
Marshall Greenblatt 2015-09-24 11:34:51 +03:00
parent 74dfd9ad81
commit a33720558e
1 changed files with 10 additions and 7 deletions

View File

@ -535,16 +535,19 @@ void CefMainDelegate::PreSandboxStartup() {
true); // Create if necessary.
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
const base::FilePath& widevine_plugin_path = GetResourcesFilePath();
PathService::Override(chrome::FILE_WIDEVINE_CDM_ADAPTER,
widevine_plugin_path.AppendASCII(
kWidevineCdmAdapterFileName));
const base::FilePath& widevine_plugin_path =
GetResourcesFilePath().AppendASCII(kWidevineCdmAdapterFileName);
if (base::PathExists(widevine_plugin_path)) {
PathService::Override(chrome::FILE_WIDEVINE_CDM_ADAPTER,
widevine_plugin_path);
}
#if defined(WIDEVINE_CDM_IS_COMPONENT)
PathService::Override(chrome::DIR_COMPONENT_WIDEVINE_CDM,
user_data_path.Append(kWidevineCdmBaseDirectory));
if (command_line->HasSwitch(switches::kEnableWidevineCdm)) {
PathService::Override(chrome::DIR_COMPONENT_WIDEVINE_CDM,
user_data_path.Append(kWidevineCdmBaseDirectory));
}
#endif // defined(WIDEVINE_CDM_IS_COMPONENT)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
}
if (command_line->HasSwitch(switches::kDisablePackLoading))