From 5644f6b846323b29d2a97f8f803ad500e2dc07e3 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Fri, 6 Feb 2009 12:16:53 +0000 Subject: 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 --- chrome/browser/net/dns_host_info.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'chrome/browser/net/dns_host_info.h') 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: -- cgit v1.1