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

Side by Side Diff: chrome/browser/load_library_perf_test.cc

Issue 772043004: Replace WIDEVINE_CDM_AVAILABLE with a gyp define 'enable_widevine_cdm'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix #endif Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_native_library.h" 8 #include "base/scoped_native_library.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Use the base name of the library to dynamically get the platform specific 46 // Use the base name of the library to dynamically get the platform specific
47 // name. See base::GetNativeLibraryName() for details. 47 // name. See base::GetNativeLibraryName() for details.
48 void MeasureSizeAndTimeToLoadNativeLibraryByBaseName( 48 void MeasureSizeAndTimeToLoadNativeLibraryByBaseName(
49 const std::string& base_library_name) { 49 const std::string& base_library_name) {
50 MeasureSizeAndTimeToLoadNativeLibrary(base::FilePath::FromUTF16Unsafe( 50 MeasureSizeAndTimeToLoadNativeLibrary(base::FilePath::FromUTF16Unsafe(
51 base::GetNativeLibraryName(base::ASCIIToUTF16(base_library_name)))); 51 base::GetNativeLibraryName(base::ASCIIToUTF16(base_library_name))));
52 } 52 }
53 53
54 #if defined(ENABLE_PEPPER_CDMS) 54 #if defined(ENABLE_PEPPER_CDMS)
55 #if defined(WIDEVINE_CDM_AVAILABLE) 55 #if defined(ENABLE_WIDEVINE_CDM)
56 TEST(LoadCDMPerfTest, Widevine) { 56 TEST(LoadCDMPerfTest, Widevine) {
57 MeasureSizeAndTimeToLoadNativeLibrary( 57 MeasureSizeAndTimeToLoadNativeLibrary(
58 base::FilePath::FromUTF8Unsafe(kWidevineCdmFileName)); 58 base::FilePath::FromUTF8Unsafe(kWidevineCdmFileName));
59 } 59 }
60 60
61 TEST(LoadCDMPerfTest, WidevineAdapter) { 61 TEST(LoadCDMPerfTest, WidevineAdapter) {
62 MeasureSizeAndTimeToLoadNativeLibrary( 62 MeasureSizeAndTimeToLoadNativeLibrary(
63 base::FilePath::FromUTF8Unsafe(kWidevineCdmAdapterFileName)); 63 base::FilePath::FromUTF8Unsafe(kWidevineCdmAdapterFileName));
64 } 64 }
65 #endif // defined(WIDEVINE_CDM_AVAILABLE) 65 #endif // defined(ENABLE_WIDEVINE_CDM)
66 66
67 TEST(LoadCDMPerfTest, ExternalClearKey) { 67 TEST(LoadCDMPerfTest, ExternalClearKey) {
68 #if defined(OS_MACOSX) 68 #if defined(OS_MACOSX)
69 MeasureSizeAndTimeToLoadNativeLibrary( 69 MeasureSizeAndTimeToLoadNativeLibrary(
70 base::FilePath::FromUTF8Unsafe("libclearkeycdm.dylib")); 70 base::FilePath::FromUTF8Unsafe("libclearkeycdm.dylib"));
71 #else 71 #else
72 MeasureSizeAndTimeToLoadNativeLibraryByBaseName("clearkeycdm"); 72 MeasureSizeAndTimeToLoadNativeLibraryByBaseName("clearkeycdm");
73 #endif // defined(OS_MACOSX) 73 #endif // defined(OS_MACOSX)
74 } 74 }
75 75
76 TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) { 76 TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) {
77 #if defined(OS_MACOSX) 77 #if defined(OS_MACOSX)
78 MeasureSizeAndTimeToLoadNativeLibrary( 78 MeasureSizeAndTimeToLoadNativeLibrary(
79 base::FilePath::FromUTF8Unsafe("clearkeycdmadapter.plugin")); 79 base::FilePath::FromUTF8Unsafe("clearkeycdmadapter.plugin"));
80 #else 80 #else
81 MeasureSizeAndTimeToLoadNativeLibraryByBaseName("clearkeycdmadapter"); 81 MeasureSizeAndTimeToLoadNativeLibraryByBaseName("clearkeycdmadapter");
82 #endif // defined(OS_MACOSX) 82 #endif // defined(OS_MACOSX)
83 } 83 }
84 #endif // defined(ENABLE_PEPPER_CDMS) 84 #endif // defined(ENABLE_PEPPER_CDMS)
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_browsertest.cc ('k') | chrome/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698