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

Side by Side Diff: chrome/browser/net/predictor_api.h

Issue 3032014: Support both preconnection, and pre-resolution for subresources... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/predictor.cc ('k') | chrome/browser/net/predictor_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the global interface for the dns prefetch services. It centralizes 5 // This is the global interface for the dns prefetch services. It centralizes
6 // initialization, along with all the callbacks etc. to connect to the browser 6 // initialization, along with all the callbacks etc. to connect to the browser
7 // process. This allows the more standard DNS prefetching services, such as 7 // process. This allows the more standard DNS prefetching services, such as
8 // provided by Predictor to be left as more generally usable code, and possibly 8 // provided by Predictor to be left as more generally usable code, and possibly
9 // be shared across multiple client projects. 9 // be shared across multiple client projects.
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // This API is used by the autocomplete popup box (as user types). 53 // This API is used by the autocomplete popup box (as user types).
54 // This will either preresolve the domain name, or possibly preconnect creating 54 // This will either preresolve the domain name, or possibly preconnect creating
55 // an open TCP/IP connection to the host. 55 // an open TCP/IP connection to the host.
56 void AnticipateUrl(const GURL& url, bool preconnectable); 56 void AnticipateUrl(const GURL& url, bool preconnectable);
57 57
58 // When displaying info in about:dns, the following API is called. 58 // When displaying info in about:dns, the following API is called.
59 void PredictorGetHtmlInfo(std::string* output); 59 void PredictorGetHtmlInfo(std::string* output);
60 60
61 //------------------------------------------------------------------------------ 61 //------------------------------------------------------------------------------
62 // When we navigate, we may know in advance some other URLs that will need to
63 // be resolved. This function initiates those side effects.
64 void PredictSubresources(const GURL& url);
65
66 // When we navigate to a frame that may contain embedded resources, we may know 62 // When we navigate to a frame that may contain embedded resources, we may know
67 // in advance some other URLs that will need to be connected to (via TCP and 63 // in advance some other URLs that will need to be connected to (via TCP and
68 // sometimes SSL). This function initiates those connections 64 // sometimes SSL). This function initiates those connections
69 void PredictFrameSubresources(const GURL& url); 65 void PredictFrameSubresources(const GURL& url);
70 66
71 // Call when we should learn from a navigation about a relationship to a 67 // Call when we should learn from a navigation about a relationship to a
72 // subresource target, and its containing frame, which was loaded as a referring 68 // subresource target, and its containing frame, which was loaded as a referring
73 // URL. 69 // URL.
74 void LearnFromNavigation(const GURL& referring_url, const GURL& target_url); 70 void LearnFromNavigation(const GURL& referring_url, const GURL& target_url);
75 71
(...skipping 18 matching lines...) Expand all
94 private: 90 private:
95 // Maintain a field trial instance when we do A/B testing. 91 // Maintain a field trial instance when we do A/B testing.
96 scoped_refptr<FieldTrial> trial_; 92 scoped_refptr<FieldTrial> trial_;
97 93
98 DISALLOW_COPY_AND_ASSIGN(PredictorInit); 94 DISALLOW_COPY_AND_ASSIGN(PredictorInit);
99 }; 95 };
100 96
101 } // namespace chrome_browser_net 97 } // namespace chrome_browser_net
102 98
103 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ 99 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor.cc ('k') | chrome/browser/net/predictor_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698