From 1ce7a71f486279fcd7186783058d82167d885b19 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Tue, 14 Jun 2011 20:07:12 +0000 Subject: Use base::win::GetVersion for Windows run-time version checks in preference to base::SysInfo::OperatingSystemVersionNumbers. The latter is just a harder-to-use wrapper around the former. BUG=86062 TEST=none Review URL: http://codereview.chromium.org/7150018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89055 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/tcp_client_socket_win.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'net') 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); -- cgit v1.1