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

Unified Diff: net/dns/dns_test_util.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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_test_util.h ('k') | net/dns/dns_transaction.h » ('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 6b2bdfb594957b55622655b45925600753aea189..de91048c9fe78a381e76fa4ec69be94bc4bafb1e 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -41,7 +41,7 @@ class MockTransaction : public DnsTransaction,
public:
MockTransaction(const MockDnsClientRuleList& rules,
const std::string& hostname,
- uint16 qtype,
+ uint16_t qtype,
const DnsTransactionFactory::CallbackType& callback)
: result_(MockDnsClientRule::FAIL),
hostname_(hostname),
@@ -64,7 +64,7 @@ class MockTransaction : public DnsTransaction,
const std::string& GetHostname() const override { return hostname_; }
- uint16 GetType() const override { return qtype_; }
+ uint16_t GetType() const override { return qtype_; }
void Start() override {
EXPECT_FALSE(started_);
@@ -102,10 +102,10 @@ class MockTransaction : public DnsTransaction,
header->flags |= dns_protocol::kFlagResponse;
if (MockDnsClientRule::OK == result_) {
- const uint16 kPointerToQueryName =
- static_cast<uint16>(0xc000 | sizeof(*header));
+ const uint16_t kPointerToQueryName =
+ static_cast<uint16_t>(0xc000 | sizeof(*header));
- const uint32 kTTL = 86400; // One day.
+ const uint32_t kTTL = 86400; // One day.
// Size of RDATA which is a IPv4 or IPv6 address.
size_t rdata_size = qtype_ == dns_protocol::kTypeA ? kIPv4AddressSize
@@ -122,7 +122,7 @@ class MockTransaction : public DnsTransaction,
writer.WriteU16(qtype_);
writer.WriteU16(dns_protocol::kClassIN);
writer.WriteU32(kTTL);
- writer.WriteU16(static_cast<uint16>(rdata_size));
+ writer.WriteU16(static_cast<uint16_t>(rdata_size));
if (qtype_ == dns_protocol::kTypeA) {
char kIPv4Loopback[] = { 0x7f, 0, 0, 1 };
writer.WriteBytes(kIPv4Loopback, sizeof(kIPv4Loopback));
@@ -150,7 +150,7 @@ class MockTransaction : public DnsTransaction,
MockDnsClientRule::Result result_;
const std::string hostname_;
- const uint16 qtype_;
+ const uint16_t qtype_;
DnsTransactionFactory::CallbackType callback_;
bool started_;
bool delayed_;
@@ -168,7 +168,7 @@ class MockTransactionFactory : public DnsTransactionFactory {
scoped_ptr<DnsTransaction> CreateTransaction(
const std::string& hostname,
- uint16 qtype,
+ uint16_t qtype,
const DnsTransactionFactory::CallbackType& callback,
const BoundNetLog&) override {
MockTransaction* transaction =
« no previous file with comments | « net/dns/dns_test_util.h ('k') | net/dns/dns_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698