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

Unified Diff: net/http/http_network_transaction.cc

Issue 125107: * Move the global "DnsResolutionObserver" code depended on by DNS prefetcher,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 11 years, 6 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 | « net/ftp/ftp_network_transaction.cc ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 18360)
+++ net/http/http_network_transaction.cc (working copy)
@@ -570,7 +570,26 @@
connection_group.append(request_->url.GetOrigin().spec());
DCHECK(!connection_group.empty());
- int rv = connection_.Init(connection_group, host, port, request_->priority,
+
+ HostResolver::RequestInfo resolve_info(host, port);
+
+ // The referrer is used by the DNS prefetch system to corellate resolutions
+ // with the page that triggered them. It doesn't impact the actual addresses
+ // that we resolve to.
+ resolve_info.set_referrer(request_->referrer);
+
+// TODO(eroman): Enable this!
+// Needs some unit-tests before turning on.
+// http://crbug.com/13163
+#if 0
+ // If the user is refreshing the page, bypass the host cache.
+ if (request_->load_flags & LOAD_BYPASS_CACHE ||
+ request_->load_flags & LOAD_DISABLE_CACHE) {
+ resolve_info.allow_cached_response = false;
+ }
+#endif
+
+ int rv = connection_.Init(connection_group, resolve_info, request_->priority,
&io_callback_);
return rv;
}
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698