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

Issue 23181010: Fast-fail WPAD detection. (Closed)

Created:
7 years, 4 months ago by Elly Fong-Jones
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fast-fail WPAD detection. Right now, if there's no WPAD host on the local network, we have to wait up to two seconds for ProxyScriptDecider to time out, during which all requests are stalled waiting to find out what proxy to use. This is a pretty crappy experience when you have proxy autodetection turned on and no WPAD host. Therefore, add a new state to ProxyScriptDecider's state machine: "QuickCheck". When we're in this state, we are doing a DNS query only for WPAD, with a timeout of 1 second; if this query doesn't succeed, we abort the entire WPAD process. We also upload an UMA report saying how long the WPAD resolution took to succeed. In future, once we have a good idea how long WPAD requests usually actually take, we'll turn this timeout down, probably to something extremely low (from experiments, IE appears to use a timeout of 50ms). TEST=unit,trybot,manual BUG=chromium:161826 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224030

Patch Set 1 #

Total comments: 5

Patch Set 2 : Refactor #

Total comments: 4

Patch Set 3 : Move STATE_QUICK_CHECK after STATE_WAIT #

Total comments: 13

Patch Set 4 : Fix nits #

Total comments: 22

Patch Set 5 : Undo API change #

Total comments: 8

Patch Set 6 : Add unit tests #

Total comments: 20

Patch Set 7 : Unit test fixes #

Total comments: 2

Patch Set 8 : Only invoke native resolver. #

Total comments: 10

Patch Set 9 : Remove SetHostResolverForTesting #

Total comments: 6

Patch Set 10 : Add HostResolverImpl test for SYSTEM_ONLY #

Total comments: 1

Patch Set 11 : info_native -> info_bypass #

Patch Set 12 : Rebase to LKGR #

Patch Set 13 : Rebase to LKGR #

Total comments: 1

Patch Set 14 : Fix windows build warning #

Patch Set 15 : Disable QuickCheck with explicit PAC URL #

Patch Set 16 : Fix comment in MockHostResolver #

