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

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: Move STATE_QUICK_CHECK after STATE_WAIT Created 7 years, 4 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
« no previous file with comments | « no previous file | net/proxy/proxy_script_decider.cc » ('j') | net/proxy/proxy_script_decider.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0f082cc69ae89f5d6f79e320b92fbbe939487d24 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"
@@ -103,12 +106,15 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
enum State {
STATE_NONE,
+ STATE_QUICK_CHECK,
szym 2013/08/23 20:45:57 nit: these should be after STATE_WAIT
Elly Fong-Jones 2013/08/26 15:17:29 Done.
+ STATE_QUICK_CHECK_COMPLETE,
STATE_WAIT,
STATE_WAIT_COMPLETE,
STATE_FETCH_PAC_SCRIPT,
STATE_FETCH_PAC_SCRIPT_COMPLETE,
STATE_VERIFY_PAC_SCRIPT,
STATE_VERIFY_PAC_SCRIPT_COMPLETE,
+ STATE_FAILED,
};
// Returns ordered list of PAC urls to try for |config|.
@@ -118,6 +124,9 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
int DoLoop(int result);
void DoCallback(int result);
+ int DoQuickCheck();
szym 2013/08/23 20:45:57 nit: these should be after DoWait()
Elly Fong-Jones 2013/08/26 15:17:29 Done.
+ int DoQuickCheckComplete(int result);
+
int DoWait();
int DoWaitComplete(int result);
@@ -175,6 +184,10 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider {
ProxyConfig effective_config_;
scoped_refptr<ProxyResolverScriptData> script_data_;
+ AddressList wpad_addrs_;
szym 2013/08/23 20:45:57 nit: wpad_addresses_
Elly Fong-Jones 2013/08/26 15:17:29 Done.
+ base::OneShotTimer<ProxyScriptDecider> quick_check_timer_;
+ SingleRequestHostResolver host_resolver_;
+ base::Time quick_check_started_;
szym 2013/08/23 20:45:57 nit: ...start_time_
Elly Fong-Jones 2013/08/26 15:17:29 Done.
DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider);
};
« no previous file with comments | « no previous file | net/proxy/proxy_script_decider.cc » ('j') | net/proxy/proxy_script_decider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698