Improve performance of proxy resolver by tracing DNS dependencies.

This replaces the multi-threaded V8 proxy resolver implementation, with a faster single-threaded one. The single-threaded version uses some magic to avoid blocking on DNS dependencies, so it is able to handle more parallel requests than the multi-threaded one.

Design document: https://docs.google.com/a/chromium.org/document/d/16Ij5OcVnR3s0MH4Z5XkhI9VTPoMJdaBn9rKreAmGOdE/edit

This has the benefit of reducing the number of threads that Chrome uses for PAC evaluation, while at the same time speeding up proxy resolving for PAC scripts that do DNS resolving (due to better parallelism).

I ran a benchmark to evaluate the effectiveness of this new approach. The benchmark simulates loading the http://www.newyorktimes.com webpage with slow DNS (where each DNS resolve takes 2 seconds), and a maximum DNS resolver parallelism of 10 requests. This webpage resolves the proxy for 221 URLs, across 40 unique hostnames.

  - Proxy resolving using the old multithreaded code took 24.076 seconds [*]
  - Proxy resolving using the new code took 8.011 seconds [*]
  - Without a PAC script, resolving the DNS took 8.003 seconds

The new proxy resolving times (8.011s) are much closer to the theoretical best (8.003s)!

[*] The PAC script I used for the test was a fairly complex script 20kb (a version of google's corp PAC script modified to always call dnsResolve(host)).

I will be adding histograms in a follow-up CL, to measure how often requests need to be restarted, or fall-back to synchronous mode.

BUG=119151

Review URL: https://codereview.chromium.org/11885009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179714 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/net.gyp b/net/net.gyp
index 4c7d4f0..eeaeab56 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -633,11 +633,8 @@
         'proxy/proxy_list.h',
         'proxy/proxy_resolver.h',
         'proxy/proxy_resolver_error_observer.h',
-        'proxy/proxy_resolver_js_bindings.cc',
-        'proxy/proxy_resolver_js_bindings.h',
         'proxy/proxy_resolver_mac.cc',
         'proxy/proxy_resolver_mac.h',
-        'proxy/proxy_resolver_request_context.h',
         'proxy/proxy_resolver_script.h',
         'proxy/proxy_resolver_script_data.cc',
         'proxy/proxy_resolver_script_data.h',
@@ -654,9 +651,6 @@
         'proxy/proxy_server_mac.cc',
         'proxy/proxy_service.cc',
         'proxy/proxy_service.h',
-        'proxy/sync_host_resolver.h',
-        'proxy/sync_host_resolver_bridge.cc',
-        'proxy/sync_host_resolver_bridge.h',
         'quic/congestion_control/cubic.cc',
         'quic/congestion_control/cubic.h',
         'quic/congestion_control/fix_rate_receiver.cc',
@@ -1474,13 +1468,12 @@
         'proxy/proxy_config_unittest.cc',
         'proxy/proxy_info_unittest.cc',
         'proxy/proxy_list_unittest.cc',
-        'proxy/proxy_resolver_js_bindings_unittest.cc',
+        'proxy/proxy_resolver_v8_tracing_unittest.cc',
         'proxy/proxy_resolver_v8_unittest.cc',
         'proxy/proxy_script_decider_unittest.cc',
         'proxy/proxy_script_fetcher_impl_unittest.cc',
         'proxy/proxy_server_unittest.cc',
         'proxy/proxy_service_unittest.cc',
-        'proxy/sync_host_resolver_bridge_unittest.cc',
         'quic/congestion_control/cubic_test.cc',
         'quic/congestion_control/fix_rate_test.cc',
         'quic/congestion_control/hybrid_slow_start_test.cc',
@@ -1701,6 +1694,7 @@
           }, {  # else: !use_v8_in_net
             'sources!': [
               'proxy/proxy_resolver_v8_unittest.cc',
+              'proxy/proxy_resolver_v8_tracing_unittest.cc',
             ],
           },
         ],
@@ -2070,6 +2064,8 @@
           'sources': [
             'proxy/proxy_resolver_v8.cc',
             'proxy/proxy_resolver_v8.h',
+            'proxy/proxy_resolver_v8_tracing.cc',
+            'proxy/proxy_resolver_v8_tracing.h',
             'proxy/proxy_service_v8.cc',
             'proxy/proxy_service_v8.h',
           ],