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

Unified Diff: net/socket/socks_client_socket.cc

Issue 9716020: Add base::HostToNetXX() & NetToHostXX(), and use them to replace htonX() & ntohX() in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 9 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 | « net/socket/socks5_client_socket_unittest.cc ('k') | net/socket/web_socket_server_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket.cc
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index 4c368c11e70686e361f3b28428fc4c6adc3d54fd..7da0601f211a473ce7c809f49dbf19ab675a826c 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/sys_byteorder.h"
#include "net/base/io_buffer.h"
#include "net/base/net_log.h"
#include "net/base/net_util.h"
@@ -297,7 +298,7 @@ const std::string SOCKSClientSocket::BuildHandshakeWriteBuffer() const {
SOCKS4ServerRequest request;
request.version = kSOCKSVersion4;
request.command = kSOCKSStreamRequest;
- request.nw_port = htons(host_request_info_.port());
+ request.nw_port = base::HostToNet16(host_request_info_.port());
const struct addrinfo* ai = addresses_.head();
DCHECK(ai);
« no previous file with comments | « net/socket/socks5_client_socket_unittest.cc ('k') | net/socket/web_socket_server_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698