OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |