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

Unified Diff: net/dns/host_resolver_impl_unittest.cc

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 3 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/host_resolver_impl_unittest.cc
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 099d60dfb27283e0894a29244c50da423313dc1b..fa5258a029fc1cffc7155bbd52e3120c2024246b 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -235,7 +235,7 @@ class Request {
result_ = resolver_->Resolve(
info_, priority_, &list_,
base::Bind(&Request::OnComplete, base::Unretained(this)), &request_,
- BoundNetLog());
+ NetLogWithSource());
if (!list_.empty())
EXPECT_THAT(result_, IsOk());
return result_;
@@ -244,14 +244,14 @@ class Request {
int ResolveFromCache() {
DCHECK(resolver_);
DCHECK(!request_);
- return resolver_->ResolveFromCache(info_, &list_, BoundNetLog());
+ return resolver_->ResolveFromCache(info_, &list_, NetLogWithSource());
}
int ResolveStaleFromCache() {
DCHECK(resolver_);
DCHECK(!request_);
return resolver_->ResolveStaleFromCache(info_, &list_, &staleness_,
- BoundNetLog());
+ NetLogWithSource());
}
void ChangePriority(RequestPriority priority) {
@@ -461,7 +461,7 @@ class TestHostResolverImpl : public HostResolverImpl {
private:
const bool ipv6_reachable_;
- bool IsIPv6Reachable(const BoundNetLog& net_log) override {
+ bool IsIPv6Reachable(const NetLogWithSource& net_log) override {
return ipv6_reachable_;
}
};
@@ -612,7 +612,7 @@ class HostResolverImplTest : public testing::Test {
return HostResolverImpl::kMaximumDnsFailures;
}
- bool IsIPv6Reachable(const BoundNetLog& net_log) {
+ bool IsIPv6Reachable(const NetLogWithSource& net_log) {
return resolver_->IsIPv6Reachable(net_log);
}
@@ -1536,16 +1536,16 @@ TEST_F(HostResolverImplTest, IsIPv6Reachable) {
resolver_.reset(new HostResolverImpl(DefaultOptions(), nullptr));
// Verify that two consecutive calls return the same value.
- TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::NONE);
- bool result1 = IsIPv6Reachable(bound_net_log);
- bool result2 = IsIPv6Reachable(bound_net_log);
+ TestNetLog test_net_log;
+ NetLogWithSource net_log =
+ NetLogWithSource::Make(&test_net_log, NetLogSourceType::NONE);
+ bool result1 = IsIPv6Reachable(net_log);
+ bool result2 = IsIPv6Reachable(net_log);
EXPECT_EQ(result1, result2);
// Filter reachability check events and verify that there are two of them.
TestNetLogEntry::List event_list;
- net_log.GetEntries(&event_list);
+ test_net_log.GetEntries(&event_list);
TestNetLogEntry::List probe_event_list;
for (const auto& event : event_list) {
if (event.type ==

Powered by Google App Engine
This is Rietveld 408576698