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

Unified Diff: chrome/browser/load_library_perf_test.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
Index: chrome/browser/load_library_perf_test.cc
diff --git a/chrome/browser/load_library_perf_test.cc b/chrome/browser/load_library_perf_test.cc
index b7edcd5f2caa891b4ed8c4c5136568f6cc9dbce2..3b49e6a03e12bd428917671b6d7a3c4dfd9edf33 100644
--- a/chrome/browser/load_library_perf_test.cc
+++ b/chrome/browser/load_library_perf_test.cc
@@ -7,6 +7,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/native_library.h"
#include "base/path_service.h"
#include "base/scoped_native_library.h"
#include "base/strings/utf_string_conversions.h"
@@ -61,17 +62,6 @@ void MeasureSizeAndTimeToLoadNativeLibrary(
#if defined(ENABLE_PEPPER_CDMS)
-// File name of the ClearKey CDM on different platforms.
-// TODO(xhwang): Consolidate this with external_clear_key_test_helper.cc.
-const char kClearKeyCdmFileName[] =
-#if defined(OS_MACOSX)
- "libclearkeycdm.dylib";
-#elif defined(OS_WIN)
- "clearkeycdm.dll";
-#else // OS_LINUX, etc.
- "libclearkeycdm.so";
-#endif
-
void MeasureSizeAndTimeToLoadCdm(const std::string& cdm_base_dir,
const std::string& cdm_name) {
MeasureSizeAndTimeToLoadNativeLibrary(
@@ -86,7 +76,9 @@ void MeasureSizeAndTimeToLoadCdm(const std::string& cdm_base_dir,
#if defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE)
TEST(LoadCDMPerfTest, Widevine) {
- MeasureSizeAndTimeToLoadCdm(kWidevineCdmBaseDirectory, kWidevineCdmFileName);
+ MeasureSizeAndTimeToLoadCdm(
+ kWidevineCdmBaseDirectory,
+ base::GetNativeLibraryName(kWidevineCdmLibraryName));
}
TEST(LoadCDMPerfTest, WidevineAdapter) {
@@ -96,7 +88,9 @@ TEST(LoadCDMPerfTest, WidevineAdapter) {
#endif // defined(WIDEVINE_CDM_AVAILABLE)
TEST(LoadCDMPerfTest, ExternalClearKey) {
- MeasureSizeAndTimeToLoadCdm(kClearKeyCdmBaseDirectory, kClearKeyCdmFileName);
+ MeasureSizeAndTimeToLoadCdm(
+ kClearKeyCdmBaseDirectory,
+ base::GetNativeLibraryName(media::kClearKeyCdmLibraryName));
}
TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) {
« no previous file with comments | « chrome/browser/component_updater/widevine_cdm_component_installer.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698