Patch Set 17 : Re-fix MockHostResolver #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -7 lines) Patch
M net/base/address_family.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M net/dns/host_resolver_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -1 line 0 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +18 lines, -0 lines 0 comments Download
M net/dns/mock_host_resolver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_decider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +15 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_decider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +75 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_decider_unittest.cc View 1 2 3 4 5 6 8 5 chunks +98 lines, -2 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
Elly Fong-Jones
Please take a look at my approach for this. I haven't yet written unit tests, ...
7 years, 4 months ago (2013-08-21 18:50:11 UTC) #1
szym
Looks good. A few suggestions, and you'll need to lint it for code style. https://codereview.chromium.org/23181010/diff/1/net/proxy/proxy_script_decider.cc ...
7 years, 4 months ago (2013-08-21 19:11:21 UTC) #2
szym
https://codereview.chromium.org/23181010/diff/1/net/proxy/proxy_script_decider.h File net/proxy/proxy_script_decider.h (right): https://codereview.chromium.org/23181010/diff/1/net/proxy/proxy_script_decider.h#newcode193 net/proxy/proxy_script_decider.h:193: base::Time quick_check_started_; On 2013/08/21 19:11:21, szym wrote: > Instead ...
7 years, 4 months ago (2013-08-21 19:21:08 UTC) #3
szym
https://codereview.chromium.org/23181010/diff/8001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/8001/net/proxy/proxy_script_decider.cc#newcode218 net/proxy/proxy_script_decider.cc:218: If you do CompletionCallback callback = base::Bind(&ProxyScript, ...Now()); then... ...
7 years, 4 months ago (2013-08-22 16:38:23 UTC) #4
szym
https://codereview.chromium.org/23181010/diff/8001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/8001/net/proxy/proxy_script_decider.cc#newcode176 net/proxy/proxy_script_decider.cc:176: break; To be compatible with the DoLoop state machine ...
7 years, 4 months ago (2013-08-22 19:06:40 UTC) #5
szym
https://codereview.chromium.org/23181010/diff/13001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/13001/net/proxy/proxy_script_decider.cc#newcode217 net/proxy/proxy_script_decider.cc:217: int ProxyScriptDecider::DoQuickCheck() { nit: Move both after DoWait() (to ...
7 years, 4 months ago (2013-08-23 20:45:56 UTC) #6
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/13001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/13001/net/proxy/proxy_script_decider.cc#newcode217 net/proxy/proxy_script_decider.cc:217: int ProxyScriptDecider::DoQuickCheck() { On 2013/08/23 20:45:57, szym wrote: > ...
7 years, 3 months ago (2013-08-26 15:17:28 UTC) #7
szym
https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc#newcode252 net/proxy/proxy_script_decider.cc:252: // we can't get an error response - the ...
7 years, 3 months ago (2013-08-26 17:24:30 UTC) #8
szym
https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc#newcode258 net/proxy/proxy_script_decider.cc:258: next_state_ = STATE_FETCH_PAC_SCRIPT; Should be GetStartState()
7 years, 3 months ago (2013-08-26 17:25:38 UTC) #9
cbentzel
Are you planning on writing unit tests? (Hint: you should be...) https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): ...
7 years, 3 months ago (2013-08-26 18:19:50 UTC) #10
szym
https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc#newcode90 net/proxy/proxy_script_decider.cc:90: proxy_script_fetcher->GetRequestContext()->host_resolver()) { On 2013/08/26 18:19:50, cbentzel wrote: > Nit: ...
7 years, 3 months ago (2013-08-26 18:31:33 UTC) #11
cbentzel
On 2013/08/26 18:31:33, szym wrote: > https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc > File net/proxy/proxy_script_decider.cc (right): > > https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc#newcode90 > ...
7 years, 3 months ago (2013-08-26 20:58:15 UTC) #12
eroman
(1) Should not slow down the custom PAC URL with resolution of "wpad". ProxyScriptDecider handles ...
7 years, 3 months ago (2013-08-28 19:35:23 UTC) #13
cbentzel
On 2013/08/28 19:35:23, eroman wrote: > (1) Should not slow down the custom PAC URL ...
7 years, 3 months ago (2013-08-30 13:00:02 UTC) #14
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/17001/net/proxy/proxy_script_decider.cc#newcode52 net/proxy/proxy_script_decider.cc:52: static const int kQuickCheckDelayMs = 1000; On 2013/08/26 18:19:50, ...
7 years, 3 months ago (2013-09-09 22:07:42 UTC) #15
szym
looks good, any tests? https://codereview.chromium.org/23181010/diff/29001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/29001/net/proxy/proxy_script_decider.cc#newcode91 net/proxy/proxy_script_decider.cc:91: && proxy_script_fetcher->GetRequestContext() && on the ...
7 years, 3 months ago (2013-09-09 23:58:51 UTC) #16
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/29001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/29001/net/proxy/proxy_script_decider.cc#newcode91 net/proxy/proxy_script_decider.cc:91: && proxy_script_fetcher->GetRequestContext() On 2013/09/09 23:58:51, szym wrote: > && ...
7 years, 3 months ago (2013-09-10 17:04:15 UTC) #17
szym
https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); Ok, so just triple-checking here. This will make ...
7 years, 3 months ago (2013-09-11 14:06:21 UTC) #18
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); On 2013/09/11 14:06:22, szym wrote: > Ok, so ...
7 years, 3 months ago (2013-09-11 20:20:36 UTC) #19
szym
just a few minor issues https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); On 2013/09/11 20:20:37, ...
7 years, 3 months ago (2013-09-11 21:29:20 UTC) #20
cbentzel
https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); On 2013/09/11 21:29:21, szym wrote: > On 2013/09/11 ...
7 years, 3 months ago (2013-09-12 13:44:29 UTC) #21
szym
https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); On 2013/09/12 13:44:30, cbentzel wrote: > On 2013/09/11 ...
7 years, 3 months ago (2013-09-12 16:03:24 UTC) #22
szym
https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 net/proxy/proxy_script_decider.cc:93: proxy_script_fetcher->GetRequestContext()->host_resolver())); On 2013/09/12 13:44:30, cbentzel wrote: > On 2013/09/11 ...
7 years, 3 months ago (2013-09-12 18:01:51 UTC) #23
cbentzel
On 2013/09/12 18:01:51, szym wrote: > https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc > File net/proxy/proxy_script_decider.cc (right): > > https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc#newcode93 > ...
7 years, 3 months ago (2013-09-12 21:02:12 UTC) #24
cbentzel
On 2013/09/12 21:02:12, cbentzel wrote: > On 2013/09/12 18:01:51, szym wrote: > > > https://codereview.chromium.org/23181010/diff/34001/net/proxy/proxy_script_decider.cc ...
7 years, 3 months ago (2013-09-12 21:03:40 UTC) #25
cbentzel
On 2013/09/12 21:03:40, cbentzel wrote: > On 2013/09/12 21:02:12, cbentzel wrote: > > On 2013/09/12 ...
7 years, 3 months ago (2013-09-13 09:28:45 UTC) #26
Elly Fong-Jones
On 2013/09/13 09:28:45, cbentzel wrote: > On 2013/09/12 21:03:40, cbentzel wrote: > > On 2013/09/12 ...
7 years, 3 months ago (2013-09-13 14:12:03 UTC) #27
szym
On 2013/09/13 14:12:03, Elly Jones wrote: > On 2013/09/13 09:28:45, cbentzel wrote: > > On ...
7 years, 3 months ago (2013-09-13 14:16:59 UTC) #28
cbentzel
Uh, I was actually looking to have a separate one for QuickCheck that always calls ...
7 years, 3 months ago (2013-09-13 17:10:28 UTC) #29
szym
I was thinking that If we don't stuff the cache we will end up making ...
7 years, 3 months ago (2013-09-13 20:51:29 UTC) #30
cbentzel
Cool. My primary concerns are a) Making sure that we don't falsely declare "There are ...
7 years, 3 months ago (2013-09-13 21:09:46 UTC) #31
szym
https://codereview.chromium.org/23181010/diff/53001/net/base/address_family.h File net/base/address_family.h (right): https://codereview.chromium.org/23181010/diff/53001/net/base/address_family.h#newcode28 net/base/address_family.h:28: HOST_RESOLVER_NATIVE_ONLY = 1 << 3 Suggest "system" instead of ...
7 years, 3 months ago (2013-09-16 21:50:31 UTC) #32
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/53001/net/base/address_family.h File net/base/address_family.h (right): https://codereview.chromium.org/23181010/diff/53001/net/base/address_family.h#newcode28 net/base/address_family.h:28: HOST_RESOLVER_NATIVE_ONLY = 1 << 3 On 2013/09/16 21:50:32, szym ...
7 years, 3 months ago (2013-09-16 22:10:10 UTC) #33
szym
LGTM with minor remarks. Don't forget to update TEST= in CL description. Also, I suggest ...
7 years, 3 months ago (2013-09-16 22:15:54 UTC) #34
Elly Fong-Jones
https://codereview.chromium.org/23181010/diff/62001/net/base/address_family.h File net/base/address_family.h (right): https://codereview.chromium.org/23181010/diff/62001/net/base/address_family.h#newcode27 net/base/address_family.h:27: // The resolver should only invoke getaddrinfo, not DnsClient ...
7 years, 3 months ago (2013-09-17 19:20:22 UTC) #35
szym
lgtm https://codereview.chromium.org/23181010/diff/70001/net/dns/host_resolver_impl_unittest.cc File net/dns/host_resolver_impl_unittest.cc (right): https://codereview.chromium.org/23181010/diff/70001/net/dns/host_resolver_impl_unittest.cc#newcode1527 net/dns/host_resolver_impl_unittest.cc:1527: HostResolver::RequestInfo info_native(HostPortPair("ok", 80)); suggest info_bypass
7 years, 3 months ago (2013-09-17 19:24:23 UTC) #36
Elly Fong-Jones
Now trying to get my windows LKGR to build so I can do a final ...
7 years, 3 months ago (2013-09-18 15:38:23 UTC) #37
szym
Don't forget to update TEST= to reflect the newly added tests. https://codereview.chromium.org/23181010/diff/51001/net/dns/mock_host_resolver.cc File net/dns/mock_host_resolver.cc (right): ...
7 years, 3 months ago (2013-09-18 15:46:44 UTC) #38
szym
Finally, remove Signed-off from CL description.
7 years, 3 months ago (2013-09-18 15:47:42 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/23181010/34002
7 years, 3 months ago (2013-09-18 18:46:45 UTC) #40
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-09-18 18:59:37 UTC) #41
szym
patch 15 lgtm
7 years, 3 months ago (2013-09-18 21:01:34 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/23181010/97001
7 years, 3 months ago (2013-09-18 21:03:14 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/23181010/85001
7 years, 3 months ago (2013-09-18 21:13:42 UTC) #44
Elly Fong-Jones
7 years, 3 months ago (2013-09-18 21:19:37 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/23181010/47001
7 years, 3 months ago (2013-09-18 21:21:10 UTC) #46
commit-bot: I haz the power
7 years, 3 months ago (2013-09-19 04:52:04 UTC) #47
Message was sent while issue was closed.
Change committed as 224030

Powered by Google App Engine
This is Rietveld 408576698