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

Issue 1710733002: Move multipart resource handling to core/fetch (2/2) (Closed)

Created:
4 years, 10 months ago by yhirano
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, Bryan McQuade, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, jam, Nate Chapin, kinuko+watch, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@multipart-cleanup
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move multipart resource handling to core/fetch (2/2) Currently a multipart/x-mixed-replace response is parsed in the content layer and dispatched to clients in blink. It is problematic because the parser calls callbacks in a strange way and special handling code scatters from core/html to content/child. This change removes multipart_response_delegate and starts using MultipartImageResourceParser. Also, this change removes multipart/x-mixed-replace related code from ImageDocument. ImageDocument previously re-fetched the resource, but with this change it uses the currently loading resource. BUG=570608 Committed: https://crrev.com/998e1a037a811ec74dbcca021503ddf3f4b86d60 Cr-Commit-Position: refs/heads/master@{#380523}

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : rebase #

Total comments: 12

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 11

Patch Set 14 : #

Total comments: 2

Patch Set 15 : #

Patch Set 16 : rebase #

Total comments: 11

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -1255 lines) Patch
M chrome/renderer/page_load_histograms.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -4 lines 0 comments Download
M components/page_load_metrics/renderer/metrics_render_frame_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -3 lines 0 comments Download
D content/child/multipart_response_delegate.h View 1 chunk +0 lines, -139 lines 0 comments Download
D content/child/multipart_response_delegate.cc View 1 2 3 4 5 6 1 chunk +0 lines, -288 lines 0 comments Download
D content/child/multipart_response_delegate_unittest.cc View 1 chunk +0 lines, -529 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +17 lines, -41 lines 0 comments Download
M content/child/web_url_loader_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +1 line, -114 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/npapi/webplugin_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/multipart/multipart-main-resource-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/DOMImplementation.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +54 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 1 2 3 4 5 6 7 1 chunk +10 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +8 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocument.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocument.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +6 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebURLResponse.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceResponse.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceResponse.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/public/platform/WebURLResponse.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -3 lines 0 comments Download
M tools/copyright_scanner/third_party_files_whitelist.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 79 (32 generated)
yhirano
4 years, 10 months ago (2016-02-20 01:10:26 UTC) #6
yhirano
+hiroshige@, japhet@
4 years, 10 months ago (2016-02-20 01:10:50 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/180001
4 years, 10 months ago (2016-02-22 06:20:28 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-22 07:48:43 UTC) #12
hiroshige
https://codereview.chromium.org/1710733002/diff/200001/content/child/multipart_response_delegate_unittest.cc File content/child/multipart_response_delegate_unittest.cc (left): https://codereview.chromium.org/1710733002/diff/200001/content/child/multipart_response_delegate_unittest.cc#oldcode137 content/child/multipart_response_delegate_unittest.cc:137: // ParseHeaders tests The tests in Lines 137--184 are ...
4 years, 10 months ago (2016-02-25 21:49:29 UTC) #13
Nate Chapin
https://codereview.chromium.org/1710733002/diff/200001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1710733002/diff/200001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode476 third_party/WebKit/Source/core/fetch/Resource.cpp:476: // If there's no boundary, just handle the request ...
4 years, 10 months ago (2016-02-25 22:07:53 UTC) #14
hiroshige
https://codereview.chromium.org/1710733002/diff/200001/content/child/web_url_loader_impl_unittest.cc File content/child/web_url_loader_impl_unittest.cc (left): https://codereview.chromium.org/1710733002/diff/200001/content/child/web_url_loader_impl_unittest.cc#oldcode160 content/child/web_url_loader_impl_unittest.cc:160: EXPECT_TRUE(expect_multipart_response_ || !did_receive_response_); Can this be |EXPECT_FALSE(did_receive_response_);|?
4 years, 10 months ago (2016-02-26 19:02:13 UTC) #15
hiroshige
Actually, I'm merging two of your CLs: - https://codereview.chromium.org/1710733002/ (this CL) - https://codereview.chromium.org/1738553002/ locally at ...
4 years, 10 months ago (2016-02-26 19:06:19 UTC) #16
yhirano
On 2016/02/26 19:06:19, hiroshige wrote: > Actually, I'm merging two of your CLs: > - ...
4 years, 10 months ago (2016-02-26 22:23:39 UTC) #17
yhirano
https://codereview.chromium.org/1710733002/diff/200001/content/child/multipart_response_delegate_unittest.cc File content/child/multipart_response_delegate_unittest.cc (left): https://codereview.chromium.org/1710733002/diff/200001/content/child/multipart_response_delegate_unittest.cc#oldcode137 content/child/multipart_response_delegate_unittest.cc:137: // ParseHeaders tests On 2016/02/25 21:49:29, hiroshige wrote: > ...
4 years, 9 months ago (2016-02-26 23:07:42 UTC) #18
yhirano
https://codereview.chromium.org/1710733002/diff/200001/content/child/web_url_loader_impl_unittest.cc File content/child/web_url_loader_impl_unittest.cc (left): https://codereview.chromium.org/1710733002/diff/200001/content/child/web_url_loader_impl_unittest.cc#oldcode160 content/child/web_url_loader_impl_unittest.cc:160: EXPECT_TRUE(expect_multipart_response_ || !did_receive_response_); On 2016/02/26 19:02:12, hiroshige wrote: > ...
4 years, 9 months ago (2016-02-27 01:27:45 UTC) #19
yhirano
As talked offline, I merged https://codereview.chromium.org/1738553002/ to this CL.
4 years, 9 months ago (2016-03-01 00:00:37 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/300001
4 years, 9 months ago (2016-03-01 01:13:07 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/73871)
4 years, 9 months ago (2016-03-01 01:26:36 UTC) #27
hiroshige
bots are failing due to compile errors.
4 years, 9 months ago (2016-03-01 01:34:04 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/320001
4 years, 9 months ago (2016-03-01 02:48:09 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-01 04:10:38 UTC) #32
yhirano
On 2016/03/01 01:34:04, hiroshige wrote: > bots are failing due to compile errors. Sorry for ...
4 years, 9 months ago (2016-03-01 17:29:30 UTC) #33
Nate Chapin
:D https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp#newcode483 third_party/WebKit/Source/core/fetch/ImageResource.cpp:483: checkNotify(); I think this triggers multiple calls of ...
4 years, 9 months ago (2016-03-01 19:02:15 UTC) #34
yhirano
https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp#newcode483 third_party/WebKit/Source/core/fetch/ImageResource.cpp:483: checkNotify(); On 2016/03/01 19:02:15, Nate Chapin wrote: > I ...
4 years, 9 months ago (2016-03-01 19:43:23 UTC) #35
Nate Chapin
https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/1710733002/diff/320001/third_party/WebKit/Source/core/fetch/ImageResource.cpp#newcode483 third_party/WebKit/Source/core/fetch/ImageResource.cpp:483: checkNotify(); On 2016/03/01 19:43:23, yhirano wrote: > On 2016/03/01 ...
4 years, 9 months ago (2016-03-01 19:56:46 UTC) #36
hiroshige
https://codereview.chromium.org/1710733002/diff/340001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1710733002/diff/340001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode252 third_party/WebKit/Source/core/fetch/Resource.cpp:252: ASSERT(!errorOccurred()); This assertion fails on mac bots in layout ...
4 years, 9 months ago (2016-03-01 22:34:24 UTC) #37
yhirano
https://codereview.chromium.org/1710733002/diff/340001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1710733002/diff/340001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode252 third_party/WebKit/Source/core/fetch/Resource.cpp:252: ASSERT(!errorOccurred()); On 2016/03/01 22:34:24, hiroshige wrote: > This assertion ...
4 years, 9 months ago (2016-03-02 00:32:10 UTC) #38
yhirano
+torne@ for tools/copyright_scanner/third_party_files_whitelist.txt.
4 years, 9 months ago (2016-03-02 22:40:51 UTC) #41
Torne
https://codereview.chromium.org/1710733002/diff/380001/tools/copyright_scanner/third_party_files_whitelist.txt File tools/copyright_scanner/third_party_files_whitelist.txt (left): https://codereview.chromium.org/1710733002/diff/380001/tools/copyright_scanner/third_party_files_whitelist.txt#oldcode247 tools/copyright_scanner/third_party_files_whitelist.txt:247: content/child/multipart_response_delegate.h This is removed because the contents of this ...
4 years, 9 months ago (2016-03-03 17:03:07 UTC) #42
yhirano
4 years, 9 months ago (2016-03-04 17:40:11 UTC) #44
Tom Sepez
So the guts of the parser remain the same, and it is still only called ...
4 years, 9 months ago (2016-03-04 17:51:10 UTC) #45
hiroshige
non-owner lgtm.
4 years, 9 months ago (2016-03-04 18:10:30 UTC) #46
yhirano
+jochen@ for content/ and chrome/. +csharrison@ for components/page_load_metrics/.
4 years, 9 months ago (2016-03-07 19:57:41 UTC) #48
Charlie Harrison
https://codereview.chromium.org/1710733002/diff/380001/components/page_load_metrics/renderer/metrics_render_frame_observer.cc File components/page_load_metrics/renderer/metrics_render_frame_observer.cc (left): https://codereview.chromium.org/1710733002/diff/380001/components/page_load_metrics/renderer/metrics_render_frame_observer.cc#oldcode90 components/page_load_metrics/renderer/metrics_render_frame_observer.cc:90: // Ignore multipart responses (e.g. MHTML). Can you explain ...
4 years, 9 months ago (2016-03-07 20:07:05 UTC) #49
yhirano
https://codereview.chromium.org/1710733002/diff/380001/components/page_load_metrics/renderer/metrics_render_frame_observer.cc File components/page_load_metrics/renderer/metrics_render_frame_observer.cc (left): https://codereview.chromium.org/1710733002/diff/380001/components/page_load_metrics/renderer/metrics_render_frame_observer.cc#oldcode90 components/page_load_metrics/renderer/metrics_render_frame_observer.cc:90: // Ignore multipart responses (e.g. MHTML). On 2016/03/07 20:07:05, ...
4 years, 9 months ago (2016-03-07 20:18:27 UTC) #50
Charlie Harrison
lgtm thanks for the explanation. cc bmcquade@ fyi.
4 years, 9 months ago (2016-03-07 20:24:14 UTC) #51
jochen (gone - plz use gerrit)
lgtm
4 years, 9 months ago (2016-03-08 15:52:29 UTC) #52
yhirano
Nate, do you have any other comments?
4 years, 9 months ago (2016-03-08 17:30:28 UTC) #53
Nate Chapin
LGTM, just a couple of little details I want to double check. https://codereview.chromium.org/1710733002/diff/380001/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp ...
4 years, 9 months ago (2016-03-08 17:57:52 UTC) #54
yhirano
https://codereview.chromium.org/1710733002/diff/380001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1710733002/diff/380001/content/renderer/render_frame_impl.cc#newcode4485 content/renderer/render_frame_impl.cc:4485: (response.httpStatusCode() != 404); On 2016/03/04 17:51:10, Tom Sepez wrote: ...
4 years, 9 months ago (2016-03-08 18:40:42 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/480001
4 years, 9 months ago (2016-03-10 21:31:36 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179605)
4 years, 9 months ago (2016-03-10 21:36:33 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/500001
4 years, 9 months ago (2016-03-10 21:55:57 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179639)
4 years, 9 months ago (2016-03-10 23:14:38 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/500001
4 years, 9 months ago (2016-03-10 23:25:28 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179763)
4 years, 9 months ago (2016-03-11 00:14:48 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/500001
4 years, 9 months ago (2016-03-11 00:23:31 UTC) #71
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179850)
4 years, 9 months ago (2016-03-11 01:02:46 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710733002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710733002/500001
4 years, 9 months ago (2016-03-11 03:47:31 UTC) #75
commit-bot: I haz the power
Committed patchset #22 (id:500001)
4 years, 9 months ago (2016-03-11 05:21:33 UTC) #77
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 05:23:44 UTC) #79
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/998e1a037a811ec74dbcca021503ddf3f4b86d60
Cr-Commit-Position: refs/heads/master@{#380523}

Powered by Google App Engine
This is Rietveld 408576698