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

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 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: 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..2806311338b3125bacaa558f9e98b12fd7275167 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"
@@ -63,14 +64,7 @@ void MeasureSizeAndTimeToLoadNativeLibrary(
// File name of the ClearKey CDM on different platforms.
Mark Mentovai 2016/06/10 23:39:59 Not a filename. “Different platforms” is extraneou
Lei Zhang 2016/06/13 19:10:07 Done.
// 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
+const char kClearKeyCdmName[] = "clearkeycdm";
Mark Mentovai 2016/06/10 23:39:59 Maybe kClearKeyCdmLibraryName. But I see no reason
Lei Zhang 2016/06/13 19:10:06 I renamed the variable, and merged it with the cop
void MeasureSizeAndTimeToLoadCdm(const std::string& cdm_base_dir,
const std::string& cdm_name) {
@@ -86,7 +80,8 @@ 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(kWidevineCdmName));
}
TEST(LoadCDMPerfTest, WidevineAdapter) {
@@ -96,7 +91,8 @@ TEST(LoadCDMPerfTest, WidevineAdapter) {
#endif // defined(WIDEVINE_CDM_AVAILABLE)
TEST(LoadCDMPerfTest, ExternalClearKey) {
- MeasureSizeAndTimeToLoadCdm(kClearKeyCdmBaseDirectory, kClearKeyCdmFileName);
+ MeasureSizeAndTimeToLoadCdm(kClearKeyCdmBaseDirectory,
+ base::GetNativeLibraryName(kClearKeyCdmName));
}
TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) {

Powered by Google App Engine
This is Rietveld 408576698