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

Issue 23658039: [ABANDONED] Get content of resources from Blob when the downloadToFile option is enabled (Closed)

Created:
7 years, 3 months ago by yusukesuzuki
Modified:
7 years, 3 months ago
Reviewers:
vsevik, pfeldman
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Get content of resources from Blob when the downloadToFile option is enabled When the downloadToFile options is enabled, a resource has a file-path instead of a buffer. So the Inspector cannot get content directly from the resource. So we introduce Blob content data to NetworkResourcesData::ResourceData. It holds the Blob and the textEncodingName. The Inspector get content from it by using FileReaderLoader. Currently, there's no resources with the downloadToFile option except for Pepper API. So these codes are not used yet. However we're working on optimizing XHR with responseType="blob"[1] and it will leverage this option. So not to break the inspector, first we need to land this patch. [1]: http://crbug.com/269055 BUG=269055

Patch Set 1 : #

Total comments: 1

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -35 lines) Patch
M LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html View 1 3 chunks +12 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt View 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/fetch/RawResource.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/fetch/Resource.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/Resource.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.h View 4 chunks +6 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.cpp View 1 9 chunks +121 lines, -10 lines 0 comments Download
M Source/core/inspector/InspectorResourceAgent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorResourceAgent.cpp View 1 7 chunks +114 lines, -9 lines 0 comments Download
M Source/core/inspector/InspectorStyleSheet.cpp View 2 chunks +5 lines, -2 lines 0 comments Download
M Source/core/inspector/NetworkResourcesData.h View 4 chunks +10 lines, -0 lines 0 comments Download
M Source/core/inspector/NetworkResourcesData.cpp View 7 chunks +44 lines, -6 lines 0 comments Download
M Source/devtools/protocol.json View 2 chunks +2 lines, -0 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
yusukesuzuki
7 years, 3 months ago (2013-09-12 06:34:09 UTC) #1
yusukesuzuki
https://chromiumcodereview.appspot.com/23658039/diff/5001/LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html File LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html (right): https://chromiumcodereview.appspot.com/23658039/diff/5001/LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html#newcode30 LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html:30: var request1 = WebInspector.panel("network").requests[WebInspector.panel("network").requests.length - 1]; Since FileReaderLoader uses ...
7 years, 3 months ago (2013-09-12 12:18:32 UTC) #2
yusukesuzuki
The CL of introducing optimizing XHR blob implementation[1] will use this implementation. In that CL, ...
7 years, 3 months ago (2013-09-13 12:36:44 UTC) #3
yusukesuzuki
7 years, 3 months ago (2013-09-13 12:37:16 UTC) #4
vsevik
not lgtm. The correct way to load blob contents on frontend would be to introduce ...
7 years, 3 months ago (2013-09-13 13:02:39 UTC) #5
yusukesuzuki
On 2013/09/13 13:02:39, vsevik wrote: > not lgtm. > > The correct way to load ...
7 years, 3 months ago (2013-09-13 14:04:33 UTC) #6
vsevik
> So is it acceptable to change the result of requestContent for XHR Blob to ...
7 years, 3 months ago (2013-09-13 14:42:54 UTC) #7
yusukesuzuki
7 years, 3 months ago (2013-09-13 15:29:23 UTC) #8
On 2013/09/13 14:42:54, vsevik wrote:
> > So is it acceptable to change the result of requestContent for XHR Blob to
> null?
> Yep.

Thanks, understood.
So I close this CL. And in the CL of optimizing XHR blob, I'll drop XHR blob
requestContent support and add tests for that.

Powered by Google App Engine
This is Rietveld 408576698