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

Unified Diff: net/socket/tcp_socket_win.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/tcp_socket_win.h ('k') | net/socket/transport_client_socket_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.cc
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index 028e830d290baf015e39fa8b26e73b247fa2b164..fdf1dfaa1c61e4dfbe5c2a8145a30e4eabf2b913 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -11,6 +11,7 @@
#include "base/callback_helpers.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/win/windows_version.h"
#include "net/base/address_list.h"
@@ -32,7 +33,7 @@ namespace {
const int kTCPKeepAliveSeconds = 45;
-int SetSocketReceiveBufferSize(SOCKET socket, int32 size) {
+int SetSocketReceiveBufferSize(SOCKET socket, int32_t size) {
int rv = setsockopt(socket, SOL_SOCKET, SO_RCVBUF,
reinterpret_cast<const char*>(&size), sizeof(size));
int net_error = (rv == 0) ? OK : MapSystemError(WSAGetLastError());
@@ -40,7 +41,7 @@ int SetSocketReceiveBufferSize(SOCKET socket, int32 size) {
return net_error;
}
-int SetSocketSendBufferSize(SOCKET socket, int32 size) {
+int SetSocketSendBufferSize(SOCKET socket, int32_t size) {
int rv = setsockopt(socket, SOL_SOCKET, SO_SNDBUF,
reinterpret_cast<const char*>(&size), sizeof(size));
int net_error = (rv == 0) ? OK : MapSystemError(WSAGetLastError());
@@ -590,7 +591,7 @@ void TCPSocketWin::SetDefaultOptionsForClient() {
// Since Vista's auto-tune is better than any static value we can could set,
// only change these on pre-vista machines.
if (base::win::GetVersion() < base::win::VERSION_VISTA) {
- const int32 kSocketBufferSize = 64 * 1024;
+ const int32_t kSocketBufferSize = 64 * 1024;
SetSocketReceiveBufferSize(socket_, kSocketBufferSize);
SetSocketSendBufferSize(socket_, kSocketBufferSize);
}
@@ -625,12 +626,12 @@ int TCPSocketWin::SetExclusiveAddrUse() {
return OK;
}
-int TCPSocketWin::SetReceiveBufferSize(int32 size) {
+int TCPSocketWin::SetReceiveBufferSize(int32_t size) {
DCHECK(CalledOnValidThread());
return SetSocketReceiveBufferSize(socket_, size);
}
-int TCPSocketWin::SetSendBufferSize(int32 size) {
+int TCPSocketWin::SetSendBufferSize(int32_t size) {
DCHECK(CalledOnValidThread());
return SetSocketSendBufferSize(socket_, size);
}
« no previous file with comments | « net/socket/tcp_socket_win.h ('k') | net/socket/transport_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698