Optimization for ProxyResolverV8Tracing: early termination.

Tries to terminate the script V8 execution when the run is abandoned for DNS tracing.

BUG=119151


Review URL: https://chromiumcodereview.appspot.com/12289019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183743 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 326b5a4..3adc672 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -44,17 +44,18 @@
       DNS_RESOLVE_EX,
       MY_IP_ADDRESS,
       MY_IP_ADDRESS_EX,
-      NUM_DNS_OPERATIONS,
     };
 
     JSBindings() {}
 
     // Handler for "dnsResolve()", "dnsResolveEx()", "myIpAddress()",
     // "myIpAddressEx()". Returns true on success and fills |*output| with the
-    // result.
+    // result. If |*terminate| is set to true, then the script execution will
+    // be aborted. Note that termination may not happen right away.
     virtual bool ResolveDns(const std::string& host,
                             ResolveDnsOperation op,
-                            std::string* output) = 0;
+                            std::string* output,
+                            bool* terminate) = 0;
 
     // Handler for "alert(message)"
     virtual void Alert(const string16& message) = 0;