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

Issue 333006: Add three of the six extensions to PAC that Internet Explorer supports. ... (Closed)

Created:
11 years, 2 months ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Paweł Hajdan Jr.
Visibility:
Public.

Description

Add three of the six extensions to PAC that Internet Explorer supports. The following descriptions were taken from <http://blogs.msdn.com/wndp/articles/IPV6_PAC_Extensions_v0_9.aspx>; ---------------------------- * myIpAddressEx(): Returns a semi-colon delimited string containing all IP addresses for localhost (IPv6 and/or IPv4), or an empty string if unable to resolve localhost to an IP address. * dnsResolveEx(host): Returns semi-colon delimited string containing IPv6 and IPv4 addresses or an empty string if host is not resolvable. * isResolvableEx(): Returns TRUE if the host is resolvable to a IPv4 or IPv6 address, FALSE otherwise. ---------------------------- These differ from the vanilla PAC functions in the following ways: * myIpAddressEx() returns all the addrsses for localhost (including IPv6 ones), whereas myIpAddress() only returns the first IPv4 one. * On failure, myIpAddress() returns "127.0.0.1" whereas on failure myIpAddressEx() returns empty string. * dnsResolveEx() returns a list of addresses (including IPV6 ones), whereas dnsResolve() only returns the first IPv4 address. * On failure, dnsResolve() returns |null|, whereas on failure dnsResolveEx() returns empty string. BUG=25407 TEST=ProxyResolverV8Test.DNSResolutionFailure, ProxyResolverJSBindingsTest.RestrictAddressFamily, ProxyResolverJSBindingsTest.ExFunctionsReturnList Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30127

Patch Set 1 #

Total comments: 1

Patch Set 2 : Make sure build_config.h precedes the use of #if defined(OS_WIN) #

Patch Set 3 : Add another unittest, for failure cases #

Patch Set 4 : Mark new file as svn:eol-style LF #

Total comments: 35

Patch Set 5 : Address wtc's comments #

Total comments: 2

Patch Set 6 : Sync and fix typo #

Patch Set 7 : sync a merge issue #

Patch Set 8 : address more of wtc's comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -18 lines) Patch
M net/base/load_log_event_type_list.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M net/data/proxy_resolver_v8_unittest/bindings.js View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
A net/data/proxy_resolver_v8_unittest/dns_fail.js View 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
M net/proxy/proxy_resolver_js_bindings.h View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M net/proxy/proxy_resolver_js_bindings.cc View 1 2 3 4 5 6 7 3 chunks +40 lines, -5 lines 1 comment Download
M net/proxy/proxy_resolver_js_bindings_unittest.cc View 1 2 3 4 5 6 6 chunks +112 lines, -8 lines 0 comments Download
M net/proxy/proxy_resolver_script.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -1 line 1 comment Download
M net/proxy/proxy_resolver_v8.cc View 1 2 3 4 5 6 7 4 chunks +106 lines, -2 lines 2 comments Download
M net/proxy/proxy_resolver_v8_unittest.cc View 1 2 3 4 5 5 chunks +40 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
eroman
http://codereview.chromium.org/333006/diff/1/2 File net/proxy/proxy_resolver_js_bindings.cc (left): http://codereview.chromium.org/333006/diff/1/2#oldcode107 Line 107: // TODO(eroman): Should this return our IP address, ...
11 years, 2 months ago (2009-10-23 01:15:03 UTC) #1
wtc
LGTM. http://codereview.chromium.org/333006/diff/7025/4011 File net/base/load_log_event_type_list.h (right): http://codereview.chromium.org/333006/diff/7025/4011#newcode70 Line 70: // Measures the time taken to execute ...
11 years, 2 months ago (2009-10-23 21:38:48 UTC) #2
eroman
Thanks for the review! http://codereview.chromium.org/333006/diff/7025/4011 File net/base/load_log_event_type_list.h (right): http://codereview.chromium.org/333006/diff/7025/4011#newcode70 Line 70: // Measures the time ...
11 years, 2 months ago (2009-10-23 23:55:20 UTC) #3
wtc
LGTM. http://codereview.chromium.org/333006/diff/7025/4004 File net/proxy/proxy_resolver_js_bindings.cc (right): http://codereview.chromium.org/333006/diff/7025/4004#newcode13 Line 13: #include "net/proxy/proxy_resolver_js_bindings.h" On 2009/10/23 23:55:20, eroman wrote: ...
11 years, 2 months ago (2009-10-24 00:35:17 UTC) #4
eroman
http://codereview.chromium.org/333006/diff/7025/4004 File net/proxy/proxy_resolver_js_bindings.cc (right): http://codereview.chromium.org/333006/diff/7025/4004#newcode108 Line 108: virtual std::string MyIpAddress() { On 2009/10/24 00:35:17, wtc ...
11 years, 2 months ago (2009-10-24 01:03:00 UTC) #5
wtc
11 years, 2 months ago (2009-10-24 04:40:59 UTC) #6
LGTM!

http://codereview.chromium.org/333006/diff/2018/3007
File net/proxy/proxy_resolver_js_bindings.cc (right):

http://codereview.chromium.org/333006/diff/2018/3007#newcode123
Line 123: // Disable IPv6 results. We do this because Internet Explorer does it
--
I studied the original specification of the PAC script helper functions today.
Although not explicitly stated, it's clear that those functions should only
return IPv4 addresses.  The evidence is the mention of "dotted decimal"
notation and "0" and "255" as masks for addresses.

So we now have a stronger reason to get only IPv4 results than "because
Internet Explorer does it".

http://codereview.chromium.org/333006/diff/2018/3010
File net/proxy/proxy_resolver_script.h (right):

http://codereview.chromium.org/333006/diff/2018/3010#newcode272
Line 272: "    var ip = dnsResolveEx(host);\n" \
Nit: since dnsResolveEx returns all the addresses of the local host,
perhaps this variable should be named addrs or ipList.

http://codereview.chromium.org/333006/diff/2018/3009
File net/proxy/proxy_resolver_v8.cc (right):

http://codereview.chromium.org/333006/diff/2018/3009#newcode17
Line 17: // Notes on the javascript environment:
Very nice!  Thanks.

http://codereview.chromium.org/333006/diff/2018/3009#newcode55
Line 55: // dnsResolve()     | IPv4/IPv6   |  IPv4             |  IPv4
It's possible that Firefox's dnsResolve returns IPv6 results unintentionally.
We should file a bug report.

Powered by Google App Engine
This is Rietveld 408576698