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

Issue 2262183002: [NoStatePrefetch] Do not send responses to renderer in prefetch mode. (Closed)

Created:
4 years, 4 months ago by droger
Modified:
4 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, loading-reviews_chromium.org, pasko
Base URL:
https://chromium.googlesource.com/chromium/src.git@prefetchProto
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NoStatePrefetch] Do not send responses to renderer in prefetch mode. Only the main frame is sent, to allow running the preload scanner on it, other resources are not. The renderer does not need this data, and so this CL avoids having them in the renderer memory unnnecessarily. This is done by creating the DetachableResourceHandler in detached mode when such a blocked resource is found. BUG=632361 Committed: https://crrev.com/308308a95a348f446a25de9c9bd789c5a94c92c4 Cr-Commit-Position: refs/heads/master@{#417926}

Patch Set 1 : comments #

Total comments: 5

Patch Set 2 : Renderer side implementation #

Patch Set 3 : Fix uninitialized variable #

Total comments: 4

Patch Set 4 : move more logic to renderer #

Patch Set 5 : Cancel requests #

Patch Set 6 : unittest #

Patch Set 7 : Cleanup #

Total comments: 5

Patch Set 8 : Capitalization #

Patch Set 9 : remove TODO #

Total comments: 8

Patch Set 10 : fix typo #

