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

Unified Diff: net/socket/web_socket_server_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/socks_client_socket.cc ('k') | ppapi/shared_impl/private/net_address_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/web_socket_server_socket.cc
diff --git a/net/socket/web_socket_server_socket.cc b/net/socket/web_socket_server_socket.cc
index c3164159b916ebba31c5c9257340fc98a56c69c5..e8cb8865b2beddda69f8fe3eafd7831df1b23c19 100644
--- a/net/socket/web_socket_server_socket.cc
+++ b/net/socket/web_socket_server_socket.cc
@@ -689,8 +689,8 @@ class WebSocketServerSocketImpl : public net::WebSocketServerSocket {
}
char challenge[4 + 4 + sizeof(key3)];
- int32 part1 = htonl(key_number1 / spaces1);
- int32 part2 = htonl(key_number2 / spaces2);
+ int32 part1 = base::HostToNet32(key_number1 / spaces1);
+ int32 part2 = base::HostToNet32(key_number2 / spaces2);
memcpy(challenge, &part1, 4);
memcpy(challenge + 4, &part2, 4);
memcpy(challenge + 4 + 4, key3, sizeof(key3));
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | ppapi/shared_impl/private/net_address_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698