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 2644133002: Do not sanitize about:blank/#foo & about:blank?foo (Closed)

Created:
3 years, 11 months ago by clamy
Modified:
3 years, 10 months ago
CC:
blink-reviews, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nasko
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not sanitize about:blank/#foo & about:blank?foo This CL ensures that the browser will not sanitize these two types of URLs. This fixes an issue with PlzNavigate where we could not go back to about:blank/#foo due to some discrepancy between the url in the FrameNavigationEntry & the url stored in the PageState of the same entry. BUG=575210 Review-Url: https://codereview.chromium.org/2644133002 Cr-Commit-Position: refs/heads/master@{#445525} Committed: https://chromium.googlesource.com/chromium/src/+/eff9252e95930e904f389f7f902bd9c815243f82

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Patch Set 3 : Addressed comments #

Total comments: 4

Patch Set 4 : Added unit test #

Total comments: 6

Patch Set 5 : Rebase + addressed comments #

Patch Set 6 : Try to fix Windows linkage error #

Patch Set 7 : Add missing include #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -13 lines) Patch
M content/browser/child_process_security_policy_impl.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M url/url_constants.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M url/url_constants.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M url/url_util.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 1 comment Download
M url/url_util.cc View 1 2 3 4 5 2 chunks +16 lines, -0 lines 0 comments Download
M url/url_util_unittest.cc View 1 2 3 4 5 6 2 chunks +16 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (32 generated)
clamy
@creis: PTAL https://codereview.chromium.org/2644133002/diff/1/content/public/common/url_constants.h File content/public/common/url_constants.h (right): https://codereview.chromium.org/2644133002/diff/1/content/public/common/url_constants.h#newcode30 content/public/common/url_constants.h:30: CONTENT_EXPORT extern const char kAboutBlankPath[]; Note: I've ...
3 years, 11 months ago (2017-01-19 17:54:51 UTC) #5
Charlie Reis
I like this! Adding mkwst@ in case we want to move the IsAboutBlankURL utility to ...
3 years, 11 months ago (2017-01-19 22:36:35 UTC) #9
Mike West
On 2017/01/19 at 22:36:35, creis wrote: > I like this! Adding mkwst@ in case we ...
3 years, 11 months ago (2017-01-20 09:10:37 UTC) #10
clamy
Thanks! As per suggestions, I moved the util code in url/. PTAL https://codereview.chromium.org/2644133002/diff/1/content/public/common/url_constants.h File content/public/common/url_constants.h ...
3 years, 11 months ago (2017-01-20 12:51:53 UTC) #13
Mike West
LGTM % tests. https://codereview.chromium.org/2644133002/diff/40001/url/url_util.cc File url/url_util.cc (right): https://codereview.chromium.org/2644133002/diff/40001/url/url_util.cc#newcode623 url/url_util.cc:623: return true; There's enough logic here ...
3 years, 11 months ago (2017-01-20 12:57:57 UTC) #14
clamy
Thanks! https://codereview.chromium.org/2644133002/diff/40001/url/url_util.cc File url/url_util.cc (right): https://codereview.chromium.org/2644133002/diff/40001/url/url_util.cc#newcode623 url/url_util.cc:623: return true; On 2017/01/20 12:57:56, Mike West (sloooooow) ...
3 years, 11 months ago (2017-01-20 13:19:28 UTC) #17
Charlie Reis
Thanks! LGTM with nits. Once this lands, we can update WillHandleBrowserAboutURL to get omnibox navigations ...
3 years, 11 months ago (2017-01-20 20:31:02 UTC) #20
clamy
Thanks! Filing a bug sgtm. https://codereview.chromium.org/2644133002/diff/60001/url/url_util.h File url/url_util.h (right): https://codereview.chromium.org/2644133002/diff/60001/url/url_util.h#newcode156 url/url_util.h:156: // Check whether the ...
3 years, 11 months ago (2017-01-23 12:26:27 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/80001
3 years, 11 months ago (2017-01-23 12:26:54 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/156652)
3 years, 11 months ago (2017-01-23 13:17:10 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/100001
3 years, 11 months ago (2017-01-23 13:40:13 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/25622)
3 years, 11 months ago (2017-01-23 13:50:24 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/120001
3 years, 11 months ago (2017-01-23 13:57:28 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/334287) win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
3 years, 11 months ago (2017-01-23 13:58:18 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/120001
3 years, 11 months ago (2017-01-23 14:21:39 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/352984)
3 years, 11 months ago (2017-01-23 14:22:33 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/120001
3 years, 11 months ago (2017-01-23 14:25:06 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/334295)
3 years, 11 months ago (2017-01-23 14:26:15 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/120001
3 years, 11 months ago (2017-01-23 15:47:23 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/368853)
3 years, 11 months ago (2017-01-23 18:00:40 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644133002/120001
3 years, 11 months ago (2017-01-23 18:04:43 UTC) #50
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/eff9252e95930e904f389f7f902bd9c815243f82
3 years, 11 months ago (2017-01-23 22:49:41 UTC) #53
brettw
https://codereview.chromium.org/2644133002/diff/120001/url/url_util.h File url/url_util.h (right): https://codereview.chromium.org/2644133002/diff/120001/url/url_util.h#newcode160 url/url_util.h:160: URL_EXPORT bool IsAboutBlank(const GURL& url); url_util is not right ...
3 years, 11 months ago (2017-01-26 21:30:43 UTC) #55
clamy
On 2017/01/26 21:30:43, brettw (ping after 24h) wrote: > https://codereview.chromium.org/2644133002/diff/120001/url/url_util.h > File url/url_util.h (right): > ...
3 years, 10 months ago (2017-01-27 12:35:13 UTC) #56
brettw
3 years, 10 months ago (2017-02-07 05:08:16 UTC) #57
Message was sent while issue was closed.
On 2017/01/27 12:35:13, clamy (very slow - traveling) wrote:
> On 2017/01/26 21:30:43, brettw (ping after 24h) wrote:
> > https://codereview.chromium.org/2644133002/diff/120001/url/url_util.h
> > File url/url_util.h (right):
> > 
> >
>
https://codereview.chromium.org/2644133002/diff/120001/url/url_util.h#newcode160
> > url/url_util.h:160: URL_EXPORT bool IsAboutBlank(const GURL& url);
> > url_util is not right right place for this function. This is really the
> > infrastructure that underlies both GURL and KURL, rather than functions that
> > operate on URLs. This is probably misleading given the name, but you can see
> > that there are no other functions dealing with GURL here.
> > 
> > Can you remove this function?
> > 
> > On https://codereview.chromium.org/2584513003/ I recommended adding a
> > "EqualsIgnoringRef function on GURL. Then you can change the constant to
just
> > "about:blank" and the two callers can call
EqualsIgnoringRef(kAboutBlankUrl");
> > 
> > I don't think this will be slower than the current implementation. Are there
> > cases where this implementation wouldn't work?
> 
> Sure I can move that in a follow up patch when Arthur's patch has landed. I'll
> see if EqualsIgnoringRef work for our specific use case and use it if it does.

Thanks!

Powered by Google App Engine
This is Rietveld 408576698