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

Issue 113187: GURL: add a HostNoBrackets() method for bracketless IPv6 literals. (Closed)

Created:
11 years, 7 months ago by pmarks
Modified:
9 years, 7 months ago
Reviewers:
eroman, sparkmaul, brettw
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

A URL can contain an IPv6 address literal, like [2001:db8::2]. Users of the GURL library sometimes need the square brackets, and sometimes don't. My proposed patch adds a HostNoBrackets() method, which returns the hostname with brackets chopped off. Tested using the Chromium source tree: hammer -C build googleurl_unittests --mode=Release hammer -C build googleurl_unittests --mode=Debug

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -0 lines) Patch
M src/gurl.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M src/gurl.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M src/gurl_unittest.cc View 1 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
pmarks
11 years, 7 months ago (2009-05-10 06:28:29 UTC) #1
brettw
When would we need this function as opposed to the regular "host" function? It would ...
11 years, 7 months ago (2009-05-10 14:50:53 UTC) #2
pmarks
On 2009/05/10 14:50:53, brettw wrote: > When would we need this function as opposed to ...
11 years, 7 months ago (2009-05-10 20:20:48 UTC) #3
eroman
As an aside, it might be useful if the canonicalization step would save an enum ...
11 years, 7 months ago (2009-05-11 18:27:54 UTC) #4
eroman
sounds good to me.
11 years, 7 months ago (2009-05-11 18:37:47 UTC) #5
sparkmaul
I've renamed PlainHost -> HostNoBrackets. As for the enum change, I think we should define ...
11 years, 7 months ago (2009-05-11 18:53:30 UTC) #6
brettw
LGTM. I don't see a burning need for the enum optimization unless we have more ...
11 years, 7 months ago (2009-05-11 19:16:24 UTC) #7
pmarks
11 years, 7 months ago (2009-05-12 22:27:57 UTC) #8
One of you will need to commit this for me.  I don't have commit access to
chromium or googleurl.

Powered by Google App Engine
This is Rietveld 408576698