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

Issue 9078003: Poll PAC scripts for content changes. (Closed)

Created:
8 years, 11 months ago by eroman
Modified:
8 years, 11 months ago
Reviewers:
wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Poll PAC scripts for content changes. An exponential poll delay is used which doubles the delay after each attempt (for instance polls might occur at 4 seconds, then 8 seconds, then 16 seconds, up to a maximum of 2 minutes). This same mechanism also applies to the resolution of "auto-detect" settings. The intent of this change is to make it possible to (1) Notice server-side changes made to the PAC scripts (2) Recover from spurious network errors when initially downloading PAC scripts. BUG=90581 TEST=Configure Chrome to use a PAC script which fails to load (i.e. a non-existent file:// url, or remap the host's DNS record). Start Chrome and verify using about:net-internals that it has failed to fetch the PAC script and has fallen back to DIRECT settings. Fix the PAC URL to work and wait for chrome to notice the change and reconfigure itself (will take a maximum of 2 minutes). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=116462

Patch Set 1 #

Total comments: 34

Patch Set 2 : address wtc comments #

Total comments: 5

Patch Set 3 : address second batch of comments #

Patch Set 4 : fix dcheck reached on bot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+888 lines, -87 lines) Patch
M net/proxy/mock_proxy_resolver.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/proxy/mock_proxy_script_fetcher.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/proxy/mock_proxy_script_fetcher.cc View 4 chunks +14 lines, -1 line 0 comments Download
M net/proxy/proxy_resolver_script_data.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/proxy/proxy_resolver_script_data.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M net/proxy/proxy_service.h View 1 5 chunks +22 lines, -0 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 16 chunks +338 lines, -55 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 1 33 chunks +486 lines, -31 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
eroman
8 years, 11 months ago (2012-01-03 22:40:19 UTC) #1
wtc
Patch Set 1 LGTM. Please check the comment marked with BUG(?). Also, some of my ...
8 years, 11 months ago (2012-01-03 23:54:45 UTC) #2
eroman
Thanks for the review! I will respond to your other comments after updating the patch, ...
8 years, 11 months ago (2012-01-04 00:11:24 UTC) #3
eroman
All comments addressed: http://codereview.chromium.org/9078003/diff/1/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): http://codereview.chromium.org/9078003/diff/1/net/proxy/proxy_service.cc#newcode349 net/proxy/proxy_service.cc:349: // |effective_config|, |decider_result|, |script_data| will be ...
8 years, 11 months ago (2012-01-04 03:41:46 UTC) #4
wtc
Patch Set 2 LGTM. Please fix an inaccurate comment (see my last review comment below). ...
8 years, 11 months ago (2012-01-04 22:14:15 UTC) #5
eroman
Thanks. After completing some manual tests I will commit this. http://codereview.chromium.org/9078003/diff/12001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): http://codereview.chromium.org/9078003/diff/12001/net/proxy/proxy_service.cc#newcode73 ...
8 years, 11 months ago (2012-01-04 22:40:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/9078003/16001
8 years, 11 months ago (2012-01-04 22:48:41 UTC) #7
commit-bot: I haz the power
Try job failure for 9078003-16001 (retry) on win_rel for step "test_shell_tests". It's a second try, ...
8 years, 11 months ago (2012-01-05 00:36:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/9078003/18001
8 years, 11 months ago (2012-01-05 03:28:18 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/9078003/18001
8 years, 11 months ago (2012-01-05 03:29:21 UTC) #10
eroman
I made some minor changes in patchset 4 to address a DCHECK that was hit ...
8 years, 11 months ago (2012-01-05 04:55:16 UTC) #11
commit-bot: I haz the power
Change committed as 116462
8 years, 11 months ago (2012-01-05 05:47:58 UTC) #12
wtc
8 years, 11 months ago (2012-01-05 22:08:26 UTC) #13
Patch Set 4 LGTM.

http://codereview.chromium.org/9078003/diff/12001/net/proxy/proxy_service.cc
File net/proxy/proxy_service.cc (right):

http://codereview.chromium.org/9078003/diff/12001/net/proxy/proxy_service.cc#...
net/proxy/proxy_service.cc:653: return script_data->utf16() !=
last_script_data_->utf16();

The code in the new Equals() method seems to imply that
the proxy_resolver_expects_pac_bytes_ member isn't necessary
and can be replaced by the expression
  last_script_data_->type() == TYPE_SCRIPT_CONTENTS

Powered by Google App Engine
This is Rietveld 408576698