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

Unified Diff: net/server/web_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/dns/dns_transaction_unittest.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/web_socket.cc
diff --git a/net/server/web_socket.cc b/net/server/web_socket.cc
index 0abbcf774f2a11f610a15fb5300d4fb28438103b..12796fa40e4c384f33023752933097b5430c9143 100644
--- a/net/server/web_socket.cc
+++ b/net/server/web_socket.cc
@@ -37,7 +37,7 @@ static uint32 WebSocketKeyFingerprint(const std::string& str) {
int64 number = 0;
if (!base::StringToInt64(result, &number))
return 0;
- return htonl(static_cast<uint32>(number / spaces));
+ return base::HostToNet32(static_cast<uint32>(number / spaces));
}
class WebSocketHixie76 : public net::WebSocket {
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698