diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc index 4c25e35aafa4e1..c1455b3fe5eb13 100644 --- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc +++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc @@ -26,7 +26,6 @@ #include "base/strings/string_util.h" #include "base/win/registry.h" #include "base/win/scoped_handle.h" -#include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "chrome/installer/launcher_support/chrome_launcher_support.h" #include "cloud_print/common/win/cloud_print_utils.h" @@ -113,11 +112,7 @@ base::FilePath GetLocalAppDataLow() { } base::FilePath GetAppDataDir() { - base::FilePath file_path; - if (base::win::GetVersion() >= base::win::VERSION_VISTA) - file_path = GetLocalAppDataLow(); - else - PathService::Get(base::DIR_LOCAL_APP_DATA, &file_path); + base::FilePath file_path = GetLocalAppDataLow(); if (file_path.empty()) { LOG(ERROR) << "Can't get app data dir"; } @@ -304,19 +299,15 @@ bool ValidateCurrentUser() { } base::win::ScopedHandle token_scoped(token); - if (base::win::GetVersion() >= base::win::VERSION_VISTA) { - DWORD session_id = 0; - DWORD dummy; - if (!GetTokenInformation(token_scoped.Get(), TokenSessionId, + DWORD session_id = 0; + DWORD dummy = 0; + if (!::GetTokenInformation(token_scoped.Get(), TokenSessionId, reinterpret_cast(&session_id), sizeof(DWORD), &dummy)) { - return false; - } - if (session_id == 0) { - return false; - } + return false; } - return true; + + return session_id != 0; } } // namespace diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc index 7307f6d260a4f6..fa9b38affffd9c 100644 --- a/gpu/config/gpu_info_collector_win.cc +++ b/gpu/config/gpu_info_collector_win.cc @@ -34,7 +34,6 @@ #include "base/trace_event/trace_event.h" #include "base/win/scoped_com_initializer.h" #include "base/win/scoped_comptr.h" -#include "base/win/windows_version.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_surface_egl.h" @@ -84,18 +83,8 @@ CollectInfoResult CollectDriverInfoD3D(const std::wstring& device_id, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; // create device info for the display device - HDEVINFO device_info; - if (base::win::GetVersion() <= base::win::VERSION_XP) { - // Collection of information on all adapters is much slower on XP (almost - // 100ms), and not very useful (as it's not going to use the GPU anyway), so - // just collect information on the current device. http://crbug.com/456178 - device_info = - SetupDiGetClassDevsW(NULL, device_id.c_str(), NULL, - DIGCF_PRESENT | DIGCF_PROFILE | DIGCF_ALLCLASSES); - } else { - device_info = - SetupDiGetClassDevsW(&display_class, NULL, NULL, DIGCF_PRESENT); - } + HDEVINFO device_info = + ::SetupDiGetClassDevs(&display_class, NULL, NULL, DIGCF_PRESENT); if (device_info == INVALID_HANDLE_VALUE) { LOG(ERROR) << "Creating device info failed"; return kCollectInfoNonFatalFailure; diff --git a/gpu/config/gpu_test_config.cc b/gpu/config/gpu_test_config.cc index d63e283a638718..f757f12625dd4e 100644 --- a/gpu/config/gpu_test_config.cc +++ b/gpu/config/gpu_test_config.cc @@ -302,12 +302,6 @@ bool GPUTestBotConfig::CurrentConfigMatches( // static bool GPUTestBotConfig::GpuBlacklistedOnBot() { -#if defined(OS_WIN) - // Blacklist rule #79 disables all Gpu acceleration before Windows 7. - if (base::win::GetVersion() <= base::win::VERSION_VISTA) { - return true; - } -#endif return false; } diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index 6b96668c5d3a9d..fa38c58d9f1389 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc @@ -122,13 +122,7 @@ static int NumberOfWaveOutBuffers() { return buffers; } - // Use 4 buffers for Vista, 3 for everyone else: - // - The entire Windows audio stack was rewritten for Windows Vista and wave - // out performance was degraded compared to XP. - // - The regression was fixed in Windows 7 and most configurations will work - // with 2, but some (e.g., some Sound Blasters) still need 3. - // - Some XP configurations (even multi-processor ones) also need 3. - return (base::win::GetVersion() == base::win::VERSION_VISTA) ? 4 : 3; + return 3; } AudioManagerWin::AudioManagerWin(std::unique_ptr audio_thread, diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc index 8231b11da90dd9..24f0793ce0b63f 100644 --- a/media/audio/win/audio_output_win_unittest.cc +++ b/media/audio/win/audio_output_win_unittest.cc @@ -17,7 +17,6 @@ #include "base/sync_socket.h" #include "base/time/time.h" #include "base/win/scoped_com_initializer.h" -#include "base/win/windows_version.h" #include "media/audio/audio_device_info_accessor_for_tests.h" #include "media/audio/audio_io.h" #include "media/audio/audio_manager.h" @@ -452,11 +451,9 @@ TEST_F(WinAudioTest, PCMWaveStreamPlay200HzToneLowLatency) { audio_manager_device_info_->GetDefaultOutputStreamParameters(); int sample_rate = params.sample_rate(); uint32_t samples_10_ms = sample_rate / 100; - int n = 1; - (base::win::GetVersion() <= base::win::VERSION_XP) ? n = 5 : n = 1; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, sample_rate, 16, n * samples_10_ms), + CHANNEL_LAYOUT_MONO, sample_rate, 16, samples_10_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc index 73edb83e7a9a70..b5871b814164d6 100644 --- a/media/audio/win/core_audio_util_win.cc +++ b/media/audio/win/core_audio_util_win.cc @@ -19,7 +19,6 @@ #include "base/win/scoped_handle.h" #include "base/win/scoped_propvariant.h" #include "base/win/scoped_variant.h" -#include "base/win/windows_version.h" #include "media/audio/audio_device_description.h" #include "media/base/media_switches.h" @@ -204,12 +203,6 @@ static bool IsSupportedInternal() { return false; } - // Microsoft does not plan to make the Core Audio APIs available for use - // with earlier versions of Windows, including Microsoft Windows Server 2003, - // Windows XP, Windows Millennium Edition, Windows 2000, and Windows 98. - if (base::win::GetVersion() < base::win::VERSION_VISTA) - return false; - // The audio core APIs are implemented in the Mmdevapi.dll and Audioses.dll // system components. // Dependency Walker shows that it is enough to verify possibility to load diff --git a/mojo/edk/embedder/platform_channel_pair_win.cc b/mojo/edk/embedder/platform_channel_pair_win.cc index f523ade3357651..342c2a61e14c9c 100644 --- a/mojo/edk/embedder/platform_channel_pair_win.cc +++ b/mojo/edk/embedder/platform_channel_pair_win.cc @@ -13,7 +13,6 @@ #include "base/rand_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" -#include "base/win/windows_version.h" #include "mojo/edk/embedder/platform_handle.h" namespace mojo { @@ -113,8 +112,7 @@ PlatformChannelPair::PrepareToPassClientHandleToChildProcessAsString( DCHECK(handle_passing_info); DCHECK(client_handle_.is_valid()); - if (base::win::GetVersion() >= base::win::VERSION_VISTA) - handle_passing_info->push_back(client_handle_.get().handle); + handle_passing_info->push_back(client_handle_.get().handle); return base::IntToString(HandleToLong(client_handle_.get().handle)); } diff --git a/mojo/edk/test/multiprocess_test_helper.cc b/mojo/edk/test/multiprocess_test_helper.cc index 5f020c2a796fe6..e7c0a1939d7376 100644 --- a/mojo/edk/test/multiprocess_test_helper.cc +++ b/mojo/edk/test/multiprocess_test_helper.cc @@ -33,9 +33,7 @@ #include "mojo/edk/embedder/platform_channel_pair.h" #include "testing/gtest/include/gtest/gtest.h" -#if defined(OS_WIN) -#include "base/win/windows_version.h" -#elif defined(OS_MACOSX) && !defined(OS_IOS) +#if defined(OS_MACOSX) && !defined(OS_IOS) #include "base/mac/mach_port_broker.h" #endif diff --git a/rlz/win/lib/process_info.cc b/rlz/win/lib/process_info.cc index 8bf09e1fe7ce50..dc85c8420eb8ce 100644 --- a/rlz/win/lib/process_info.cc +++ b/rlz/win/lib/process_info.cc @@ -25,9 +25,6 @@ HRESULT GetElevationType(PTOKEN_ELEVATION_TYPE elevation) { *elevation = TokenElevationTypeDefault; - if (base::win::GetVersion() < base::win::VERSION_VISTA) - return E_FAIL; - HANDLE process_token; if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &process_token)) return HRESULT_FROM_WIN32(GetLastError()); @@ -45,39 +42,6 @@ HRESULT GetElevationType(PTOKEN_ELEVATION_TYPE elevation) { return S_OK; } -// based on http://msdn2.microsoft.com/en-us/library/aa376389.aspx -bool GetUserGroup(long* group) { - if (!group) - return false; - - *group = 0; - - // groups are listed in DECREASING order of importance - // (eg. If a user is a member of both the admin group and - // the power user group, it is more useful to list the user - // as an admin) - DWORD user_groups[] = {DOMAIN_ALIAS_RID_ADMINS, - DOMAIN_ALIAS_RID_POWER_USERS}; - SID_IDENTIFIER_AUTHORITY nt_authority = {SECURITY_NT_AUTHORITY}; - - for (size_t i = 0; i < arraysize(user_groups) && *group == 0; ++i) { - PSID current_group; - if (AllocateAndInitializeSid(&nt_authority, 2, - SECURITY_BUILTIN_DOMAIN_RID, - user_groups[i], 0, 0, 0, 0, - 0, 0, ¤t_group)) { - BOOL current_level; - if (CheckTokenMembership(NULL, current_group, ¤t_level) && - current_level) { - *group = user_groups[i]; - } - - FreeSid(current_group); - } - } - - return group != 0; -} } //anonymous @@ -99,7 +63,7 @@ bool ProcessInfo::HasAdminRights() { if (!evaluated) { if (IsRunningAsSystem()) { has_rights = true; - } else if (base::win::GetVersion() >= base::win::VERSION_VISTA) { + } else { TOKEN_ELEVATION_TYPE elevation; if (SUCCEEDED(GetElevationType(&elevation))) { base::IntegrityLevel level = base::GetCurrentProcessIntegrityLevel(); @@ -108,10 +72,6 @@ bool ProcessInfo::HasAdminRights() { (level == base::HIGH_INTEGRITY); } } - } else { - long group = 0; - if (GetUserGroup(&group)) - has_rights = (group == DOMAIN_ALIAS_RID_ADMINS); } } diff --git a/rlz/win/lib/registry_util.cc b/rlz/win/lib/registry_util.cc index 8fba7dd47aa2f3..6feaea443f3a0c 100644 --- a/rlz/win/lib/registry_util.cc +++ b/rlz/win/lib/registry_util.cc @@ -58,9 +58,6 @@ bool HasUserKeyAccess(bool write_access) { } if (write_access) { - if (base::win::GetVersion() < base::win::VERSION_VISTA) - return true; - if (base::GetCurrentProcessIntegrityLevel() <= base::LOW_INTEGRITY) { ASSERT_STRING("UserKey::HasAccess: Cannot write from Low Integrity."); return false; diff --git a/services/device/battery/battery_status_manager_win.cc b/services/device/battery/battery_status_manager_win.cc index 252001f4cce8c4..2a46e5d91c3f2d 100644 --- a/services/device/battery/battery_status_manager_win.cc +++ b/services/device/battery/battery_status_manager_win.cc @@ -11,7 +11,6 @@ #include "base/metrics/histogram_macros.h" #include "base/strings/string16.h" #include "base/win/message_window.h" -#include "base/win/windows_version.h" #include "services/device/battery/battery_status_manager.h" namespace device { @@ -120,17 +119,11 @@ class BatteryStatusObserver { } HPOWERNOTIFY RegisterNotification(LPCGUID power_setting) { - if (base::win::GetVersion() < base::win::VERSION_VISTA) - return NULL; - return RegisterPowerSettingNotification(window_->hwnd(), power_setting, DEVICE_NOTIFY_WINDOW_HANDLE); } BOOL UnregisterNotification(HPOWERNOTIFY handle) { - if (base::win::GetVersion() < base::win::VERSION_VISTA) - return FALSE; - return UnregisterPowerSettingNotification(handle); }