| 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 // 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 |
| 11 // before it is really needed, and hence reduce latency in the standard lookup | 11 // before it is really needed, and hence reduce latency in the standard lookup |
| 12 // paths. | 12 // paths. |
| 13 // Subresource relationships are usually acquired from the referrer field in a | 13 // Subresource relationships are usually acquired from the referrer field in a |
| 14 // navigation. A subresource URL may be associated with a referrer URL. Later | 14 // navigation. A subresource URL may be associated with a referrer URL. Later |
| 15 // navigations may, if the likelihood of needing the subresource is high enough, | 15 // navigations may, if the likelihood of needing the subresource is high enough, |
| 16 // cause this module to speculatively create a TCP/IP connection that will | 16 // cause this module to speculatively create a TCP/IP connection that will |
| 17 // probably be needed to fetch the subresource. | 17 // probably be needed to fetch the subresource. |
| 18 | 18 |
| 19 #ifndef CHROME_BROWSER_NET_DNS_MASTER_H_ | 19 #ifndef CHROME_BROWSER_NET_PREDICTOR_H_ |
| 20 #define CHROME_BROWSER_NET_DNS_MASTER_H_ | 20 #define CHROME_BROWSER_NET_PREDICTOR_H_ |
| 21 | 21 |
| 22 #include <map> | 22 #include <map> |
| 23 #include <queue> | 23 #include <queue> |
| 24 #include <set> | 24 #include <set> |
| 25 #include <string> | 25 #include <string> |
| 26 #include <vector> | 26 #include <vector> |
| 27 | 27 |
| 28 #include "base/gtest_prod_util.h" | 28 #include "base/gtest_prod_util.h" |
| 29 #include "base/ref_counted.h" | 29 #include "base/ref_counted.h" |
| 30 #include "chrome/browser/net/dns_host_info.h" | 30 #include "chrome/browser/net/url_info.h" |
| 31 #include "chrome/browser/net/referrer.h" | 31 #include "chrome/browser/net/referrer.h" |
| 32 #include "chrome/common/net/dns.h" | 32 #include "chrome/common/net/predictor_common.h" |
| 33 #include "net/base/host_port_pair.h" | 33 #include "net/base/host_port_pair.h" |
| 34 | 34 |
| 35 namespace net { | 35 namespace net { |
| 36 class HostResolver; | 36 class HostResolver; |
| 37 } // namespace net | 37 } // namespace net |
| 38 | 38 |
| 39 namespace chrome_browser_net { | 39 namespace chrome_browser_net { |
| 40 | 40 |
| 41 typedef chrome_common_net::UrlList UrlList; | 41 typedef chrome_common_net::UrlList UrlList; |
| 42 typedef chrome_common_net::NameList NameList; | 42 typedef chrome_common_net::NameList NameList; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 // Are we currently using preconnection, rather than just DNS resolution, for | 258 // Are we currently using preconnection, rather than just DNS resolution, for |
| 259 // subresources and omni-box search URLs. | 259 // subresources and omni-box search URLs. |
| 260 bool preconnect_enabled_; | 260 bool preconnect_enabled_; |
| 261 | 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(Predictor); | 262 DISALLOW_COPY_AND_ASSIGN(Predictor); |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace chrome_browser_net | 265 } // namespace chrome_browser_net |
| 266 | 266 |
| 267 #endif // CHROME_BROWSER_NET_DNS_MASTER_H_ | 267 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ |
| OLD | NEW |