diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 12:16:53 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 12:16:53 +0000 |
commit | 5644f6b846323b29d2a97f8f803ad500e2dc07e3 (patch) | |
tree | b1bdb42e7ed8388053b9a8e878aa81f4fce4451a /chrome/browser/net/dns_host_info.h | |
parent | e598ad77dddb4046be70be45afaec8ab93c8f03b (diff) | |
download | chromium_src-5644f6b846323b29d2a97f8f803ad500e2dc07e3.zip chromium_src-5644f6b846323b29d2a97f8f803ad500e2dc07e3.tar.gz chromium_src-5644f6b846323b29d2a97f8f803ad500e2dc07e3.tar.bz2 |
Clean up dns prefetch code, and also port it.
- remove slave threads and use HostResolver in asynchronous mode instead (while still limiting number of concurrent lookups)
- make the implementation portable and make DnsMaster unit test compile and pass on Linux
- add more tests to DnsMaster unit test to simulate various shutdown scenarios, concurrent lookups, and to verify that we don't exceed our limit of concurrent lookup requests)
- remove some tests which relied on specifics of slaves' inner working
Bonus: shutdown is almost instant now, no need to have a timeout.
BUG=5687, 6683
Review URL: http://codereview.chromium.org/15076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_host_info.h')
-rw-r--r-- | chrome/browser/net/dns_host_info.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/net/dns_host_info.h b/chrome/browser/net/dns_host_info.h index 50c44f3..b9ea157 100644 --- a/chrome/browser/net/dns_host_info.h +++ b/chrome/browser/net/dns_host_info.h @@ -4,9 +4,8 @@ // A DnsHostInfo object is used to store status of a Dns lookup of a specific // hostname. -// It includes progress, from placement in the DnsMaster's queue, to assignment -// to a slave, to resolution by the (blocking) DNS service as either FOUND or -// NO_SUCH_NAME. +// It includes progress, from placement in the DnsMaster's queue, to resolution +// by the DNS service as either FOUND or NO_SUCH_NAME. #ifndef CHROME_BROWSER_NET_DNS_HOST_INFO_H_ #define CHROME_BROWSER_NET_DNS_HOST_INFO_H_ @@ -54,9 +53,9 @@ class DnsHostInfo { enum DnsProcessingState { // When processed by our prefetching system, the states are: PENDING, // Constructor has completed. - QUEUED, // In prefetch queue but not yet assigned to a slave. - ASSIGNED, // Currently being processed by a slave. - ASSIGNED_BUT_MARKED, // Needs to be deleted as soon as slave is done. + QUEUED, // In prefetch queue but not yet being resolved. + ASSIGNED, // Currently being processed. + ASSIGNED_BUT_MARKED, // Needs to be deleted as soon as it's resolved. FOUND, // DNS prefetch search completed. NO_SUCH_NAME, // DNS prefetch search completed. // When processed by the network stack during navigation, the states are: |