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

Unified Diff: jingle/notifier/base/chrome_async_socket_unittest.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
Index: jingle/notifier/base/chrome_async_socket_unittest.cc
diff --git a/jingle/notifier/base/chrome_async_socket_unittest.cc b/jingle/notifier/base/chrome_async_socket_unittest.cc
index 08dbf301a463065b7bab4bf9f923994f2c5528a6..a64e03f3268bb15bada44c0c1ac4caadb84a5214 100644
--- a/jingle/notifier/base/chrome_async_socket_unittest.cc
+++ b/jingle/notifier/base/chrome_async_socket_unittest.cc
@@ -101,7 +101,7 @@ class AsyncSocketDataProvider : public net::SocketDataProvider {
// Takes a 32-bit integer in host byte order and converts it to a
// net::IPAddressNumber.
net::IPAddressNumber Uint32ToIPAddressNumber(uint32 ip) {
- uint32 ip_nbo = htonl(ip);
+ uint32 ip_nbo = base::HostToNet32(ip);
const unsigned char* const ip_start =
reinterpret_cast<const unsigned char*>(&ip_nbo);
return net::IPAddressNumber(ip_start, ip_start + (sizeof ip_nbo));
« no previous file with comments | « crypto/symmetric_key_win.cc ('k') | native_client_sdk/src/build_tools/debug_server/debug_stub/transport_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698