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

Issue 1593015: HostResolver supports optional CNAME lookups. (Closed)

Created:
10 years, 8 months ago by cbentzel
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., darin-cc_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

HostResolver now adds AI_CANONNAME to the hint flags if a requester needs the information. Requests which want the canonical name should be treated differently from requests that do not for the same host in both the HostCache as well as in the HostResolver when combining multiple outstanding requests into a job. The motivation for this is that Kerberos SPN's for a web server are typically generated using the canonical name of the server rather than a DNS alias (both Firefox and IE have this behavior). (note: I had to revert http://codereview.chromium.org/1566012/show because net_unittests were crashing/hanging on the main buildbot, even though they weren't on the trybots. Trying to figure out why). BUG=29862 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=43947

Patch Set 1 #

Total comments: 19

Patch Set 2 : Remove inet_pton from unit test for XP build. #

Total comments: 2

Patch Set 3 : Addressing wtc's nits. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -61 lines) Patch
M chrome/browser/intranet_redirect_detector.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/intranet_redirect_detector.cc View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/net/view_net_internals_job_factory.cc View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M chrome/test/unit/chrome_test_suite.h View 2 chunks +3 lines, -1 line 0 comments Download
M net/base/address_family.h View 1 2 2 chunks +9 lines, -2 lines 2 comments Download
M net/base/address_list.h View 2 chunks +10 lines, -1 line 0 comments Download
M net/base/address_list.cc View 2 chunks +9 lines, -1 line 3 comments Download
M net/base/address_list_unittest.cc View 1 2 5 chunks +60 lines, -8 lines 0 comments Download
M net/base/host_cache.h View 1 2 2 chunks +21 lines, -8 lines 0 comments Download
M net/base/host_cache_unittest.cc View 1 2 5 chunks +71 lines, -16 lines 0 comments Download
M net/base/host_resolver.h View 1 2 3 chunks +11 lines, -0 lines 0 comments Download
M net/base/host_resolver_impl.cc View 5 chunks +11 lines, -5 lines 0 comments Download
M net/base/host_resolver_impl_unittest.cc View 1 2 5 chunks +8 lines, -2 lines 0 comments Download
M net/base/host_resolver_proc.h View 3 chunks +3 lines, -0 lines 0 comments Download
M net/base/host_resolver_proc.cc View 1 2 3 chunks +13 lines, -5 lines 0 comments Download
M net/base/mock_host_resolver.h View 2 chunks +4 lines, -1 line 0 comments Download
M net/base/mock_host_resolver.cc View 4 chunks +9 lines, -3 lines 0 comments Download
M net/proxy/proxy_resolver_js_bindings_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M net/socket/socket_test_util.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
cbentzel
If either of you run XP, could you try patching this in and running net_unittests? ...
10 years, 8 months ago (2010-04-07 17:03:17 UTC) #1
cbentzel
OK, I managed to test on XP. It turns out that inet_pton was only introduced ...
10 years, 8 months ago (2010-04-07 18:36:48 UTC) #2
wtc
LGTM. I have some nits below. After seeing the actual code, I now agree HOST_RESOLVER_FLAGS_NONE ...
10 years, 8 months ago (2010-04-07 19:16:28 UTC) #3
wtc
Patch Set 2 looks good to me. http://codereview.chromium.org/1593015/diff/3001/4008 File net/base/address_list_unittest.cc (right): http://codereview.chromium.org/1593015/diff/3001/4008#newcode130 net/base/address_list_unittest.cc:130: memset(&address, 0x0, ...
10 years, 8 months ago (2010-04-07 19:21:56 UTC) #4
eroman
LGTM. (I only reviewed the modified unit-test since I assume the rest is unchanged from ...
10 years, 8 months ago (2010-04-07 19:59:20 UTC) #5
cbentzel
wtc: Addressed nits. Sorry for the "done"'s. Rietveld doesn't seem to offer a way for ...
10 years, 8 months ago (2010-04-07 20:09:31 UTC) #6
willchan no longer on Chromium
I only looked at HostResolverFlags. http://codereview.chromium.org/1593015/diff/22002/25005 File net/base/address_family.h (right): http://codereview.chromium.org/1593015/diff/22002/25005#newcode23 net/base/address_family.h:23: typedef int HostResolverFlags; Why ...
10 years, 8 months ago (2010-04-07 20:29:03 UTC) #7
cbentzel
http://codereview.chromium.org/1593015/diff/22002/25005 File net/base/address_family.h (right): http://codereview.chromium.org/1593015/diff/22002/25005#newcode23 net/base/address_family.h:23: typedef int HostResolverFlags; Circular references - this is also ...
10 years, 8 months ago (2010-04-07 20:41:06 UTC) #8
cbentzel
> I originally called it AddressFlags. You know, I could go back to my very ...
10 years, 8 months ago (2010-04-07 20:56:47 UTC) #9
wtc
I prefer enum flags over bool arguments. A true/false argument always requires me look up ...
10 years, 8 months ago (2010-04-07 21:33:56 UTC) #10
willchan no longer on Chromium
On Wed, Apr 7, 2010 at 2:33 PM, <wtc@chromium.org> wrote: > I prefer enum flags ...
10 years, 8 months ago (2010-04-07 21:39:00 UTC) #11
cbentzel
Thanks for feedback. I'm going to submit this as is and make any name/header changes ...
10 years, 8 months ago (2010-04-07 23:22:16 UTC) #12
wtc
Chris, Eric, I have a question. http://codereview.chromium.org/1593015/diff/22002/25006 File net/base/address_list.cc (right): http://codereview.chromium.org/1593015/diff/22002/25006#newcode108 net/base/address_list.cc:108: void AddressList::Append(const struct ...
10 years, 8 months ago (2010-04-08 15:09:40 UTC) #13
eroman
http://codereview.chromium.org/1593015/diff/22002/25006 File net/base/address_list.cc (right): http://codereview.chromium.org/1593015/diff/22002/25006#newcode108 net/base/address_list.cc:108: void AddressList::Append(const struct addrinfo* head) { On 2010/04/08 15:09:40, ...
10 years, 8 months ago (2010-04-08 19:10:50 UTC) #14
wtc
10 years, 8 months ago (2010-04-08 20:11:11 UTC) #15
http://codereview.chromium.org/1593015/diff/22002/25006
File net/base/address_list.cc (right):

http://codereview.chromium.org/1593015/diff/22002/25006#newcode108
net/base/address_list.cc:108: void AddressList::Append(const struct addrinfo*
head) {
On 2010/04/08 19:10:50, eroman wrote:
>
> Append() was only exposed for use by a unittest
> (http://codereview.chromium.org/1593015) in constructing fake lists.
> 
> We could add DCHECKs for this situation since we don't expect it to happen.
> 
> Additionally we could make Append() private, and only exposed through #ifdef
> UNITTESTS.

This sounds good.

Powered by Google App Engine
This is Rietveld 408576698