Commit 0f253da5 authored by ddorwin@chromium.org's avatar ddorwin@chromium.org

Fix a type mismatch on Windows caused by r201738.

The problem was at encrypted_media_browsertest.cc line 167, which is a call to RegisterPepperCdm(), but the right fix is to use ASCII for the constants.

TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/15658009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202598 0039d316-1c4b-4281-b951-d872f2087c98
parent ea79de87
......@@ -217,7 +217,7 @@ bool WidevineCdmComponentInstaller::Install(
if (current_version_.CompareTo(version) > 0)
return false;
if (!file_util::PathExists(unpack_path.Append(kWidevineCdmFileName)))
if (!file_util::PathExists(unpack_path.AppendASCII(kWidevineCdmFileName)))
return false;
base::FilePath adapter_source_path;
......@@ -234,7 +234,7 @@ bool WidevineCdmComponentInstaller::Install(
return false;
base::FilePath adapter_install_path =
install_path.Append(kWidevineCdmAdapterFileName);
install_path.AppendASCII(kWidevineCdmAdapterFileName);
if (!file_util::CopyFile(adapter_source_path, adapter_install_path))
return false;
......@@ -270,8 +270,8 @@ void StartWidevineCdmUpdateRegistration(ComponentUpdateService* cus) {
base::Version version(kNullVersion);
std::vector<base::FilePath> older_dirs;
if (GetWidevineCdmDirectory(&path, &version, &older_dirs)) {
if (file_util::PathExists(path.Append(kWidevineCdmAdapterFileName)) &&
file_util::PathExists(path.Append(kWidevineCdmFileName))) {
if (file_util::PathExists(path.AppendASCII(kWidevineCdmAdapterFileName)) &&
file_util::PathExists(path.AppendASCII(kWidevineCdmFileName))) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&RegisterWidevineCdmWithChrome, path, version));
......
......@@ -368,7 +368,7 @@ bool PathProvider(int key, base::FilePath* result) {
case chrome::FILE_WIDEVINE_CDM_ADAPTER:
if (!GetInternalPluginsDirectory(&cur))
return false;
cur = cur.Append(kWidevineCdmAdapterFileName);
cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
break;
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
case chrome::FILE_RESOURCES_PACK:
......
......@@ -26,24 +26,24 @@ const char kWidevineCdmPluginMimeTypeDescription[] =
#endif
// File name of the CDM on different platforms.
const base::FilePath::CharType kWidevineCdmFileName[] =
const char kWidevineCdmFileName[] =
#if defined(OS_MACOSX)
FILE_PATH_LITERAL("widevinecdm.dylib");
"widevinecdm.dylib";
#elif defined(OS_WIN)
FILE_PATH_LITERAL("widevinecdm.dll");
"widevinecdm.dll";
#else // OS_LINUX, etc.
FILE_PATH_LITERAL("libwidevinecdm.so");
"libwidevinecdm.so";
#endif
#if defined(ENABLE_PEPPER_CDMS)
// File name of the adapter on different platforms.
const base::FilePath::CharType kWidevineCdmAdapterFileName[] =
const char kWidevineCdmAdapterFileName[] =
#if defined(OS_MACOSX)
FILE_PATH_LITERAL("widevinecdmadapter.plugin");
"widevinecdmadapter.plugin";
#elif defined(OS_WIN)
FILE_PATH_LITERAL("widevinecdmadapter.dll");
"widevinecdmadapter.dll";
#else // OS_LINUX, etc.
FILE_PATH_LITERAL("libwidevinecdmadapter.so");
"libwidevinecdmadapter.so";
#endif
#endif // defined(ENABLE_PEPPER_CDMS)
......
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