Commit ea69a2c9 authored by Rob Percival's avatar Rob Percival Committed by Commit Bot

Remove a CHECK from single_tree_tracker_unittest.cc

CHECK should not be used in tests. This test uses a net::MockCachingHostResolver, so the HostCache
argument that was being checked should never be null.

Change-Id: Ibaa7051c404037089fb010a0ed11ee8775c70277
Reviewed-on: https://chromium-review.googlesource.com/823962Reviewed-by: default avatarRyan Sleevi <rsleevi@chromium.org>
Commit-Queue: Rob Percival <robpercival@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523779}
parent 578968d4
......@@ -174,10 +174,9 @@ void AddCacheEntry(net::HostCache* cache,
const std::string& hostname,
net::HostCache::Entry::Source source,
base::TimeDelta ttl) {
CHECK(cache);
const net::HostCache::Key key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0);
const net::HostCache::Entry entry(net::OK, net::AddressList(), source);
cache->Set(key, entry, base::TimeTicks::Now(), ttl);
cache->Set(net::HostCache::Key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0),
net::HostCache::Entry(net::OK, net::AddressList(), source),
base::TimeTicks::Now(), ttl);
}
} // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment