summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 03:32:00 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 03:32:00 +0000
commit61b84d5d212129231137839524448b6205f7e097 (patch)
tree474727da6d37d02dac29dffb5edc192be0864a79 /net/base
parentedf769c871dd82fe83becdc115fcf96aa601f646 (diff)
downloadchromium_src-61b84d5d212129231137839524448b6205f7e097.zip
chromium_src-61b84d5d212129231137839524448b6205f7e097.tar.gz
chromium_src-61b84d5d212129231137839524448b6205f7e097.tar.bz2
Add the capability to run multiple proxy PAC scripts in parallel.
Refactors SingleThreadedProxyResolver into MultiThreadedProxyResolver. New threads are created lazily on demand, up to a fixed maximum. Note that this CL does NOT change the policy in Chrome -- it will continue to use a single thread for proxy resolving, but using the new code to do so. BUG=11079 Review URL: http://codereview.chromium.org/2822043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/host_resolver.h3
-rw-r--r--net/base/host_resolver_impl.h2
-rw-r--r--net/base/net_log_event_type_list.h13
3 files changed, 15 insertions, 3 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index 395fc65..1e1fb0b 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -177,6 +177,9 @@ class HostResolver : public base::RefCounted<HostResolver> {
// additional functionality on the about:net-internals page.
virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; }
+ // Does additional cleanup prior to destruction.
+ virtual void Shutdown() {}
+
protected:
friend class base::RefCounted<HostResolver>;
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index 2a751fb..28526d1 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -99,7 +99,7 @@ class HostResolverImpl : public HostResolver,
virtual HostResolverImpl* GetAsHostResolverImpl() { return this; }
// TODO(eroman): hack for http://crbug.com/15513
- void Shutdown();
+ virtual void Shutdown();
// Returns the cache this resolver uses, or NULL if caching is disabled.
HostCache* cache() { return cache_.get(); }
diff --git a/net/base/net_log_event_type_list.h b/net/base/net_log_event_type_list.h
index 8c8df02..ecbf2f9 100644
--- a/net/base/net_log_event_type_list.h
+++ b/net/base/net_log_event_type_list.h
@@ -110,9 +110,18 @@ EVENT_TYPE(PROXY_RESOLVER_V8_DNS_RESOLVE)
// Measures the time taken to execute the "dnsResolveEx()" javascript binding.
EVENT_TYPE(PROXY_RESOLVER_V8_DNS_RESOLVE_EX)
-// Measures the time that a proxy resolve request was stalled waiting for the
+// Measures the time that a proxy resolve request was stalled waiting for a
// proxy resolver thread to free-up.
-EVENT_TYPE(WAITING_FOR_SINGLE_PROXY_RESOLVER_THREAD)
+EVENT_TYPE(WAITING_FOR_PROXY_RESOLVER_THREAD)
+
+// This event is emitted just before a PAC request is bound to a thread. It
+// contains these parameters:
+//
+// {
+// "thread_number": <Identifier for the PAC thread that is going to
+// run this request>
+// }
+EVENT_TYPE(SUBMITTED_TO_RESOLVER_THREAD)
// ------------------------------------------------------------------------
// ClientSocket