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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Various nits Created 3 years, 7 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 | « content/common/sandbox_win.cc ('k') | device/gamepad/gamepad_platform_data_fetcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index ebd62ac5fcffc2316c9b62a79da6fa18e8ffc4b5..39c079dc7782312a28f6d9cca74665b08805f644 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -58,7 +58,6 @@
#if defined(OS_WIN)
#include "base/win/win_util.h"
-#include "base/win/windows_version.h"
#include "content/child/font_warmup_win.h"
#include "sandbox/win/src/sandbox.h"
#elif defined(OS_MACOSX)
@@ -75,10 +74,6 @@ const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll";
extern sandbox::TargetServices* g_target_services;
// Used by EnumSystemLocales for warming up.
-static BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) {
- return TRUE;
-}
-
static BOOL CALLBACK EnumLocalesProcEx(
LPWSTR lpLocaleString,
DWORD dwFlags,
@@ -91,21 +86,8 @@ static void WarmupWindowsLocales(const ppapi::PpapiPermissions& permissions) {
::GetUserDefaultLangID();
::GetUserDefaultLCID();
- if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
- if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- typedef BOOL (WINAPI *PfnEnumSystemLocalesEx)
- (LOCALE_ENUMPROCEX, DWORD, LPARAM, LPVOID);
-
- HMODULE handle_kern32 = GetModuleHandleW(L"Kernel32.dll");
- PfnEnumSystemLocalesEx enum_sys_locales_ex =
- reinterpret_cast<PfnEnumSystemLocalesEx>
- (GetProcAddress(handle_kern32, "EnumSystemLocalesEx"));
-
- enum_sys_locales_ex(EnumLocalesProcEx, LOCALE_WINDOWS, 0, 0);
- } else {
- EnumSystemLocalesW(EnumLocalesProc, LCID_INSTALLED);
- }
- }
+ if (permissions.HasPermission(ppapi::PERMISSION_FLASH))
+ ::EnumSystemLocalesEx(EnumLocalesProcEx, LOCALE_WINDOWS, 0, 0);
}
#endif
@@ -415,28 +397,22 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
// can be loaded. TODO(cpu): consider changing to the loading style of
// regular plugins.
if (g_target_services) {
- // Let Flash and Widevine CDM adapter load DXVA before lockdown on Vista+.
+ // Let Flash and Widevine CDM adapter load DXVA before lockdown.
if (permissions.HasPermission(ppapi::PERMISSION_FLASH) ||
path.BaseName().MaybeAsASCII() == kWidevineCdmAdapterFileName) {
- if (base::win::OSInfo::GetInstance()->version() >=
- base::win::VERSION_VISTA) {
- LoadLibraryA("dxva2.dll");
- }
+ LoadLibraryA("dxva2.dll");
}
if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
- if (base::win::OSInfo::GetInstance()->version() >=
- base::win::VERSION_WIN7) {
- base::CPU cpu;
- if (cpu.vendor_name() == "AuthenticAMD") {
- // The AMD crypto acceleration is only AMD Bulldozer and above.
+ base::CPU cpu;
+ if (cpu.vendor_name() == "AuthenticAMD") {
+ // The AMD crypto acceleration is only AMD Bulldozer and above.
#if defined(_WIN64)
- LoadLibraryA("amdhcp64.dll");
+ LoadLibraryA("amdhcp64.dll");
#else
- LoadLibraryA("amdhcp32.dll");
+ LoadLibraryA("amdhcp32.dll");
#endif
}
- }
}
// Cause advapi32 to load before the sandbox is turned on.
« no previous file with comments | « content/common/sandbox_win.cc ('k') | device/gamepad/gamepad_platform_data_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698