summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 12:16:53 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 12:16:53 +0000
commit5644f6b846323b29d2a97f8f803ad500e2dc07e3 (patch)
treeb1bdb42e7ed8388053b9a8e878aa81f4fce4451a /net/base
parente598ad77dddb4046be70be45afaec8ab93c8f03b (diff)
downloadchromium_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 'net/base')
-rw-r--r--net/base/host_resolver.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index bfae53c..6e61eb5 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -41,10 +41,9 @@ class HostResolver {
//
// When callback is null, the operation completes synchronously.
//
- // When callback is non-null, ERR_IO_PENDING is returned if the operation
- // could not be completed synchronously, in which case the result code will
- // be passed to the callback when available.
- //
+ // When callback is non-null, the operation will be performed asynchronously.
+ // ERR_IO_PENDING is returned if it has been scheduled successfully. Real
+ // result code will be passed to the completion callback.
int Resolve(const std::string& hostname, int port,
AddressList* addresses, CompletionCallback* callback);