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

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

Created:
4 years, 10 months ago by yhirano
Modified:
4 years, 9 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@multipart-cleanup-preliminary
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move multipart resource handling to core/fetch (1/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 adds MultipartImageResourceParser in core/fetch. It is basically copied from multipart_response_delegate. BUG=570608 Committed: https://crrev.com/79aba5a54291da8765270317b5e79d643d96cec6 Cr-Commit-Position: refs/heads/master@{#380431}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 15

Patch Set 3 : #

Total comments: 23

Patch Set 4 : rebase #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : rebase #

Total comments: 10

Patch Set 8 : #

Total comments: 25

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+861 lines, -0 lines) Patch
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
M content/child/web_url_loader_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +59 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h View 1 2 3 4 5 6 7 8 1 chunk +94 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +201 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +479 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 56 (22 generated)
yhirano
Hi, can you take a look? Though the latter part (https://codereview.chromium.org/1710733002/) is still WIP, I ...
4 years, 10 months ago (2016-02-19 03:40:15 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1693183002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1693183002/180001
4 years, 10 months ago (2016-02-22 06:20:27 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-22 07:30:34 UTC) #15
hiroshige
https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc#newcode1174 content/child/web_url_loader_impl.cc:1174: bool WebURLLoaderImpl::ParseAdditionalHeaders( What is the reason to place ParseAdditionalHeaders() ...
4 years, 10 months ago (2016-02-25 18:10:24 UTC) #16
hiroshige
https://codereview.chromium.org/1693183002/diff/180001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp (right): https://codereview.chromium.org/1693183002/diff/180001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp#newcode99 third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp:99: if (isCancelled()) On 2016/02/25 18:10:24, hiroshige wrote: > Should ...
4 years, 10 months ago (2016-02-25 18:31:06 UTC) #17
yhirano
https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc#newcode1174 content/child/web_url_loader_impl.cc:1174: bool WebURLLoaderImpl::ParseAdditionalHeaders( On 2016/02/25 18:10:24, hiroshige wrote: > What ...
4 years, 10 months ago (2016-02-25 18:35:13 UTC) #18
hiroshige
https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h File third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h (right): https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h#newcode58 third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.h:58: virtual void didReceiveData(const char* bytes, size_t) = 0; How ...
4 years, 10 months ago (2016-02-25 18:39:08 UTC) #19
hiroshige
This CL looks basically good. Reviewed tests (mostly nits). https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp (right): https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp#newcode44 third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp:44: ...
4 years, 10 months ago (2016-02-25 21:36:27 UTC) #20
hiroshige
https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1693183002/diff/180001/content/child/web_url_loader_impl.cc#newcode1174 content/child/web_url_loader_impl.cc:1174: bool WebURLLoaderImpl::ParseAdditionalHeaders( On 2016/02/25 18:35:13, yhirano wrote: > On ...
4 years, 10 months ago (2016-02-25 21:46:32 UTC) #21
Nate Chapin
Looks pretty good! Just a couple of nitpicks. https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp (right): https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp#newcode21 third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp:21: const ...
4 years, 10 months ago (2016-02-25 21:48:29 UTC) #22
yhirano
https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp (right): https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp#newcode21 third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp:21: const char* kReplaceHeaders[] = { On 2016/02/25 21:48:29, Nate ...
4 years, 10 months ago (2016-02-26 22:21:52 UTC) #24
yhirano
I added tests corresponding to ParseHeaders to PS6.
4 years, 10 months ago (2016-02-26 23:06:36 UTC) #25
hiroshige
https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp (right): https://codereview.chromium.org/1693183002/diff/200001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp#newcode44 third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp:44: Vector<Vector<char>> m_data; On 2016/02/26 22:21:51, yhirano wrote: > On ...
4 years, 9 months ago (2016-02-29 16:57:07 UTC) #26
Nate Chapin
blink lgtm.
4 years, 9 months ago (2016-03-02 21:54:07 UTC) #27
yhirano
+jochen for content/. +torne in case you have a copyright related concern (I ported content/child/multipart_response_delegate.h ...
4 years, 9 months ago (2016-03-02 22:39:58 UTC) #29
Torne
On 2016/03/02 22:39:58, yhirano wrote: > +jochen for content/. > +torne in case you have ...
4 years, 9 months ago (2016-03-03 17:01:42 UTC) #30
jochen (gone - plz use gerrit)
can you please also ping the security team about the fact that you add a ...
4 years, 9 months ago (2016-03-04 12:30:34 UTC) #31
yhirano
> can you please also ping the security team about the fact that you add ...
4 years, 9 months ago (2016-03-04 17:39:58 UTC) #33
hiroshige
non-owner lgtm.
4 years, 9 months ago (2016-03-04 18:10:25 UTC) #34
yhirano
https://codereview.chromium.org/1693183002/diff/300001/content/child/blink_platform_impl.h File content/child/blink_platform_impl.h (right): https://codereview.chromium.org/1693183002/diff/300001/content/child/blink_platform_impl.h#newcode100 content/child/blink_platform_impl.h:100: size_t, On 2016/03/04 12:30:34, jochen wrote: > please add ...
4 years, 9 months ago (2016-03-04 18:30:30 UTC) #35
Tom Sepez
https://codereview.chromium.org/1693183002/diff/320001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1693183002/diff/320001/content/child/web_url_loader_impl.cc#newcode88 content/child/web_url_loader_impl.cc:88: const char* kReplaceHeaders[] = { nit: const char* const ...
4 years, 9 months ago (2016-03-04 19:07:32 UTC) #36
hiroshige
https://codereview.chromium.org/1693183002/diff/320001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp File third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp (right): https://codereview.chromium.org/1693183002/diff/320001/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp#newcode51 third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp:51: const auto& boundary = m_boundary; On 2016/03/04 19:07:32, Tom ...
4 years, 9 months ago (2016-03-04 19:57:11 UTC) #39
yhirano
https://codereview.chromium.org/1693183002/diff/320001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1693183002/diff/320001/content/child/web_url_loader_impl.cc#newcode88 content/child/web_url_loader_impl.cc:88: const char* kReplaceHeaders[] = { On 2016/03/04 19:07:31, Tom ...
4 years, 9 months ago (2016-03-04 20:07:52 UTC) #40
Tom Sepez
lgtm
4 years, 9 months ago (2016-03-04 20:22:59 UTC) #41
jochen (gone - plz use gerrit)
ok, I didn't know that this is a copy of an existing file. lgtm then
4 years, 9 months ago (2016-03-07 11:59:04 UTC) #42
jochen (gone - plz use gerrit)
btw, was it possible to just use a WebVector<> internally? Passing around raw ptrs + ...
4 years, 9 months ago (2016-03-07 12:00:51 UTC) #43
yhirano
On 2016/03/07 12:00:51, jochen wrote: > btw, was it possible to just use a WebVector<> ...
4 years, 9 months ago (2016-03-07 17:56:07 UTC) #44
jochen (gone - plz use gerrit)
On 2016/03/07 at 17:56:07, yhirano wrote: > On 2016/03/07 12:00:51, jochen wrote: > > btw, ...
4 years, 9 months ago (2016-03-08 15:45:07 UTC) #46
yhirano
On 2016/03/08 15:45:07, jochen wrote: > On 2016/03/07 at 17:56:07, yhirano wrote: > > On ...
4 years, 9 months ago (2016-03-09 17:41:15 UTC) #47
jochen (gone - plz use gerrit)
yes
4 years, 9 months ago (2016-03-10 15:43:07 UTC) #48
yhirano
Thanks!
4 years, 9 months ago (2016-03-10 16:15:54 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1693183002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1693183002/480001
4 years, 9 months ago (2016-03-10 16:16:18 UTC) #52
commit-bot: I haz the power
Committed patchset #14 (id:480001)
4 years, 9 months ago (2016-03-10 17:56:59 UTC) #54
commit-bot: I haz the power
4 years, 9 months ago (2016-03-10 17:58:08 UTC) #56
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/79aba5a54291da8765270317b5e79d643d96cec6
Cr-Commit-Position: refs/heads/master@{#380431}

Powered by Google App Engine
This is Rietveld 408576698