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

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 correctly, update comment 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
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.

Powered by Google App Engine
This is Rietveld 408576698