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

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: Switch a few remaining call-sites. 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 9b1d07abee9cef0a478c351ffb0796a75d8b2e8d..3dcbe051f6ce86f1ec7efc9f3a9638c59215d64b 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));

Powered by Google App Engine
This is Rietveld 408576698