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

Issue 1616943003: Teach navigation throttles how to cancel requests in WillProcessResponse. (Closed)

Created:
4 years, 11 months ago by Mike West
Modified:
4 years, 10 months ago
Reviewers:
clamy, davidben, mmenke, nasko
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, loading-reviews_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Teach navigation throttles how to cancel requests in WillProcessResponse. This is the first step towards moving various response-time checks up from Blink into the browser. To support things like 'X-Frame-Options', we'll need to do throttle checks after we can evaluate headers. This patch starts us down that path by teaching NavigationHandleImpl, NavigationResourceThrottle, and NavigationThrottle about response-time checks. This patch shouldn't introduce any behavioral changes, as no NavigationThrottle actually uses the new functionality yet. BUG=555418 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/409b51d438ea3f99d37025372adaf4d730553857 Cr-Commit-Position: refs/heads/master@{#372332}

Patch Set 1 #

Patch Set 2 : PlzNavigate #

Patch Set 3 : Fiddling. #

Total comments: 28

Patch Set 4 : Feedback. #

Total comments: 14

Patch Set 5 : Feedback. #

Total comments: 5

Patch Set 6 : Feedback. #

Total comments: 1

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -13 lines) Patch
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 3 chunks +15 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 3 chunks +68 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_unittest.cc View 1 2 3 4 5 30 chunks +161 lines, -4 lines 0 comments Download
M content/browser/loader/navigation_resource_throttle.cc View 1 2 3 4 5 4 chunks +21 lines, -5 lines 0 comments Download
M content/public/browser/navigation_throttle.h View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M content/public/browser/navigation_throttle.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (13 generated)
Mike West
In the interests of smaller patches that march towards something reasonable, I've extracted this out ...
4 years, 11 months ago (2016-01-21 13:22:58 UTC) #2
Mike West
On 2016/01/21 at 13:22:58, Mike West wrote: > In the interests of smaller patches that ...
4 years, 11 months ago (2016-01-21 17:02:55 UTC) #3
Mike West
4 years, 11 months ago (2016-01-21 17:03:14 UTC) #5
nasko
On 2016/01/21 17:02:55, Mike West wrote: > On 2016/01/21 at 13:22:58, Mike West wrote: > ...
4 years, 11 months ago (2016-01-21 17:08:27 UTC) #6
davidben
On 2016/01/21 17:08:27, nasko wrote: > On 2016/01/21 17:02:55, Mike West wrote: > > On ...
4 years, 11 months ago (2016-01-21 20:48:18 UTC) #7
Mike West
> > > Looks like some download browsertests are failing that didn't fail in the ...
4 years, 11 months ago (2016-01-22 12:56:08 UTC) #8
clamy
I was more thinking of making a PlzNavigate specific patch that enables the new stuff ...
4 years, 11 months ago (2016-01-22 13:06:00 UTC) #9
Mike West
On 2016/01/22 at 13:06:00, clamy wrote: > I was more thinking of making a PlzNavigate ...
4 years, 11 months ago (2016-01-25 08:30:23 UTC) #10
Mike West
+mmenke for reals.
4 years, 11 months ago (2016-01-25 08:30:54 UTC) #12
clamy
Thanks! A few comments. https://codereview.chromium.org/1616943003/diff/40001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1616943003/diff/40001/content/browser/frame_host/navigation_handle_impl.cc#newcode292 content/browser/frame_host/navigation_handle_impl.cc:292: DCHECK(result != NavigationThrottle::DEFER); This should ...
4 years, 11 months ago (2016-01-25 16:36:22 UTC) #13
mmenke
Only looked at loader/ (Wish I had more time to better understand navigation, but alas... ...
4 years, 11 months ago (2016-01-25 17:57:33 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616943003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616943003/60001
4 years, 11 months ago (2016-01-26 09:40:47 UTC) #17
Mike West
Thanks clamy@ and mmenke@! I've addressed feedback below. clamy@, I'd appreciate it if you could ...
4 years, 11 months ago (2016-01-26 09:41:42 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/164346)
4 years, 11 months ago (2016-01-26 11:44:56 UTC) #20
clamy
Thanks! The c/b/frame_host part is looking mostly good. A few comments below. https://codereview.chromium.org/1616943003/diff/40001/content/browser/loader/navigation_resource_throttle.cc File content/browser/loader/navigation_resource_throttle.cc ...
4 years, 11 months ago (2016-01-26 14:08:55 UTC) #21
mmenke
https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc File content/browser/loader/navigation_resource_throttle.cc (right): https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc#newcode43 content/browser/loader/navigation_resource_throttle.cc:43: CHECK_NE(result, NavigationThrottle::DEFER); DCHECK here, as well, I assume. https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc#newcode49 ...
4 years, 11 months ago (2016-01-26 16:40:08 UTC) #22
clamy
https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc File content/browser/loader/navigation_resource_throttle.cc (right): https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc#newcode74 content/browser/loader/navigation_resource_throttle.cc:74: if (!navigation_handle) { On 2016/01/26 16:40:08, mmenke wrote: > ...
4 years, 11 months ago (2016-01-26 16:48:05 UTC) #23
mmenke
On 2016/01/26 16:48:05, clamy wrote: > https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc > File content/browser/loader/navigation_resource_throttle.cc (right): > > https://codereview.chromium.org/1616943003/diff/60001/content/browser/loader/navigation_resource_throttle.cc#newcode74 > ...
4 years, 11 months ago (2016-01-26 16:50:13 UTC) #24
Mike West
Thanks, clamy@ and mmenke@. I hope that the latest patchset addresses your feedback. https://codereview.chromium.org/1616943003/diff/60001/content/browser/frame_host/navigation_handle_impl_unittest.cc File ...
4 years, 11 months ago (2016-01-27 07:44:33 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616943003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616943003/80001
4 years, 11 months ago (2016-01-27 07:44:52 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/159692)
4 years, 11 months ago (2016-01-27 09:27:29 UTC) #29
clamy
Thanks! Lgtm with a few nits. https://codereview.chromium.org/1616943003/diff/80001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1616943003/diff/80001/content/browser/frame_host/navigation_handle_impl.cc#newcode297 content/browser/frame_host/navigation_handle_impl.cc:297: // If we're ...
4 years, 11 months ago (2016-01-27 14:13:21 UTC) #30
mmenke
LGTM https://codereview.chromium.org/1616943003/diff/80001/content/browser/loader/navigation_resource_throttle.cc File content/browser/loader/navigation_resource_throttle.cc (right): https://codereview.chromium.org/1616943003/diff/80001/content/browser/loader/navigation_resource_throttle.cc#newcode8 content/browser/loader/navigation_resource_throttle.cc:8: #include "base/logging.h" While you're here, should also include ...
4 years, 11 months ago (2016-01-27 16:34:08 UTC) #31
nasko
LGTM once all reviewers nits are resolved. https://codereview.chromium.org/1616943003/diff/80001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1616943003/diff/80001/content/browser/frame_host/navigation_handle_impl.cc#newcode434 content/browser/frame_host/navigation_handle_impl.cc:434: // No ...
4 years, 11 months ago (2016-01-27 18:11:08 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616943003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616943003/100001
4 years, 10 months ago (2016-01-29 07:37:37 UTC) #34
Mike West
https://codereview.chromium.org/1616943003/diff/100001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1616943003/diff/100001/content/browser/frame_host/navigation_handle_impl.cc#newcode166 content/browser/frame_host/navigation_handle_impl.cc:166: ReadyToCommitNavigation(render_frame_host_, response_headers_); This is a substantive change from the ...
4 years, 10 months ago (2016-01-29 07:38:38 UTC) #35
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/160896)
4 years, 10 months ago (2016-01-29 09:36:53 UTC) #37
clamy
Thanks! Lgtm
4 years, 10 months ago (2016-01-29 10:23:15 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616943003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616943003/100001
4 years, 10 months ago (2016-01-29 10:34:28 UTC) #41
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-01-29 11:57:06 UTC) #42
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/409b51d438ea3f99d37025372adaf4d730553857 Cr-Commit-Position: refs/heads/master@{#372332}
4 years, 10 months ago (2016-01-29 11:59:04 UTC) #44
Mike West
4 years, 10 months ago (2016-01-29 15:35:59 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1645363002/ by mkwst@chromium.org.

The reason for reverting is: Windows tree doesn't like me:
https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%2....

Powered by Google App Engine
This is Rietveld 408576698