Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: media/cdm/external_clear_key_test_helper.cc

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/cdm_paths.cc ('k') | net/udp/udp_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..06bc20ca0876b81d143c39fe488db3e9003a216c 100644
--- a/media/cdm/external_clear_key_test_helper.cc
+++ b/media/cdm/external_clear_key_test_helper.cc
@@ -6,8 +6,8 @@
#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"
#include "media/cdm/cdm_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,16 +22,6 @@ namespace media {
const char kClearKeyCdmBaseDirectory[] = "ClearKeyCdm";
-// File name of the External ClearKey CDM on different platforms.
-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
-
ExternalClearKeyTestHelper::ExternalClearKeyTestHelper() {
LoadLibrary();
}
@@ -47,8 +37,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(kClearKeyCdmLibraryName));
ASSERT_TRUE(base::PathExists(library_path_)) << library_path_.value();
// Now load the CDM library.
« no previous file with comments | « media/cdm/cdm_paths.cc ('k') | net/udp/udp_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698