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

Issue 2203613003: Split header modification out of willSendRequest (Closed)

Created:
4 years, 4 months ago by Nate Chapin
Modified:
3 years, 6 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, Yoav Weiss, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, caseq+blink_chromium.org, apavlov+blink_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, loading-reviews_chromium.org, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split header modification out of willSendRequest Add a new FetchContext callback, prepareRequest, which provides a final opportunity to modify ResourceRequest headers before it is sent. Call it before Resource creation, so that Resource::m_resourceRequest is exactly the request sent out of blink. Make willSendRequest() take a const ResourceRequest&; it is now purely informational. BUG=632580

Patch Set 1 #

Patch Set 2 : Split header modification out of willSendRequest #

Patch Set 3 : Fix test #

Patch Set 4 : removed some accidental file adds #

Total comments: 5

Patch Set 5 : Filter the header instead #

Total comments: 1

Messages

Total messages: 36 (23 generated)
Nate Chapin
hiroshige, how does this look?
4 years, 4 months ago (2016-08-03 22:28:10 UTC) #15
hiroshige
Code basically looks good, thanks! Could you explain why the chages to network-memory-cached-resource.html are needed? ...
4 years, 4 months ago (2016-08-04 09:51:14 UTC) #16
Nate Chapin
pfeldman, do you have an opinion on this? InspectorNetworkAgent currently refrains from putting its custom ...
4 years, 4 months ago (2016-08-04 21:21:55 UTC) #18
pfeldman
https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp (right): https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp#newcode572 third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp:572: request.addHTTPHeaderField(HTTPNames::X_DevTools_Emulate_Network_Conditions_Client_Id, AtomicString(m_hostId)); Do you mean that these are now ...
4 years, 4 months ago (2016-08-04 21:39:59 UTC) #19
Nate Chapin
https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp (right): https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp#newcode572 third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp:572: request.addHTTPHeaderField(HTTPNames::X_DevTools_Emulate_Network_Conditions_Client_Id, AtomicString(m_hostId)); On 2016/08/04 21:39:59, pfeldman wrote: > Do ...
4 years, 4 months ago (2016-08-04 21:46:50 UTC) #20
Nate Chapin
https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp (right): https://codereview.chromium.org/2203613003/diff/60001/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp#newcode572 third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp:572: request.addHTTPHeaderField(HTTPNames::X_DevTools_Emulate_Network_Conditions_Client_Id, AtomicString(m_hostId)); On 2016/08/04 21:46:49, Nate Chapin wrote: > ...
4 years, 4 months ago (2016-08-04 22:51:31 UTC) #23
Nate Chapin
On 2016/08/04 09:51:14, hiroshige wrote: > Code basically looks good, thanks! > > Could you ...
4 years, 4 months ago (2016-08-04 23:38:33 UTC) #24
hiroshige
On 2016/08/04 23:38:33, Nate Chapin wrote: > On 2016/08/04 09:51:14, hiroshige wrote: > > Code ...
4 years, 4 months ago (2016-08-05 11:02:48 UTC) #27
Nate Chapin
On 2016/08/05 11:02:48, hiroshige wrote: > On 2016/08/04 23:38:33, Nate Chapin wrote: > > On ...
4 years, 4 months ago (2016-08-05 16:45:29 UTC) #28
hiroshige
On 2016/08/05 16:45:29, Nate Chapin wrote: > On 2016/08/05 11:02:48, hiroshige wrote: > > On ...
4 years, 4 months ago (2016-08-09 10:08:39 UTC) #29
hiroshige
(Restarting the review as shaochuan@ is touching related code) > My previous comment #29 https://codereview.chromium.org/2203613003/#msg29 ...
4 years, 2 months ago (2016-09-27 09:38:53 UTC) #31
Shao-Chuan Lee
https://codereview.chromium.org/2203613003/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2203613003/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode1028 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:1028: loader->start(resource->resourceRequest(), context().loadingTaskRunner(), context().defersLoading()); Maybe we can now remove the ...
4 years, 2 months ago (2016-10-06 03:34:41 UTC) #32
Shao-Chuan Lee
4 years, 1 month ago (2016-10-25 05:47:46 UTC) #33
On 2016/10/06 03:34:41, Shao-Chuan Lee wrote:
>
https://codereview.chromium.org/2203613003/diff/80001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right):
> 
>
https://codereview.chromium.org/2203613003/diff/80001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:1028:
> loader->start(resource->resourceRequest(), context().loadingTaskRunner(),
> context().defersLoading());
> Maybe we can now remove the first param in ResourceLoader::start() and use
> m_resource->resourceRequest()?

May I follow up current progress? I'm having plenty of workarounds for this, it
would be nice to see this issue resolved. Thanks.

Powered by Google App Engine
This is Rietveld 408576698