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

Unified Diff: net/dns/dns_test_util.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_response.cc ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_test_util.cc
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index a3c26cfbdf83b3c10cb732390864d55c9cd59b88..0cbdf948ca9e3d69e43d4bc423272be28653fbd0 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -86,7 +86,8 @@ class MockTransaction : public DnsTransaction,
size_t answer_size = 12 + rdata_size;
// Write answer with loopback IP address.
- reinterpret_cast<dns_protocol::Header*>(buffer)->ancount = htons(1);
+ reinterpret_cast<dns_protocol::Header*>(buffer)->ancount =
+ base::HostToNet16(1);
BigEndianWriter writer(buffer + nbytes, answer_size);
writer.WriteU16(kPointerToQueryName);
writer.WriteU16(qtype_);
@@ -167,4 +168,3 @@ void MockDnsConfigService::Watch(const CallbackType& callback) {
}
} // namespace net
-
« no previous file with comments | « net/dns/dns_response.cc ('k') | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698