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

Unified Diff: chrome/browser/io_thread.cc

Issue 2298173002: Implement host-based deletion for the hostname resolution cache. (Closed)
Patch Set: Take TimeTicks::Now() out of the loop Created 4 years, 4 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 050589af94573b04148dd6139778dfd2247224f5..afc1806c8c142127bd2b68a4460cc11ef57d7555 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -748,12 +748,13 @@ void IOThread::CreateDefaultAuthHandlerFactory() {
globals_->http_auth_preferences.get(), globals_->host_resolver.get());
}
-void IOThread::ClearHostCache() {
+void IOThread::ClearHostCache(
+ const base::Callback<bool(const std::string&)>& host_filter) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
net::HostCache* host_cache = globals_->host_resolver->GetHostCache();
if (host_cache)
- host_cache->clear();
+ host_cache->ClearForHosts(host_filter);
}
const net::HttpNetworkSession::Params& IOThread::NetworkSessionParams() const {
@@ -773,7 +774,7 @@ void IOThread::ChangedToOnTheRecordOnIOThread() {
// Clear the host cache to avoid showing entries from the OTR session
// in about:net-internals.
- ClearHostCache();
+ ClearHostCache(base::Callback<bool(const std::string&)>());
}
void IOThread::InitSystemRequestContext() {
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698