Patch Set 11 : remove WebDocument api #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -7 lines) Patch
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -5 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +46 lines, -0 lines 0 comments Download
M content/child/request_extra_data.h View 1 2 3 4 5 6 2 chunks +15 lines, -0 lines 0 comments Download
M content/child/request_extra_data.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M content/child/resource_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/web_url_request_util.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/common/resource_request.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 91 (39 generated)
droger
This is how I intend to prevent prefetches to go into blink memory cache. This ...
4 years, 4 months ago (2016-08-22 13:47:59 UTC) #5
Randy Smith (Not in Mondays)
(Drive by, not intending to do a thorough review.) What were your thoughts about the ...
4 years, 4 months ago (2016-08-22 13:59:15 UTC) #7
droger
On 2016/08/22 13:59:15, Randy Smith - Not in Fridays wrote: > (Drive by, not intending ...
4 years, 4 months ago (2016-08-22 14:06:46 UTC) #10
mmenke
https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1641 content/browser/loader/resource_dispatcher_host_impl.cc:1641: const bool detached = style: const is generally not ...
4 years, 4 months ago (2016-08-22 14:08:23 UTC) #12
mmenke
https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1646 content/browser/loader/resource_dispatcher_host_impl.cc:1646: (!sync_result && IsDetachableResourceType(request_data.resource_type))) { On 2016/08/22 14:08:22, mmenke wrote: ...
4 years, 4 months ago (2016-08-22 14:11:00 UTC) #13
droger
On 2016/08/22 14:11:00, mmenke wrote: > https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc > File content/browser/loader/resource_dispatcher_host_impl.cc (right): > > https://codereview.chromium.org/2262183002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1646 > ...
4 years, 4 months ago (2016-08-22 14:17:37 UTC) #14
Randy Smith (Not in Mondays)
On 2016/08/22 14:06:46, droger wrote: > On 2016/08/22 13:59:15, Randy Smith - Not in Fridays ...
4 years, 4 months ago (2016-08-22 14:17:53 UTC) #15
droger
mmenke, rdsmith: changed to send the information from the renderer, as requested. This is probably ...
4 years, 4 months ago (2016-08-23 09:47:29 UTC) #19
mmenke
https://codereview.chromium.org/2262183002/diff/80001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2262183002/diff/80001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1642 content/browser/loader/resource_dispatcher_host_impl.cc:1642: bool start_detached = request_data.is_prefetch_only && |is_prefetch_only| seems confusing, given ...
4 years, 4 months ago (2016-08-23 15:11:42 UTC) #29
droger
All done. This is not completely polished yet (will do another pass at comments, formats ...
4 years, 4 months ago (2016-08-24 15:56:31 UTC) #33
mmenke
On 2016/08/24 15:56:31, droger wrote: > All done. This is not completely polished yet (will ...
4 years, 4 months ago (2016-08-24 17:19:18 UTC) #34
droger
This is now ready for review.
4 years, 3 months ago (2016-08-25 11:34:58 UTC) #40
mmenke
LGTM, thanks for doing this! (The crasher I mentioned earlier has mysteriously vanished, so find ...
4 years, 3 months ago (2016-08-25 19:36:43 UTC) #41
mmenke
https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc#newcode224 content/child/web_url_request_util.cc:224: load_flags |= net::LOAD_PREFETCH; Wait....This looks problematic. Could we remove ...
4 years, 3 months ago (2016-08-25 19:41:09 UTC) #42
droger
On 2016/08/25 19:41:09, mmenke (busy) wrote: > https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc > File content/child/web_url_request_util.cc (right): > > https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc#newcode224 ...
4 years, 3 months ago (2016-08-25 19:47:51 UTC) #43
mmenke
On 2016/08/25 19:47:51, droger wrote: > On 2016/08/25 19:41:09, mmenke (busy) wrote: > > > ...
4 years, 3 months ago (2016-08-25 19:50:48 UTC) #44
mmenke
On 2016/08/25 19:50:48, mmenke (busy) wrote: > On 2016/08/25 19:47:51, droger wrote: > > On ...
4 years, 3 months ago (2016-08-25 20:01:01 UTC) #45
droger
On 2016/08/25 20:01:01, mmenke (busy) wrote: > On 2016/08/25 19:50:48, mmenke (busy) wrote: > > ...
4 years, 3 months ago (2016-08-25 20:29:11 UTC) #46
mmenke
On 2016/08/25 20:29:11, droger wrote: > On 2016/08/25 20:01:01, mmenke (busy) wrote: > > On ...
4 years, 3 months ago (2016-08-25 20:46:02 UTC) #47
clamy
Thanks! The code in content/ looks very reasonable. One question below. https://codereview.chromium.org/2262183002/diff/180001/third_party/WebKit/Source/web/WebDocument.cpp File third_party/WebKit/Source/web/WebDocument.cpp (right): ...
4 years, 3 months ago (2016-08-25 22:34:59 UTC) #48
mattcary
https://codereview.chromium.org/2262183002/diff/180001/third_party/WebKit/Source/web/WebDocument.cpp File third_party/WebKit/Source/web/WebDocument.cpp (right): https://codereview.chromium.org/2262183002/diff/180001/third_party/WebKit/Source/web/WebDocument.cpp#newcode142 third_party/WebKit/Source/web/WebDocument.cpp:142: return constUnwrap<Document>()->isPrefetchOnly(); On 2016/08/25 22:34:59, clamy wrote: > How ...
4 years, 3 months ago (2016-08-26 08:17:52 UTC) #49
droger
clamy: ping. If you don't have time to do this review, let me know and ...
4 years, 3 months ago (2016-08-29 09:22:17 UTC) #54
droger
On 2016/08/25 22:34:59, clamy wrote: > Thanks! The code in content/ looks very reasonable. One ...
4 years, 3 months ago (2016-08-29 09:26:03 UTC) #55
mattcary
lgtm No useful comments from me, just questions... https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc#newcode4076 content/renderer/render_frame_impl.cc:4076: WebURLRequestToResourceType(request) ...
4 years, 3 months ago (2016-08-29 09:27:55 UTC) #56
droger
https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc#newcode4076 content/renderer/render_frame_impl.cc:4076: WebURLRequestToResourceType(request) != RESOURCE_TYPE_MAIN_FRAME); On 2016/08/29 09:27:54, mattcary wrote: > ...
4 years, 3 months ago (2016-08-29 09:32:43 UTC) #57
droger
https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc#newcode4076 content/renderer/render_frame_impl.cc:4076: WebURLRequestToResourceType(request) != RESOURCE_TYPE_MAIN_FRAME); On 2016/08/29 09:32:42, droger wrote: > ...
4 years, 3 months ago (2016-08-29 09:35:55 UTC) #58
mattcary
On 2016/08/29 09:35:55, droger wrote: > https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc > File content/renderer/render_frame_impl.cc (right): > > https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc#newcode4076 > ...
4 years, 3 months ago (2016-08-29 09:44:03 UTC) #59
clamy
On 2016/08/29 09:22:17, droger wrote: > clamy: ping. If you don't have time to do ...
4 years, 3 months ago (2016-08-29 17:39:33 UTC) #60
mmenke
On 2016/08/29 17:39:33, clamy wrote: > On 2016/08/29 09:22:17, droger wrote: > > clamy: ping. ...
4 years, 3 months ago (2016-08-29 17:45:11 UTC) #61
droger
https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2262183002/diff/180001/content/child/web_url_request_util.cc#newcode224 content/child/web_url_request_util.cc:224: load_flags |= net::LOAD_PREFETCH; On 2016/08/25 19:41:09, mmenke wrote: > ...
4 years, 3 months ago (2016-08-30 08:47:56 UTC) #62
clamy
Thanks! The code in content/ looks mostly good, except for an issue with the ResourceType. ...
4 years, 3 months ago (2016-08-30 18:16:13 UTC) #63
clamy
@dcheng: PTAL at the changes in resource_messages.h & Blink.
4 years, 3 months ago (2016-08-30 18:17:08 UTC) #65
dcheng
I'm confused. What is prefetch? How does it work? Is it related to prerendering?
4 years, 3 months ago (2016-09-01 00:09:41 UTC) #66
clamy
This is for no-state prefetch (design doc here: https://docs.google.com/document/d/16VCYGGWau483IMSxODpg5faZny1FJ6vNK2v-BuM5EhU/edit?usp=sharing). Roughly, the goal is to eventually ...
4 years, 3 months ago (2016-09-01 00:14:20 UTC) #67
droger
Thanks for the review! https://codereview.chromium.org/2262183002/diff/220001/content/common/resource_request.h File content/common/resource_request.h (right): https://codereview.chromium.org/2262183002/diff/220001/content/common/resource_request.h#newcode177 content/common/resource_request.h:177: // The response should be ...
4 years, 3 months ago (2016-09-01 09:37:32 UTC) #68
clamy
Thanks! Lgtm with one comment. https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2262183002/diff/220001/content/renderer/render_frame_impl.cc#newcode4076 content/renderer/render_frame_impl.cc:4076: WebURLRequestToResourceType(request) != RESOURCE_TYPE_MAIN_FRAME); On ...
4 years, 3 months ago (2016-09-01 18:30:26 UTC) #69
dcheng
OK, so just so I understand: For prefetching, we still create a Page / LocalFrame ...
4 years, 3 months ago (2016-09-02 08:49:48 UTC) #70
droger
On 2016/09/02 08:49:48, dcheng wrote: > OK, so just so I understand: > > For ...
4 years, 3 months ago (2016-09-02 09:03:48 UTC) #71
dcheng
On 2016/09/02 09:03:48, droger wrote: > On 2016/09/02 08:49:48, dcheng wrote: > > OK, so ...
4 years, 3 months ago (2016-09-02 09:06:57 UTC) #72
droger
On 2016/09/02 09:06:57, dcheng wrote: > On 2016/09/02 09:03:48, droger wrote: > > On 2016/09/02 ...
4 years, 3 months ago (2016-09-02 09:23:23 UTC) #73
dcheng
On 2016/09/02 09:23:23, droger wrote: > On 2016/09/02 09:06:57, dcheng wrote: > > On 2016/09/02 ...
4 years, 3 months ago (2016-09-02 09:49:12 UTC) #74
droger
On 2016/09/02 09:49:12, dcheng wrote: > Yes. Basically, I'm wondering why we have to tell ...
4 years, 3 months ago (2016-09-02 14:01:28 UTC) #75
droger
On 2016/09/02 14:01:28, droger wrote: > On 2016/09/02 09:49:12, dcheng wrote: > > Yes. Basically, ...
4 years, 3 months ago (2016-09-05 15:47:31 UTC) #77
droger
dcheng: ping
4 years, 3 months ago (2016-09-08 07:51:42 UTC) #78
dcheng
On 2016/09/08 07:51:42, droger wrote: > dcheng: ping To me, it feels weird that the ...
4 years, 3 months ago (2016-09-09 04:42:21 UTC) #79
droger
On 2016/09/09 04:42:21, dcheng wrote: > On 2016/09/08 07:51:42, droger wrote: > > dcheng: ping ...
4 years, 3 months ago (2016-09-09 09:07:26 UTC) #80
dcheng
On 2016/09/09 09:07:26, droger wrote: > On 2016/09/09 04:42:21, dcheng wrote: > > On 2016/09/08 ...
4 years, 3 months ago (2016-09-10 02:46:29 UTC) #81
droger
Thanks for the reviews. +jochen as OWNER for content_renderer_client.
4 years, 3 months ago (2016-09-12 09:55:44 UTC) #83
jochen (gone - plz use gerrit)
lgtm
4 years, 3 months ago (2016-09-12 10:47:36 UTC) #84
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/2262183002/280001
4 years, 3 months ago (2016-09-12 11:25:15 UTC) #87
commit-bot: I haz the power
Committed patchset #11 (id:280001)
4 years, 3 months ago (2016-09-12 12:39:10 UTC) #89
commit-bot: I haz the power
4 years, 3 months ago (2016-09-12 12:41:13 UTC) #91
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/308308a95a348f446a25de9c9bd789c5a94c92c4
Cr-Commit-Position: refs/heads/master@{#417926}

Powered by Google App Engine
This is Rietveld 408576698