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 1a2a15ea2ea7a93ad2cc5223e8e18866c8a7e603..16dcd931f50955a6027ca304a08936641e07162b 100644 |
| --- a/media/cdm/external_clear_key_test_helper.cc |
| +++ b/media/cdm/external_clear_key_test_helper.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/path_service.h" |
| #include "build/build_config.h" |
| #include "media/cdm/api/content_decryption_module.h" |
| +#include "media/cdm/cdm_paths.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| namespace media { |
| @@ -19,6 +20,8 @@ namespace media { |
| #define STRINGIFY(X) #X |
| #define MAKE_STRING(X) STRINGIFY(X) |
| +const char kClearKeyCdmBaseDirectory[] = "ClearKeyCdm"; |
| + |
| // File name of the External ClearKey CDM on different platforms. |
| const base::FilePath::CharType kExternalClearKeyCdmFileName[] = |
| #if defined(OS_MACOSX) |
| @@ -40,10 +43,12 @@ ExternalClearKeyTestHelper::~ExternalClearKeyTestHelper() { |
| void ExternalClearKeyTestHelper::LoadLibrary() { |
| // Determine the location of the CDM. It is expected to be in the same |
| // directory as the current module. |
| - base::FilePath current_module_dir; |
| - ASSERT_TRUE(PathService::Get(base::DIR_MODULE, ¤t_module_dir)); |
| + base::FilePath library_dir; |
| + ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &library_dir)); |
| + library_dir = library_dir.Append( |
|
ddorwin
2016/05/19 00:04:26
(relative?) path.
Naming in line 47 might be misl
xhwang
2016/05/20 00:22:35
Done.
|
| + GetPlatformSpecificDirectory(kClearKeyCdmBaseDirectory)); |
| library_path_ = |
| - current_module_dir.Append(base::FilePath(kExternalClearKeyCdmFileName)); |
| + library_dir.Append(base::FilePath(kExternalClearKeyCdmFileName)); |
| ASSERT_TRUE(base::PathExists(library_path_)) << library_path_.value(); |
| // Now load the CDM library. |