| 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); |
| 121 | 122 |
| 122 static UrlList GetPredictedUrlListAtStartup(PrefService* user_prefs, | 123 static UrlList GetPredictedUrlListAtStartup(PrefService* user_prefs, |
| 123 PrefService* local_state); | 124 PrefService* local_state); |
| 124 | 125 |
| 125 static void set_max_queueing_delay(int max_queueing_delay_ms); | 126 static void set_max_queueing_delay(int max_queueing_delay_ms); |
| 126 | 127 |
| 127 static void set_max_parallel_resolves(size_t max_parallel_resolves); | 128 static void set_max_parallel_resolves(size_t max_parallel_resolves); |
| 128 | 129 |
| 129 virtual void ShutdownOnUIThread(PrefService* user_prefs); | 130 virtual void ShutdownOnUIThread(PrefService* user_prefs); |
| 130 | 131 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 PrefService* user_prefs, | 515 PrefService* user_prefs, |
| 515 PrefService* local_state, | 516 PrefService* local_state, |
| 516 IOThread* io_thread, | 517 IOThread* io_thread, |
| 517 net::URLRequestContextGetter* getter) OVERRIDE; | 518 net::URLRequestContextGetter* getter) OVERRIDE; |
| 518 virtual void ShutdownOnUIThread(PrefService* user_prefs) OVERRIDE; | 519 virtual void ShutdownOnUIThread(PrefService* user_prefs) OVERRIDE; |
| 519 }; | 520 }; |
| 520 | 521 |
| 521 } // namespace chrome_browser_net | 522 } // namespace chrome_browser_net |
| 522 | 523 |
| 523 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ | 524 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ |
| OLD | NEW |