/aosp_15_r20/external/cronet/net/dns/ |
H A D | host_cache_unittest.cc | 61 HostCache::Key Key(const std::string& hostname) { in Key() 62 return HostCache::Key(url::SchemeHostPort(url::kHttpsScheme, hostname, 443), in Key() 71 class MockPersistenceDelegate : public HostCache::PersistenceDelegate { 106 HostCache cache(kMaxCacheEntries); in TEST() 111 HostCache::Key key1 = Key("foobar.com"); in TEST() 112 HostCache::Key key2 = Key("foobar2.com"); in TEST() 113 HostCache::Entry entry = in TEST() 114 HostCache::Entry(OK, /*ip_endpoints=*/{}, /*aliases=*/{"foobar.com"}, in TEST() 115 HostCache::Entry::SOURCE_UNKNOWN); in TEST() 169 HostCache::Entry entry(OK, ip_endpoints, /*aliases=*/{}, in TEST() [all …]
|
H A D | host_cache.cc | 210 enum HostCache::SetOutcome : int { 218 enum HostCache::LookupOutcome : int { 227 enum HostCache::EraseReason : int { 234 HostCache::Key::Key(absl::variant<url::SchemeHostPort, std::string> host, in Key() 249 HostCache::Key::Key() = default; 250 HostCache::Key::Key(const Key& key) = default; 251 HostCache::Key::Key(Key&& key) = default; 253 HostCache::Key::~Key() = default; 255 HostCache::Entry::Entry(int error, in Entry() 267 HostCache::Entry::HttpsRecordPriority>::value, in Entry() [all …]
|
H A D | host_resolver_mdns_task.cc | 28 HostCache::Entry ParseHostnameResult(const std::string& host, uint16_t port) { in ParseHostnameResult() 32 return HostCache::Entry(ERR_NAME_NOT_RESOLVED, in ParseHostnameResult() 33 HostCache::Entry::SOURCE_UNKNOWN); in ParseHostnameResult() 35 return HostCache::Entry(OK, in ParseHostnameResult() 37 HostCache::Entry::SOURCE_UNKNOWN); in ParseHostnameResult() 45 results_(ERR_IO_PENDING, HostCache::Entry::SOURCE_UNKNOWN), in Transaction() 81 const HostCache::Entry& results() const { return results_; } in results() 87 results_ = HostCache::Entry(ERR_FAILED, HostCache::Entry::SOURCE_UNKNOWN); in Cancel() 123 HostCache::Entry results_; 169 HostCache::Entry HostResolverMdnsTask::GetResults() const { in GetResults() [all …]
|
H A D | host_cache.h | 54 class NET_EXPORT HostCache { 266 HostCache::Entry CopyWithDefaultPort(uint16_t port) const; 276 friend class HostCache; variable 396 static const HostCache::EntryStaleness kNotStale; 399 explicit HostCache(size_t max_entries); 401 HostCache(const HostCache&) = delete; 402 HostCache& operator=(const HostCache&) = delete; 404 ~HostCache(); 437 const HostCache::Key* GetMatchingKeyForTesting( 439 HostCache::Entry::Source* source_out = nullptr, [all …]
|
H A D | host_resolver_manager.h | 338 HostCache::Entry ResolveLocally( 346 HostCache* cache, 348 std::optional<HostCache::EntryStaleness>* out_stale_info); 359 HostCache* host_cache, 371 HostCache::Entry ResolveAsIP(DnsQueryTypeSet query_types, 379 std::optional<HostCache::Entry> MaybeServeFromCache( 380 HostCache* cache, 381 const HostCache::Key& key, 385 std::optional<HostCache::EntryStaleness>* out_stale_info); 389 std::optional<HostCache::Entry> MaybeReadFromConfig(const JobKey& key); [all …]
|
H A D | host_resolver_manager.cc | 250 base::Value::Dict NetLogResults(const HostCache::Entry& results) { in NetLogResults() 761 HostCache::Entry HostResolverManager::ResolveLocally( in ResolveLocally() 769 HostCache* cache, in ResolveLocally() 771 std::optional<HostCache::EntryStaleness>* out_stale_info) { in ResolveLocally() 787 return HostCache::Entry(ERR_NAME_NOT_RESOLVED, in ResolveLocally() 788 HostCache::Entry::SOURCE_UNKNOWN); in ResolveLocally() 801 return HostCache::Entry(ERR_NAME_NOT_RESOLVED, in ResolveLocally() 802 HostCache::Entry::SOURCE_UNKNOWN); in ResolveLocally() 811 return HostCache::Entry(ERR_DNS_CACHE_MISS, in ResolveLocally() 812 HostCache::Entry::SOURCE_UNKNOWN); in ResolveLocally() [all …]
|
H A D | host_resolver_manager_job.h | 57 HostCache::Key ToCacheKey(bool secure) const; 73 HostCache* host_cache, 233 const HostCache::Entry& failure_results, 238 HostCache::Entry results, 255 void RecordJobHistograms(const HostCache::Entry& results, 258 void MaybeCacheResult(const HostCache::Entry& results, 267 void CompleteRequests(const HostCache::Entry& results, 274 const HostCache::Entry& results, 275 std::optional<HostCache::EntryStaleness> stale_info, 293 const raw_ptr<HostCache> host_cache_; [all …]
|
H A D | host_resolver_manager_job.cc | 119 HostCache::Key HostResolverManager::JobKey::ToCacheKey(bool secure) const { in ToCacheKey() 138 HostCache::Key key(std::move(host_for_cache), query_type_for_key, flags, in ToCacheKey() 153 HostCache* host_cache, in Job() 359 std::optional<HostCache::Entry> results = resolver_->ServeFromHosts( in ServeFromHosts() 652 HostCache::Entry( in OnSystemTaskComplete() 655 std::move(aliases), HostCache::Entry::SOURCE_UNKNOWN), in OnSystemTaskComplete() 663 std::optional<HostCache::EntryStaleness> stale_info; in InsecureCacheLookup() 664 std::optional<HostCache::Entry> resolved = resolver_->MaybeServeFromCache( in InsecureCacheLookup() 722 const HostCache::Entry& failure_results, in OnDnsTaskFailure() 757 HostCache::Entry results, in OnDnsTaskComplete() [all …]
|
H A D | mock_host_resolver.cc | 86 std::optional<HostCache::Entry> CreateCacheEntry( in CreateCacheEntry() 109 auto endpoint_entry = HostCache::Entry(OK, *ip_endpoints, aliases, in CreateCacheEntry() 110 HostCache::Entry::SOURCE_UNKNOWN); in CreateCacheEntry() 115 return HostCache::Entry::MergeEntries( in CreateCacheEntry() 116 HostCache::Entry(OK, std::move(endpoint_metadatas), in CreateCacheEntry() 117 HostCache::Entry::SOURCE_UNKNOWN), in CreateCacheEntry() 225 const std::optional<HostCache::EntryStaleness>& GetStaleInfo() in GetStaleInfo() 247 std::optional<HostCache::EntryStaleness> staleness) { in SetEndpointResults() 352 std::optional<HostCache::EntryStaleness> staleness_; 750 HostCache* MockHostResolverBase::GetHostCache() { in GetHostCache() [all …]
|
H A D | host_resolver_nat64_task.h | 23 class HostCache; variable 47 HostCache::Entry GetResults() const; 77 HostCache::Entry results_ = 78 HostCache::Entry(ERR_FAILED, HostCache::Entry::SOURCE_UNKNOWN);
|
H A D | host_resolver_manager_request_impl.h | 74 const std::optional<HostCache::EntryStaleness>& GetStaleInfo() const override; 77 void set_results(HostCache::Entry results); 79 void set_stale_info(HostCache::EntryStaleness stale_info); 111 HostCache* host_cache() const { in host_cache() 175 std::optional<HostCache::Entry> results_; 176 std::optional<HostCache::EntryStaleness> stale_info_;
|
H A D | host_resolver_dns_task.cc | 55 const HostCache::Entry* saved_results) { in NetLogDnsTaskFailedParams() 71 base::Value::Dict NetLogResults(const HostCache::Entry& results) { in NetLogResults() 728 HostCache::Entry::TtlFromInternalResults( in HandleTransactionResults() 752 HostCache::Entry::TtlFromInternalResults( in HandleTransactionResults() 760 HostCache::Entry legacy_results(transaction_results, base::Time::Now(), in HandleTransactionResults() 762 HostCache::Entry::SOURCE_DNS); in HandleTransactionResults() 778 legacy_results = HostCache::Entry::MergeEntries( in HandleTransactionResults() 784 legacy_results = HostCache::Entry::MergeEntries( in HandleTransactionResults() 789 legacy_results = HostCache::Entry::MergeEntries( in HandleTransactionResults() 815 HostCache::Entry results = std::move(*saved_results_); in OnTransactionsFinished() [all …]
|
H A D | host_resolver_nat64_task.cc | 58 HostCache::Entry HostResolverNat64Task::GetResults() const { in GetResults() 117 HostCache::Entry(OK, {IPEndPoint(ipv4_address, 0)}, std::move(aliases), in DoResolveComplete() 118 HostCache::Entry::SOURCE_UNKNOWN); in DoResolveComplete() 158 results_ = HostCache::Entry(OK, converted_addresses, std::move(aliases), in DoSynthesizeToIpv6() 159 HostCache::Entry::SOURCE_UNKNOWN); in DoSynthesizeToIpv6()
|
H A D | host_resolver_manager_unittest.h | 102 void PopulateCache(const HostCache::Key& key, IPEndPoint endpoint); 104 const std::pair<const HostCache::Key, HostCache::Entry>* GetCacheHit( 105 const HostCache::Key& key);
|
H A D | host_resolver_manager_unittest.cc | 511 void HostResolverManagerTest::PopulateCache(const HostCache::Key& key, in PopulateCache() 514 HostCache::Entry(OK, {endpoint}, /*aliases=*/{}, in PopulateCache() 515 HostCache::Entry::SOURCE_UNKNOWN), in PopulateCache() 519 const std::pair<const HostCache::Key, HostCache::Entry>* 520 HostResolverManagerTest::GetCacheHit(const HostCache::Key& key) { in GetCacheHit() 559 const std::pair<const HostCache::Key, HostCache::Entry>* cache_result = in TEST_F() 560 GetCacheHit(HostCache::Key("just.testing", DnsQueryType::UNSPECIFIED, in TEST_F() 588 const std::pair<const HostCache::Key, HostCache::Entry>* cache_result = in TEST_F() 590 HostCache::Key(url::SchemeHostPort(url::kHttpScheme, "host.test", 80), in TEST_F() 822 const std::pair<const HostCache::Key, HostCache::Entry>* cache_result = in TEST_F() [all …]
|
H A D | host_resolver_dns_task.h | 68 HostCache::Entry results, 190 HostCache::Entry results, 205 void OnSuccess(HostCache::Entry results); 243 std::optional<HostCache::Entry> saved_results_;
|
H A D | host_resolver_manager_service_endpoint_request_impl.cc | 87 std::optional<HostCache::EntryStaleness> stale_info; in Start() 89 HostCache::Entry results = manager_->ResolveLocally( in Start() 160 const HostCache::Entry& results, in OnJobCompleted() 217 SetFinalizedResultFromLegacyResults(const HostCache::Entry& results) { in SetFinalizedResultFromLegacyResults()
|
H A D | host_resolver_manager_request_impl.cc | 153 const std::optional<HostCache::EntryStaleness>& 169 void HostResolverManager::RequestImpl::set_results(HostCache::Entry results) { in set_results() 187 HostCache::EntryStaleness stale_info) { in set_stale_info() 332 std::optional<HostCache::EntryStaleness> stale_info; in DoResolveLocally() 333 HostCache::Entry results = resolver_->ResolveLocally( in DoResolveLocally()
|
H A D | host_resolver_manager_service_endpoint_request_impl.h | 57 void OnJobCompleted(const HostCache::Entry& results, bool obtained_securely); 68 HostCache* host_cache() const { in host_cache() 75 void SetFinalizedResultFromLegacyResults(const HostCache::Entry& results);
|
H A D | resolve_context.h | 32 class HostCache; variable 183 HostCache* host_cache() { return host_cache_.get(); } in host_cache() 305 std::unique_ptr<HostCache> host_cache_;
|
H A D | mock_host_resolver.h | 49 class HostCache; variable 299 HostCache* GetHostCache() override; 433 std::optional<HostCache::EntryStaleness>* out_stale_info); 446 std::unique_ptr<HostCache> cache_; 449 std::map<HostCache::Key, int> cache_invalidation_nums_;
|
/aosp_15_r20/external/cronet/components/cronet/ |
H A D | host_cache_persistence_manager_unittest.cc | 25 cache_ = std::make_unique<net::HostCache>(/*max_entries=*/1000); in SetUp() 40 net::HostCache::Key key(host, net::DnsQueryType::UNSPECIFIED, 0, in WriteToCache() 43 net::HostCache::Entry entry(net::OK, /*ip_endpoints=*/{}, /*aliases=*/{}, in WriteToCache() 44 net::HostCache::Entry::SOURCE_UNKNOWN); in WriteToCache() 55 net::HostCache temp_cache(10); in CheckPref() 64 net::HostCache temp_cache(10); in InitializePref() 66 net::HostCache::Key key1("1.test", net::DnsQueryType::UNSPECIFIED, 0, in InitializePref() 69 net::HostCache::Key key2("2.test", net::DnsQueryType::UNSPECIFIED, 0, in InitializePref() 72 net::HostCache::Key key3("3.test", net::DnsQueryType::UNSPECIFIED, 0, in InitializePref() 75 net::HostCache::Entry entry(net::OK, /*ip_endpoints=*/{}, /*aliases=*/{}, in InitializePref() [all …]
|
H A D | host_cache_persistence_manager.h | 36 class HostCachePersistenceManager : public net::HostCache::PersistenceDelegate { 45 HostCachePersistenceManager(net::HostCache* cache, 66 const raw_ptr<net::HostCache> cache_;
|
H A D | stale_host_resolver.cc | 56 const std::optional<net::HostCache::EntryStaleness>& GetStaleInfo() 237 const std::optional<net::HostCache::EntryStaleness>& 284 const net::HostCache::EntryStaleness& staleness = in CacheDataIsUsable() 377 net::HostCache* StaleHostResolver::GetHostCache() { in GetHostCache()
|
/aosp_15_r20/external/cronet/components/cronet/android/test/ |
H A D | experimental_options_test.cc | 34 net::HostCache* cache = context->host_resolver()->GetHostCache(); in WriteToHostCacheOnNetworkThread() 39 net::HostCache::Key key1(hostname, net::DnsQueryType::UNSPECIFIED, 0, in WriteToHostCacheOnNetworkThread() 42 net::HostCache::Key key2(hostname, net::DnsQueryType::A, in WriteToHostCacheOnNetworkThread() 49 net::HostCache::Entry entry(net::OK, {{address, 0}}, /*aliases=*/{hostname}, in WriteToHostCacheOnNetworkThread() 50 net::HostCache::Entry::SOURCE_UNKNOWN); in WriteToHostCacheOnNetworkThread()
|