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

Issue 2766583002: Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher (Closed)

Created:
3 years, 9 months ago by hiroshige
Modified:
3 years, 9 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, loading-reviews_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG=704032 Review-Url: https://codereview.chromium.org/2766583002 Cr-Commit-Position: refs/heads/master@{#459026} Committed: https://chromium.googlesource.com/chromium/src/+/5b0d721fcc5ac7f22db722c7514a52acf8b661ea

Patch Set 1 #

Patch Set 2 : Remove unused local variables #

Total comments: 3

Patch Set 3 : Add a comment #

Total comments: 1

Patch Set 4 : Rebase #

Total comments: 4

Patch Set 5 : reflect comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -30 lines) Patch
M third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp View 1 2 3 4 1 chunk +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp View 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkUtils.h View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkUtils.cpp View 1 2 3 4 2 chunks +38 lines, -11 lines 0 comments Download

Messages

Total messages: 52 (33 generated)
kouhei (in TOK)
Thanks for working on this! https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#newcode375 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:375: data = PassRefPtr<SharedBuffer>(NetworkUtils::parseDataURL(url, response)); ...
3 years, 9 months ago (2017-03-21 07:29:20 UTC) #10
hiroshige
PTAL. https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (left): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#oldcode391 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:391: response.setHTTPStatusCode(200); This block is moved to parseDataURL().
3 years, 9 months ago (2017-03-21 08:00:13 UTC) #11
hiroshige
https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#newcode375 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:375: data = PassRefPtr<SharedBuffer>(NetworkUtils::parseDataURL(url, response)); On 2017/03/21 07:29:20, kouhei wrote: ...
3 years, 9 months ago (2017-03-21 08:04:47 UTC) #12
kouhei (in TOK)
https://codereview.chromium.org/2766583002/diff/40001/third_party/WebKit/Source/platform/network/DEPS File third_party/WebKit/Source/platform/network/DEPS (right): https://codereview.chromium.org/2766583002/diff/40001/third_party/WebKit/Source/platform/network/DEPS#newcode10 third_party/WebKit/Source/platform/network/DEPS:10: "+net/url_request/url_request_data_job.h", Should we move NetworkUtils or parseDataURL to platform/loader?
3 years, 9 months ago (2017-03-21 11:07:49 UTC) #18
kinuko
Could we file a bug for this one (or use an existing bug)? Should this ...
3 years, 9 months ago (2017-03-21 12:42:47 UTC) #19
Takashi Toyoshima
Discussed offline. We would move platform/network to platform/loader/base. Probably it's fine to use crbug.com/699369 to ...
3 years, 9 months ago (2017-03-22 06:26:21 UTC) #20
hiroshige
On 2017/03/22 06:26:21, Takashi Toyoshima wrote: > Could we file a bug for this one ...
3 years, 9 months ago (2017-03-22 08:09:15 UTC) #22
kinuko
lgtm, given that we're going to restructure the file/directory soon https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.h File third_party/WebKit/Source/platform/network/NetworkUtils.h (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.h#newcode33 ...
3 years, 9 months ago (2017-03-22 14:05:38 UTC) #27
kouhei (in TOK)
lgtm https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.cpp File third_party/WebKit/Source/platform/network/NetworkUtils.cpp (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.cpp#newcode104 third_party/WebKit/Source/platform/network/NetworkUtils.cpp:104: return std::move(data); I don't think std::move is needed ...
3 years, 9 months ago (2017-03-23 00:37:15 UTC) #28
hiroshige
https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.cpp File third_party/WebKit/Source/platform/network/NetworkUtils.cpp (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Source/platform/network/NetworkUtils.cpp#newcode104 third_party/WebKit/Source/platform/network/NetworkUtils.cpp:104: return std::move(data); On 2017/03/23 00:37:15, kouhei wrote: > I ...
3 years, 9 months ago (2017-03-23 03:22:23 UTC) #31
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/2766583002/80001
3 years, 9 months ago (2017-03-23 04:18:46 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/304338)
3 years, 9 months ago (2017-03-23 04:36:18 UTC) #38
yhirano
lgtm
3 years, 9 months ago (2017-03-23 04:53:42 UTC) #39
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/2766583002/80001
3 years, 9 months ago (2017-03-23 05:45:41 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/304422)
3 years, 9 months ago (2017-03-23 05:59:54 UTC) #43
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/2766583002/80001
3 years, 9 months ago (2017-03-23 06:47:42 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/304504)
3 years, 9 months ago (2017-03-23 07:03:25 UTC) #47
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/2766583002/80001
3 years, 9 months ago (2017-03-23 08:19:09 UTC) #49
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 08:33:50 UTC) #52
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/5b0d721fcc5ac7f22db722c7514a...

Powered by Google App Engine
This is Rietveld 408576698