Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: net/proxy/proxy_script_decider.h

Issue 23181010: Fast-fail WPAD detection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove SetHostResolverForTesting Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_script_decider.h
diff --git a/net/proxy/proxy_script_decider.h b/net/proxy/proxy_script_decider.h
index 9a77938ec8e4aef834281184e16d1d55913b9b3c..3c1c6c5af64fb65ba6e599f794ac85fb1fe742d4 100644
--- a/net/proxy/proxy_script_decider.h
+++ b/net/proxy/proxy_script_decider.h
@@ -12,9 +12,12 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "net/base/address_list.h"
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
#include "net/base/net_log.h"
+#include "net/dns/host_resolver.h"
+#include "net/dns/single_request_host_resolver.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_resolver.h"
#include "url/gurl.h"
@@ -105,6 +108,8 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
STATE_NONE,
STATE_WAIT,
STATE_WAIT_COMPLETE,
+ STATE_QUICK_CHECK,
+ STATE_QUICK_CHECK_COMPLETE,
STATE_FETCH_PAC_SCRIPT,
STATE_FETCH_PAC_SCRIPT_COMPLETE,
STATE_VERIFY_PAC_SCRIPT,
@@ -121,6 +126,9 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
int DoWait();
int DoWaitComplete(int result);
+ int DoQuickCheck();
+ int DoQuickCheckComplete(int result);
+
int DoFetchPacScript();
int DoFetchPacScriptComplete(int result);
@@ -175,6 +183,10 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
ProxyConfig effective_config_;
scoped_refptr<ProxyResolverScriptData> script_data_;
+ AddressList wpad_addresses_;
+ base::OneShotTimer<ProxyScriptDecider> quick_check_timer_;
+ scoped_ptr<SingleRequestHostResolver> host_resolver_;
+ base::Time quick_check_start_time_;
DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider);
};

Powered by Google App Engine
This is Rietveld 408576698