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

Issue 8896019: Refactor: Extract "InitProxyResolver" to "ProxyScriptDecider". (Closed)

Created:
9 years ago by eroman
Modified:
9 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, eroman, darin-cc_chromium.org, arv (Not doing code reviews), Paweł Hajdan Jr., mmenke
Visibility:
Public.

Description

Refactor: Extract "InitProxyResolver" to "ProxyScriptDecider". This is primarily a rename, with the exception that the initialization of ProxyResolver (i.e. the javascript runtime environment for the PAC script) is no longer done inside of ProxyScriptDecider. The motivation for doing this is to make it possible to poll our automatic proxy settings (PAC URLs or WPAD) in the background, _without_ needing to feed the scripts into the javascript parser for validation. There likely won't be any user-visible consequence of this change, however the new mechanism is weaker than the original -- it is possible for the PAC selection to now choose a PAC script which fails to parse as javascript, even though there was a later fallback choice which does parse. This should be rare though (the bad response would need to contain the substring "FindProxyForURL"). BUG=TODO (bugtracker down right now) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114281

Patch Set 1 #

Patch Set 2 : change init order #

Patch Set 3 : another init order #

Total comments: 6

Patch Set 4 : address comments #

Patch Set 5 : change a failing test expectation in extensions #

Patch Set 6 : do another sync since commitbot failed... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -1724 lines) Patch
M chrome/browser/net/passive_log_collector.h View 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/net/passive_log_collector.cc View 2 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/net_internals/events_view.css View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/net_internals/proxy_view.html View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/resources/net_internals/proxy_view.js View 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/test/data/extensions/api_test/proxy/events/parse_error.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M net/base/net_log_event_type_list.h View 2 chunks +5 lines, -14 lines 0 comments Download
M net/base/net_log_source_type_list.h View 1 chunk +1 line, -1 line 0 comments Download
M net/net.gyp View 4 chunks +3 lines, -3 lines 0 comments Download
D net/proxy/init_proxy_resolver.h View 1 chunk +0 lines, -166 lines 0 comments Download
D net/proxy/init_proxy_resolver.cc View 1 2 3 4 5 1 chunk +0 lines, -382 lines 0 comments Download
D net/proxy/init_proxy_resolver_unittest.cc View 1 chunk +0 lines, -715 lines 0 comments Download
A + net/proxy/proxy_script_decider.h View 1 2 3 6 chunks +55 lines, -41 lines 0 comments Download
A + net/proxy/proxy_script_decider.cc View 1 2 3 14 chunks +116 lines, -102 lines 0 comments Download
A + net/proxy/proxy_script_decider_unittest.cc View 23 chunks +118 lines, -243 lines 0 comments Download
M net/proxy/proxy_service.h View 3 chunks +3 lines, -2 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 2 chunks +137 lines, -1 line 0 comments Download
M net/proxy/proxy_service_unittest.cc View 11 chunks +25 lines, -30 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
eroman
9 years ago (2011-12-10 00:16:02 UTC) #1
willchan no longer on Chromium
lgtm http://codereview.chromium.org/8896019/diff/8001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): http://codereview.chromium.org/8896019/diff/8001/net/proxy/proxy_script_decider.cc#newcode232 net/proxy/proxy_script_decider.cc:232: next_state_ = STATE_VERIFY_PAC_SCRIPT; Can you just move the ...
9 years ago (2011-12-12 23:53:47 UTC) #2
eroman
I'll ping when new patchset is up. Here are initial responses: http://codereview.chromium.org/8896019/diff/8001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): ...
9 years ago (2011-12-13 00:10:26 UTC) #3
willchan no longer on Chromium
http://codereview.chromium.org/8896019/diff/8001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): http://codereview.chromium.org/8896019/diff/8001/net/proxy/proxy_script_decider.cc#newcode232 net/proxy/proxy_script_decider.cc:232: next_state_ = STATE_VERIFY_PAC_SCRIPT; On 2011/12/13 00:10:26, eroman wrote: > ...
9 years ago (2011-12-13 01:17:09 UTC) #4
eroman
Uploaded new patchset. @battre: Please review my change to parse_error.js (during PAC detection the script ...
9 years ago (2011-12-13 02:25:30 UTC) #5
eroman
Actually add Dominic this time.
9 years ago (2011-12-13 04:14:11 UTC) #6
battre
On 2011/12/13 04:14:11, eroman wrote: > Actually add Dominic this time. Can you explain the ...
9 years ago (2011-12-13 10:03:28 UTC) #7
eroman
@battre: Prior to this change, the decision on which PAC script to use (in the ...
9 years ago (2011-12-13 19:21:21 UTC) #8
battre
Thanks for the explanation. LGTM for parse_error.js.
9 years ago (2011-12-13 20:43:44 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/8896019/20001
9 years ago (2011-12-13 20:52:50 UTC) #10
commit-bot: I haz the power
Can't apply patch for file net/proxy/proxy_script_decider.cc. While running patch -p0 --forward --force; patching file net/proxy/proxy_script_decider.cc ...
9 years ago (2011-12-13 20:53:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/8896019/20006
9 years ago (2011-12-13 21:23:46 UTC) #12
commit-bot: I haz the power
9 years ago (2011-12-13 21:24:05 UTC) #13
Can't apply patch for file net/proxy/proxy_script_decider.cc.
While running patch -p0 --forward --force;
patching file net/proxy/proxy_script_decider.cc
Hunk #1 FAILED at 2.
Hunk #2 FAILED at 32.
Hunk #3 FAILED at 84.
Hunk #4 FAILED at 105.
Hunk #5 FAILED at 135.
Hunk #6 FAILED at 151.
Hunk #7 FAILED at 166.
Hunk #8 FAILED at 193.
Hunk #9 FAILED at 206.
Hunk #10 FAILED at 214.
Hunk #11 FAILED at 302.
Hunk #12 FAILED at 338.
Hunk #13 FAILED at 364.
Hunk #14 FAILED at 376.
14 out of 14 hunks FAILED -- saving rejects to file
net/proxy/proxy_script_decider.cc.rej

Powered by Google App Engine
This is Rietveld 408576698