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

Unified Diff: chrome/browser/net/predictor.h

Issue 3050040: Reland 54771 (and 54795) To enable TCP Preconnection by default... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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/net/preconnect.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.h
===================================================================
--- chrome/browser/net/predictor.h (revision 55108)
+++ chrome/browser/net/predictor.h (working copy)
@@ -83,8 +83,11 @@
void Resolve(const GURL& url,
UrlInfo::ResolutionMotivation motivation);
- // Instigate pre-connection to any URLs we predict will be needed after this
- // navigation (typically more-embedded resources on a page).
+ // Instigate pre-connection to any URLs, or pre-resolution of related host,
+ // that we predict will be needed after this navigation (typically
+ // more-embedded resources on a page). This method will actually post a task
+ // to do the actual work, so as not to jump ahead of the frame navigation that
+ // instigated this activity.
void PredictFrameSubresources(const GURL& url);
// Record details of a navigation so that we can preresolve the host name
@@ -138,8 +141,6 @@
FRIEND_TEST_ALL_PREFIXES(PredictorTest, PriorityQueueReorderTest);
friend class WaitForResolutionHelper; // For testing.
- ~Predictor();
-
class LookupRequest;
// A simple priority queue for handling host names.
@@ -174,6 +175,13 @@
// in a Referrer instance, which is a value in this map.
typedef std::map<GURL, Referrer> Referrers;
+ ~Predictor();
+
+ // Perform actual resolution or preconnection to subresources now. This is
+ // an internal worker method that is reached via a post task from
+ // PredictFrameSubresources().
+ void PrepareFrameSubresources(const GURL& url);
+
// Only for testing. Returns true if hostname has been successfully resolved
// (name found).
bool WasFound(const GURL& url) const {
« no previous file with comments | « chrome/browser/net/preconnect.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698