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

Unified Diff: net/dns/host_resolver_impl_unittest.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/host_resolver_impl.cc ('k') | net/dns/host_resolver_mojo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl_unittest.cc
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index aa379a0399ad9d49a2c7d1b60e97f593f252f0a9..569d1ab8ad843efbb492cf27bc77879e88e41439 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -186,8 +187,9 @@ class MockHostResolverProc : public HostResolverProc {
DISALLOW_COPY_AND_ASSIGN(MockHostResolverProc);
};
-bool AddressListContains(const AddressList& list, const std::string& address,
- uint16 port) {
+bool AddressListContains(const AddressList& list,
+ const std::string& address,
+ uint16_t port) {
IPAddressNumber ip;
bool rv = ParseIPLiteralToNumber(address, &ip);
DCHECK(rv);
@@ -255,7 +257,7 @@ class Request {
bool completed() const { return result_ != ERR_IO_PENDING; }
bool pending() const { return handle_ != NULL; }
- bool HasAddress(const std::string& address, uint16 port) const {
+ bool HasAddress(const std::string& address, uint16_t port) const {
return AddressListContains(list_, address, port);
}
@@ -264,7 +266,7 @@ class Request {
return list_.size();
}
- bool HasOneAddress(const std::string& address, uint16 port) const {
+ bool HasOneAddress(const std::string& address, uint16_t port) const {
return HasAddress(address, port) && (NumberOfAddresses() == 1u);
}
@@ -1474,7 +1476,7 @@ class HostResolverImplDnsTest : public HostResolverImplTest {
// Adds a rule to |dns_rules_|. Must be followed by |CreateResolver| to apply.
void AddDnsRule(const std::string& prefix,
- uint16 qtype,
+ uint16_t qtype,
MockDnsClientRule::Result result,
bool delay) {
dns_rules_.push_back(MockDnsClientRule(prefix, qtype, result, delay));
« no previous file with comments | « net/dns/host_resolver_impl.cc ('k') | net/dns/host_resolver_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698