diff options
-rw-r--r-- | chrome/browser/fullscreen_win.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/localized_error.cc | 13 | ||||
-rw-r--r-- | chrome_frame/dll_redirector.cc | 9 | ||||
-rw-r--r-- | chrome_frame/test/dll_redirector_test.cc | 14 | ||||
-rw-r--r-- | net/socket/tcp_client_socket_win.cc | 7 |
5 files changed, 16 insertions, 35 deletions
diff --git a/chrome/browser/fullscreen_win.cc b/chrome/browser/fullscreen_win.cc index ac50ed4..7546b2d 100644 --- a/chrome/browser/fullscreen_win.cc +++ b/chrome/browser/fullscreen_win.cc @@ -8,16 +8,12 @@ #include <shellapi.h> #include "base/logging.h" -#include "base/sys_info.h" +#include "base/win/windows_version.h" static bool IsPlatformFullScreenMode() { // SHQueryUserNotificationState is only available for Vista and above. #if defined(NTDDI_VERSION) && (NTDDI_VERSION >= NTDDI_VISTA) - int32 major_version, minor_version, fix_version; - base::SysInfo::OperatingSystemVersionNumbers(&major_version, - &minor_version, - &fix_version); - if (major_version < 6) + if (base::win::GetVersion() < base::win::VERSION_VISTA) return false; typedef HRESULT(WINAPI *SHQueryUserNotificationStatePtr)( diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc index ac63d49..3476505 100644 --- a/chrome/renderer/localized_error.cc +++ b/chrome/renderer/localized_error.cc @@ -8,7 +8,6 @@ #include "base/logging.h" #include "base/string16.h" #include "base/string_number_conversions.h" -#include "base/sys_info.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension_set.h" @@ -21,6 +20,10 @@ #include "ui/base/l10n/l10n_util.h" #include "webkit/glue/webkit_glue.h" +#if defined(OS_WIN) +#include "base/win/windows_version.h" +#endif + using WebKit::WebURLError; namespace { @@ -442,14 +445,12 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error, IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM; #if defined(OS_WIN) // Different versions of Windows have different instructions. - int32 major_version, minor_version, bugfix_version; - base::SysInfo::OperatingSystemVersionNumbers( - &major_version, &minor_version, &bugfix_version); - if (major_version < 6) { + base::win::Version windows_version = base::win::GetVersion(); + if (windows_version < base::win::VERSION_VISTA) { // XP, XP64, and Server 2003. platform_string_id = IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_XP; - } else if (major_version == 6 && minor_version == 0) { + } else if (windows_version == base::win::VERSION_VISTA) { // Vista platform_string_id = IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_VISTA; diff --git a/chrome_frame/dll_redirector.cc b/chrome_frame/dll_redirector.cc index f03c124..dfb837b 100644 --- a/chrome_frame/dll_redirector.cc +++ b/chrome_frame/dll_redirector.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -15,7 +15,6 @@ #include "base/path_service.h" #include "base/shared_memory.h" #include "base/string_util.h" -#include "base/sys_info.h" #include "base/utf_string_conversions.h" #include "base/version.h" #include "base/win/windows_version.h" @@ -57,11 +56,7 @@ DllRedirector* DllRedirector::GetInstance() { bool DllRedirector::BuildSecurityAttributesForLock( CSecurityAttributes* sec_attr) { DCHECK(sec_attr); - int32 major_version, minor_version, fix_version; - base::SysInfo::OperatingSystemVersionNumbers(&major_version, - &minor_version, - &fix_version); - if (major_version < 6) { + if (base::win::GetVersion() < base::win::VERSION_VISTA) { // Don't bother with changing ACLs on pre-vista. return false; } diff --git a/chrome_frame/test/dll_redirector_test.cc b/chrome_frame/test/dll_redirector_test.cc index 13959dc..cfa9349 100644 --- a/chrome_frame/test/dll_redirector_test.cc +++ b/chrome_frame/test/dll_redirector_test.cc @@ -5,10 +5,10 @@ #include "chrome_frame/dll_redirector.h" #include "base/shared_memory.h" -#include "base/sys_info.h" #include "base/utf_string_conversions.h" #include "base/version.h" #include "base/win/scoped_handle.h" +#include "base/win/windows_version.h" #include "chrome_frame/test/chrome_frame_test_utils.h" #include "gtest/gtest.h" @@ -329,11 +329,7 @@ TEST_F(DllRedirectorTest, LowIntegrityAccess) { shared_memory.Unlock(); } - int32 major_version, minor_version, fix_version; - base::SysInfo::OperatingSystemVersionNumbers(&major_version, - &minor_version, - &fix_version); - if (major_version >= 6) { + if (base::win::GetVersion() >= base::win::VERSION_VISTA) { // Now move to low integrity chrome_frame_test::LowIntegrityToken low_integrity_token; ASSERT_TRUE(low_integrity_token.Impersonate()); @@ -375,11 +371,7 @@ TEST_F(DllRedirectorTest, LowIntegrityAccessDenied) { shared_memory.Unlock(); } - int32 major_version, minor_version, fix_version; - base::SysInfo::OperatingSystemVersionNumbers(&major_version, - &minor_version, - &fix_version); - if (major_version >= 6) { + if (base::win::GetVersion() >= base::win::VERSION_VISTA) { // Now move to low integrity chrome_frame_test::LowIntegrityToken low_integrity_token; low_integrity_token.Impersonate(); diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc index 6ebda1a..71187a1 100644 --- a/net/socket/tcp_client_socket_win.cc +++ b/net/socket/tcp_client_socket_win.cc @@ -11,8 +11,8 @@ #include "base/memory/memory_debug.h" #include "base/metrics/stats_counters.h" #include "base/string_util.h" -#include "base/sys_info.h" #include "base/win/object_watcher.h" +#include "base/win/windows_version.h" #include "net/base/address_list_net_log_param.h" #include "net/base/connection_type_histograms.h" #include "net/base/io_buffer.h" @@ -56,10 +56,7 @@ int SetupSocket(SOCKET socket) { // http://blogs.msdn.com/wndp/archive/2006/05/05/Winhec-blog-tcpip-2.aspx // Since Vista's auto-tune is better than any static value we can could set, // only change these on pre-vista machines. - int32 major_version, minor_version, fix_version; - base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version, - &fix_version); - if (major_version < 6) { + if (base::win::GetVersion() < base::win::VERSION_VISTA) { const int32 kSocketBufferSize = 64 * 1024; SetSocketReceiveBufferSize(socket, kSocketBufferSize); SetSocketSendBufferSize(socket, kSocketBufferSize); |