Chromium Code Reviews| Index: media/cdm/external_clear_key_test_helper.cc |
| diff --git a/media/cdm/external_clear_key_test_helper.cc b/media/cdm/external_clear_key_test_helper.cc |
| index 3b5e944cd97b8c6281f0ed99bd64cb61a397dfb5..d28dd26835b193b7ec24bb9e14fd817323380ec0 100644 |
| --- a/media/cdm/external_clear_key_test_helper.cc |
| +++ b/media/cdm/external_clear_key_test_helper.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/files/file_path.h" |
| #include "base/files/file_util.h" |
| +#include "base/native_library.h" |
| #include "base/path_service.h" |
| #include "build/build_config.h" |
| #include "media/cdm/api/content_decryption_module.h" |
| @@ -23,14 +24,7 @@ namespace media { |
| const char kClearKeyCdmBaseDirectory[] = "ClearKeyCdm"; |
| // File name of the External ClearKey CDM on different platforms. |
|
Mark Mentovai
2016/06/10 23:39:59
Here, too: not a file name. Not on different platf
|
| -const base::FilePath::CharType kExternalClearKeyCdmFileName[] = |
| -#if defined(OS_MACOSX) |
| - FILE_PATH_LITERAL("libclearkeycdm.dylib"); |
| -#elif defined(OS_WIN) |
| - FILE_PATH_LITERAL("clearkeycdm.dll"); |
| -#else // OS_LINUX, etc. |
| - FILE_PATH_LITERAL("libclearkeycdm.so"); |
| -#endif |
| +const char kExternalClearKeyCdmName[] = "clearkeycdm"; |
|
Mark Mentovai
2016/06/10 23:39:59
kExternalClearKeyCdmLibararyName, but here too: no
|
| ExternalClearKeyTestHelper::ExternalClearKeyTestHelper() { |
| LoadLibrary(); |
| @@ -47,8 +41,8 @@ void ExternalClearKeyTestHelper::LoadLibrary() { |
| ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &cdm_base_path)); |
| cdm_base_path = cdm_base_path.Append( |
| GetPlatformSpecificDirectory(kClearKeyCdmBaseDirectory)); |
| - library_path_ = |
| - cdm_base_path.Append(base::FilePath(kExternalClearKeyCdmFileName)); |
| + library_path_ = cdm_base_path.AppendASCII( |
| + base::GetNativeLibraryName(kExternalClearKeyCdmName)); |
| ASSERT_TRUE(base::PathExists(library_path_)) << library_path_.value(); |
| // Now load the CDM library. |