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

Issue 3023048: Don't resolve IP literals. (Closed)

Created:
10 years, 4 months ago by vandebo (ex-Chrome)
Modified:
9 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., ben+cc_chromium.org
Visibility:
Public.

Description

Don't resolve IP literals. For each resolution request this checks to see if this 'host' is a literal ip address. If so, it synthesises a struct addrinfo and returns it without adding it to the cache. BUG=39830 TEST=unit tests, new and old Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56384 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56615

Patch Set 1 #

Patch Set 2 : test fixups #

Patch Set 3 : real test fix #

Patch Set 4 : Don't expect resolution to work when it might not #

Total comments: 18

Patch Set 5 : Address comments #

Total comments: 8

Patch Set 6 : Address comments #

Patch Set 7 : Nits and test+fix canonicalization #

Total comments: 6

Patch Set 8 : Address comments #

Total comments: 2

Patch Set 9 : Address nits and fix win compile problem #

Patch Set 10 : Fix windows test #

Patch Set 11 : Better fix #

Patch Set 12 : Rebase #

Patch Set 13 : Rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -86 lines) Patch
M chrome/browser/net/predictor_unittest.cc View 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M net/base/address_list.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -14 lines 0 comments Download
M net/base/address_list.cc View 1 2 3 4 5 6 7 2 chunks +47 lines, -44 lines 0 comments Download
M net/base/address_list_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +52 lines, -11 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 3 4 5 6 7 12 2 chunks +17 lines, -2 lines 0 comments Download
M net/base/host_resolver_impl_unittest.cc View 1 2 3 4 7 12 1 chunk +0 lines, -5 lines 0 comments Download
M net/base/mock_host_resolver.cc View 5 6 7 8 12 3 chunks +17 lines, -9 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
vandebo (ex-Chrome)
10 years, 4 months ago (2010-08-09 22:51:25 UTC) #1
eroman
You also need to update mock_host_resolver.{h,cc}. In particular, see the AddIPLiteralRule(). That code is no ...
10 years, 4 months ago (2010-08-11 22:17:09 UTC) #2
vandebo (ex-Chrome)
On 2010/08/11 22:17:09, eroman wrote: > You also need to update mock_host_resolver.{h,cc}. > > In ...
10 years, 4 months ago (2010-08-12 03:13:07 UTC) #3
eroman
> I don't think that is correct - the host_pattern part of AddIPLiteralRule need > ...
10 years, 4 months ago (2010-08-12 18:19:47 UTC) #4
vandebo (ex-Chrome)
Good points all around, I think I've addressed them. On 2010/08/12 18:19:47, eroman wrote: > ...
10 years, 4 months ago (2010-08-13 00:55:00 UTC) #5
eroman
LGTM after looking at my CanonicalizeIPAddress() comments. http://codereview.chromium.org/3023048/diff/9002/32003 File net/base/address_list.h (right): http://codereview.chromium.org/3023048/diff/9002/32003#newcode25 net/base/address_list.h:25: // Construct ...
10 years, 4 months ago (2010-08-13 01:26:08 UTC) #6
vandebo (ex-Chrome)
http://codereview.chromium.org/3023048/diff/9002/32003 File net/base/address_list.h (right): http://codereview.chromium.org/3023048/diff/9002/32003#newcode25 net/base/address_list.h:25: // Construct an address list for a single IP ...
10 years, 4 months ago (2010-08-13 03:44:57 UTC) #7
eroman
10 years, 4 months ago (2010-08-13 08:04:44 UTC) #8
LGTM

http://codereview.chromium.org/3023048/diff/22002/27006
File net/base/address_list.h (right):

http://codereview.chromium.org/3023048/diff/22002/27006#newcode26
net/base/address_list.h:26: // |canonicalize_name| is true, fill out the
ai_canonname field.
Please expand this comment to mention it fills ai_cannonname with the IP
literal. (Wasn't clear to me reading this).

http://codereview.chromium.org/3023048/diff/22002/27007
File net/base/address_list_unittest.cc (right):

http://codereview.chromium.org/3023048/diff/22002/27007#newcode20
net/base/address_list_unittest.cc:20: int port,
please fix indentation.

Powered by Google App Engine
This is Rietveld 408576698