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

Unified Diff: net/dns/dns_transaction_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: net/dns/dns_transaction_unittest.cc
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 063c6ea62b6b03b694a3ef6bd8585c663f6afe5e..182141f4aba36c97d54be6d1bd86ca8d234cce9c 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/rand_util.h"
+#include "base/sys_byteorder.h"
#include "base/test/test_timeouts.h"
#include "net/base/big_endian.h"
#include "net/base/dns_util.h"
@@ -281,7 +282,7 @@ class DnsTransactionTest : public testing::Test {
0);
dns_protocol::Header* header =
reinterpret_cast<dns_protocol::Header*>(response->io_buffer()->data());
- header->flags |= htons(dns_protocol::kFlagResponse | rcode);
+ header->flags |= base::HostToNet16(dns_protocol::kFlagResponse | rcode);
responses_.push_back(response);
writes_.push_back(MockWrite(ASYNC,
@@ -681,4 +682,3 @@ TEST_F(DnsTransactionTest, DontAppendToMultiLabelName) {
} // namespace
} // namespace net
-

Powered by Google App Engine
This is Rietveld 408576698