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

Issue 11367010: Make ResolveRelative work with all hierarchical URLs. (Closed)

Created:
8 years, 1 month ago by mkosiba (inactive)
Modified:
8 years ago
CC:
chromium-reviews
Base URL:
http://git.chromium.org/external/google-url.git@master
Visibility:
Public.

Description

Make ResolveRelative work with all hierarchical URLs. This makes the ResolveRelative method work correctly for all hierarchical URLs while preserving the special support for the "standard" schemes. The change is needed for Android WebView, where it is perfectly valid for an embedder to load a data URL with a base URL that is a custom scheme (like myapp://resources/) and then later intercept those requests. BUG=159832

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 7

Patch Set 6 : address Joth's feedback #

Total comments: 4

Patch Set 7 : improve unittests and UT docs #

Total comments: 6

Patch Set 8 : #

Total comments: 4

Patch Set 9 : fix nits #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -5 lines) Patch
M src/gurl_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M src/url_canon_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M src/url_util.cc View 1 2 3 4 5 6 7 8 2 chunks +30 lines, -3 lines 0 comments Download
M src/url_util_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +59 lines, -0 lines 1 comment Download

Messages

Total messages: 27 (0 generated)
mkosiba (inactive)
Hey! PTAL. The problem I'm trying to solve is that in WebKit KURLGoogle calls url_util::ResolveRelative ...
8 years, 1 month ago (2012-10-31 17:32:36 UTC) #1
brettw
We should also run this by abarth and/or eseidel. Some history: we used to treat ...
8 years, 1 month ago (2012-11-01 21:08:59 UTC) #2
abarth-chromium
> We could say that "://" means hierarchical on Android only, but that sounds > ...
8 years, 1 month ago (2012-11-01 21:17:10 UTC) #3
mkosiba (inactive)
@brett - thanks for explaining. I read the bug and agree that the proposed solution ...
8 years, 1 month ago (2012-11-02 10:52:57 UTC) #4
brettw
Thinking about this last night, I'm not sure that your proposed change is that bad. ...
8 years, 1 month ago (2012-11-02 22:42:30 UTC) #5
mkosiba (inactive)
On Fri, Nov 2, 2012 at 10:42 PM, Brett Wilson <brettw@chromium.org> wrote: > Under normal ...
8 years, 1 month ago (2012-11-07 16:34:28 UTC) #6
brettw
On Wed, Nov 7, 2012 at 8:34 AM, Martin Kosiba <mkosiba@chromium.org> wrote: > On Fri, ...
8 years, 1 month ago (2012-11-07 18:31:43 UTC) #7
mkosiba (inactive)
A bit more info here. So I tried adding "content" to the hierarchical URL whitelist ...
8 years, 1 month ago (2012-11-12 18:35:02 UTC) #8
brettw
Can you provide a little more background? The URLs that we're generating... are they defined ...
8 years, 1 month ago (2012-11-14 00:09:56 UTC) #9
mkosiba (inactive)
On 2012/11/14 00:09:56, brettw wrote: > Can you provide a little more background? sure! > ...
8 years, 1 month ago (2012-11-14 17:41:19 UTC) #10
mkosiba (inactive)
Hey! I uploaded a patch that makes the 'use whatever URL as base' scenario as ...
8 years, 1 month ago (2012-11-21 19:05:36 UTC) #11
mkosiba (inactive)
Ping?
8 years ago (2012-11-28 15:14:04 UTC) #12
joth
https://codereview.chromium.org/11367010/diff/11002/src/url_util.cc File src/url_util.cc (right): https://codereview.chromium.org/11367010/diff/11002/src/url_util.cc#newcode247 src/url_util.cc:247: base_is_hierarchical_only = num_slashes == 1; I think I might ...
8 years ago (2012-11-29 02:30:41 UTC) #13
mkosiba (inactive)
https://codereview.chromium.org/11367010/diff/11002/src/url_util.cc File src/url_util.cc (right): https://codereview.chromium.org/11367010/diff/11002/src/url_util.cc#newcode247 src/url_util.cc:247: base_is_hierarchical_only = num_slashes == 1; On 2012/11/29 02:30:41, joth ...
8 years ago (2012-11-29 18:44:22 UTC) #14
brettw
Sorry I've been slow on this, these URL things need some time with undivided attention ...
8 years ago (2012-11-29 19:03:09 UTC) #15
mkosiba (inactive)
Ping? You want to chat on VC about this?
8 years ago (2012-12-05 12:50:19 UTC) #16
brettw
Sorry for the delay. https://codereview.chromium.org/11367010/diff/20001/src/gurl_unittest.cc File src/gurl_unittest.cc (right): https://codereview.chromium.org/11367010/diff/20001/src/gurl_unittest.cc#newcode203 src/gurl_unittest.cc:203: {"data:/blahblah", "file.html", true, "data:/file.html"}, This ...
8 years ago (2012-12-06 00:25:10 UTC) #17
mkosiba (inactive)
another version is out, PTAL https://codereview.chromium.org/11367010/diff/20001/src/gurl_unittest.cc File src/gurl_unittest.cc (right): https://codereview.chromium.org/11367010/diff/20001/src/gurl_unittest.cc#newcode203 src/gurl_unittest.cc:203: {"data:/blahblah", "file.html", true, "data:/file.html"}, ...
8 years ago (2012-12-06 16:57:33 UTC) #18
joth
https://codereview.chromium.org/11367010/diff/27001/src/url_util_unittest.cc File src/url_util_unittest.cc (right): https://codereview.chromium.org/11367010/diff/27001/src/url_util_unittest.cc#newcode252 src/url_util_unittest.cc:252: TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) { Maybe have a function comment explicitly ...
8 years ago (2012-12-06 20:02:26 UTC) #19
mkosiba (inactive)
https://codereview.chromium.org/11367010/diff/27001/src/url_util_unittest.cc File src/url_util_unittest.cc (right): https://codereview.chromium.org/11367010/diff/27001/src/url_util_unittest.cc#newcode252 src/url_util_unittest.cc:252: TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) { On 2012/12/06 20:02:26, joth wrote: > ...
8 years ago (2012-12-10 12:32:25 UTC) #20
joth
On 10 December 2012 04:32, <mkosiba@chromium.org> wrote: > > https://codereview.chromium.**org/11367010/diff/27001/src/** > url_util_unittest.cc<https://codereview.chromium.org/11367010/diff/27001/src/url_util_unittest.cc> > File src/url_util_unittest.cc ...
8 years ago (2012-12-10 17:21:39 UTC) #21
mkosiba (inactive)
Hey Brett! Would it be helpful if we were to stick this under OS_ANDROID or ...
8 years ago (2012-12-11 17:05:55 UTC) #22
joth
I chatted a bit more with Brett on this - my understanding is:- - strongly ...
8 years ago (2012-12-11 23:13:12 UTC) #23
brettw
LGTM. Just 2 nits. After the branch, ping me and I'll check in the final ...
8 years ago (2012-12-13 21:31:44 UTC) #24
mkosiba (inactive)
Thanks Brett! https://codereview.chromium.org/11367010/diff/33001/src/url_util.cc File src/url_util.cc (right): https://codereview.chromium.org/11367010/diff/33001/src/url_util.cc#newcode266 src/url_util.cc:266: url_parse::Parsed base_parsed_authority; On 2012/12/13 21:31:44, brettw wrote: ...
8 years ago (2012-12-18 18:54:07 UTC) #25
brettw
Checked in as googleurl@181. You should do a patch to pull this version into Chrome ...
8 years ago (2012-12-20 21:52:01 UTC) #26
mkosiba (inactive)
8 years ago (2012-12-21 16:16:36 UTC) #27
Message was sent while issue was closed.
Thanks again!

The change to roll DEPS is here: https://codereview.chromium.org/11644070/ but
there were some trybot failures so I'll most likely end up submitting it next
year.

Powered by Google App Engine
This is Rietveld 408576698