OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A Predictor object is instantiated once in the browser process, and manages | 5 // A Predictor object is instantiated once in the browser process, and manages |
6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected | 6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected |
7 // subresources. | 7 // subresources. |
8 // Most hostname lists are provided by the renderer processes, and include URLs | 8 // Most hostname lists are provided by the renderer processes, and include URLs |
9 // that *might* be used in the near future by the browsing user. One goal of | 9 // that *might* be used in the near future by the browsing user. One goal of |
10 // this class is to cause the underlying DNS structure to lookup a hostname | 10 // this class is to cause the underlying DNS structure to lookup a hostname |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 PrefService* local_state, | 110 PrefService* local_state, |
111 IOThread* io_thread, | 111 IOThread* io_thread, |
112 net::URLRequestContextGetter* getter); | 112 net::URLRequestContextGetter* getter); |
113 | 113 |
114 // The Omnibox has proposed a given url to the user, and if it is a search | 114 // The Omnibox has proposed a given url to the user, and if it is a search |
115 // URL, then it also indicates that this is preconnectable (i.e., we could | 115 // URL, then it also indicates that this is preconnectable (i.e., we could |
116 // preconnect to the search server). | 116 // preconnect to the search server). |
117 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); | 117 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); |
118 | 118 |
119 // Preconnect a URL and all of its subresource domains. | 119 // Preconnect a URL and all of its subresource domains. |
120 void PreconnectUrlAndSubresources(const GURL& url); | 120 void PreconnectUrlAndSubresources(const GURL& url, |
| 121 UrlInfo::ResolutionMotivation motivation, |
| 122 uint32_t motivationVariationId); |
121 | 123 |
122 static UrlList GetPredictedUrlListAtStartup(PrefService* user_prefs, | 124 static UrlList GetPredictedUrlListAtStartup(PrefService* user_prefs, |
123 PrefService* local_state); | 125 PrefService* local_state); |
124 | 126 |
125 static void set_max_queueing_delay(int max_queueing_delay_ms); | 127 static void set_max_queueing_delay(int max_queueing_delay_ms); |
126 | 128 |
127 static void set_max_parallel_resolves(size_t max_parallel_resolves); | 129 static void set_max_parallel_resolves(size_t max_parallel_resolves); |
128 | 130 |
129 virtual void ShutdownOnUIThread(PrefService* user_prefs); | 131 virtual void ShutdownOnUIThread(PrefService* user_prefs); |
130 | 132 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 PrefService* user_prefs, | 516 PrefService* user_prefs, |
515 PrefService* local_state, | 517 PrefService* local_state, |
516 IOThread* io_thread, | 518 IOThread* io_thread, |
517 net::URLRequestContextGetter* getter) OVERRIDE; | 519 net::URLRequestContextGetter* getter) OVERRIDE; |
518 virtual void ShutdownOnUIThread(PrefService* user_prefs) OVERRIDE; | 520 virtual void ShutdownOnUIThread(PrefService* user_prefs) OVERRIDE; |
519 }; | 521 }; |
520 | 522 |
521 } // namespace chrome_browser_net | 523 } // namespace chrome_browser_net |
522 | 524 |
523 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ | 525 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ |
OLD | NEW |