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

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed)

Created:
4 years, 4 months ago by tyoshino (SeeGerritForStatus)
Modified:
4 years, 2 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, feature-media-reviews_chromium.org, gavinp+loader_chromium.org, jam, Nate Chapin, kinuko+watch, loading-reviews+fetch_chromium.org, loading-reviews_chromium.org, mlamouri+watch-content_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change WebURLLoaderClient::willFollowRedirect() API to return bool WebURLLoaderImpl has been requiring clients to clear the newRequest argument when they don't want the redirect to be followed. This is not intuitive and required strange-looking code snippet to reset the argument. The method should just return a bool to indicate whether or not to follow the redirect. Changed ResourceLoader::willFollowRedirect() to return false when m_fetcher->willFollowRedirect() returns false. As didFail() clears m_loader, it should be safe and it's more natural that the case returns false. ResourceFetcher::willFollowRedirect() may change the URL of newRequest and return true because FrameFetchContext::dispatchWillSendRequest() calls prepareRequest() which calls FrameLoaderClient::dispatchWillSendRequest() which calls WebFrameClient::willSendRequest() whose implementations may change the URL. RenderFrameImpl::willSendRequest() and WebFrameTestClient::willSendRequest() are the implementations. This CL leaves the interface unchanged though it should also be fixed. R=japhet@chromium.org,mkwst@chromium.org,bbudge@chromium.org,jochen@chromium.org,dalecurtis@chromium.org BUG=636297 Committed: https://crrev.com/c42eabb6f25a2349f6c4d579f2ab4be55502302b Cr-Commit-Position: refs/heads/master@{#423102}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : PingLoader #

Patch Set 4 : a #

Patch Set 5 : a #

Patch Set 6 : a #

Patch Set 7 : a #

Patch Set 8 : a #

Patch Set 9 : Fixed weburl_loader_mock #

Patch Set 10 : Style #

Patch Set 11 : Rebase #

Total comments: 20

Patch Set 12 : Addressed #32 #

Total comments: 2

Patch Set 13 : Rebase, Addressing #38 #

Patch Set 14 : Addressed #38 #

Total comments: 2

Patch Set 15 : Rebase, Address #44 #

Patch Set 16 : Revert blank line only change from ResourceFetcher #

Patch Set 17 : Rebase #

Total comments: 12

Patch Set 18 : Rebase, Addressed #66, #68, #69 #

Patch Set 19 : Check Android failure cause #

Patch Set 20 : Check Android failure cause #

Patch Set 21 : Check Android failure cause #

Patch Set 22 : Check Android failure cause #

Patch Set 23 : Cancel on Fetcher's rewrite #

Patch Set 24 : Only didFail() #

Patch Set 25 : Keep stopFetching(). Call didFail()s too #

Patch Set 26 : Addressed jochen's point #

Total comments: 6

Patch Set 27 : Rebase #

Patch Set 28 : Addressed #81 #

Patch Set 29 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -116 lines) Patch
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 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +14 lines, -14 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 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/media/android/media_info_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/android/media_info_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +5 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_url_loader_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_url_loader_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +5 lines, -1 line 0 comments Download
M media/blink/resource_multibuffer_data_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M media/blink/resource_multibuffer_data_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResourceTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +6 lines, -3 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 22 23 24 25 26 27 28 1 chunk +2 lines, -1 line 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 22 23 24 25 26 27 28 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +4 lines, -3 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 22 23 24 25 26 27 28 2 chunks +2 lines, -1 line 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 22 23 24 25 26 27 28 2 chunks +32 lines, -9 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 22 23 24 25 26 1 chunk +2 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 22 23 24 25 26 27 28 2 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 6 chunks +18 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/PingLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/loader/TextTrackLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/TextTrackLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +4 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/AssociatedURLLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebURLLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 102 (70 generated)
tyoshino (SeeGerritForStatus)
4 years, 4 months ago (2016-08-17 05:59:07 UTC) #26
tyoshino (SeeGerritForStatus)
Friendly reminder :) Rebased.
4 years, 3 months ago (2016-09-06 10:20:47 UTC) #31
Nate Chapin
Sorry for the delay! https://codereview.chromium.org/2230173002/diff/200001/media/blink/resource_multibuffer_data_provider.cc File media/blink/resource_multibuffer_data_provider.cc (right): https://codereview.chromium.org/2230173002/diff/200001/media/blink/resource_multibuffer_data_provider.cc#newcode185 media/blink/resource_multibuffer_data_provider.cc:185: url_data_->Fail(); I don't know this ...
4 years, 3 months ago (2016-09-06 16:46:14 UTC) #32
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2230173002/diff/200001/media/blink/resource_multibuffer_data_provider.cc File media/blink/resource_multibuffer_data_provider.cc (right): https://codereview.chromium.org/2230173002/diff/200001/media/blink/resource_multibuffer_data_provider.cc#newcode185 media/blink/resource_multibuffer_data_provider.cc:185: url_data_->Fail(); On 2016/09/06 16:46:14, Nate Chapin wrote: > I ...
4 years, 3 months ago (2016-09-07 10:52:28 UTC) #33
Nate Chapin
https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/fetch/RawResource.cpp File third_party/WebKit/Source/core/fetch/RawResource.cpp (right): https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/fetch/RawResource.cpp#newcode136 third_party/WebKit/Source/core/fetch/RawResource.cpp:136: newRequest = ResourceRequest(); On 2016/09/07 10:52:28, tyoshino wrote: > ...
4 years, 3 months ago (2016-09-07 17:05:45 UTC) #38
tyoshino (SeeGerritForStatus)
I'm going home after checking CQ bit. Please take a look again if the bots ...
4 years, 3 months ago (2016-09-14 14:53:47 UTC) #39
Nate Chapin
LGTM except for the stopFetching() calls in DocumentLoader.cpp :) https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/fetch/RawResource.cpp File third_party/WebKit/Source/core/fetch/RawResource.cpp (right): https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/fetch/RawResource.cpp#newcode136 third_party/WebKit/Source/core/fetch/RawResource.cpp:136: ...
4 years, 3 months ago (2016-09-14 22:25:27 UTC) #44
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp File third_party/WebKit/Source/core/loader/DocumentLoader.cpp (right): https://codereview.chromium.org/2230173002/diff/200001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp#newcode337 third_party/WebKit/Source/core/loader/DocumentLoader.cpp:337: return true; On 2016/09/14 22:25:27, Nate Chapin wrote: > ...
4 years, 3 months ago (2016-09-16 07:19:59 UTC) #45
tyoshino (SeeGerritForStatus)
+dalecurtis for content/renderer/media/ and media/ +bbudge for content/renderer/pepper/ +mkwst for third_party/WebKit/Source/platform/ +jochen for content/child/ dalecurtis, ...
4 years, 3 months ago (2016-09-16 07:28:10 UTC) #47
Mike West
//Source/platform LGTM as long as japhet@ is fine with the behavior change in general.
4 years, 3 months ago (2016-09-16 07:32:27 UTC) #51
tyoshino (SeeGerritForStatus)
+boliu All tests except for the Android ones are passing. boliu, from what I got ...
4 years, 3 months ago (2016-09-16 15:07:25 UTC) #63
boliu
On 2016/09/16 15:07:25, tyoshino wrote: > +boliu > > All tests except for the Android ...
4 years, 3 months ago (2016-09-16 17:45:41 UTC) #64
DaleCurtis
+hubbe for media/ multibuffer. https://codereview.chromium.org/2230173002/diff/320001/media/blink/resource_multibuffer_data_provider.cc File media/blink/resource_multibuffer_data_provider.cc (right): https://codereview.chromium.org/2230173002/diff/320001/media/blink/resource_multibuffer_data_provider.cc#newcode186 media/blink/resource_multibuffer_data_provider.cc:186: // "this" may be deleted ...
4 years, 3 months ago (2016-09-16 17:49:20 UTC) #66
hubbe1
https://codereview.chromium.org/2230173002/diff/320001/media/blink/resource_multibuffer_data_provider.cc File media/blink/resource_multibuffer_data_provider.cc (right): https://codereview.chromium.org/2230173002/diff/320001/media/blink/resource_multibuffer_data_provider.cc#newcode186 media/blink/resource_multibuffer_data_provider.cc:186: // "this" may be deleted now. On 2016/09/16 17:49:19, ...
4 years, 3 months ago (2016-09-16 17:52:25 UTC) #68
bbudge
https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc File content/renderer/pepper/pepper_url_loader_host.cc (right): https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc#newcode131 content/renderer/pepper/pepper_url_loader_host.cc:131: SetDefersLoading(true); Should you return false here? Perhaps comment the ...
4 years, 3 months ago (2016-09-16 18:13:04 UTC) #69
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h File third_party/WebKit/public/platform/WebURLLoaderClient.h (right): https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h#newcode54 third_party/WebKit/public/platform/WebURLLoaderClient.h:54: WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse, int64_t encodedDataLength) { ...
4 years, 3 months ago (2016-09-19 14:26:54 UTC) #70
tyoshino (SeeGerritForStatus)
Thanks boliu for the advice. I'm still investigating the cause of the failures. At this ...
4 years, 2 months ago (2016-09-26 14:48:41 UTC) #71
bbudge
LGTM https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc File content/renderer/pepper/pepper_url_loader_host.cc (right): https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc#newcode131 content/renderer/pepper/pepper_url_loader_host.cc:131: SetDefersLoading(true); On 2016/09/26 14:48:41, tyoshino wrote: > On ...
4 years, 2 months ago (2016-09-26 15:46:31 UTC) #72
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h File third_party/WebKit/public/platform/WebURLLoaderClient.h (right): https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h#newcode54 third_party/WebKit/public/platform/WebURLLoaderClient.h:54: WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse, int64_t encodedDataLength) { ...
4 years, 2 months ago (2016-09-27 19:17:27 UTC) #73
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc File content/renderer/pepper/pepper_url_loader_host.cc (right): https://codereview.chromium.org/2230173002/diff/320001/content/renderer/pepper/pepper_url_loader_host.cc#newcode131 content/renderer/pepper/pepper_url_loader_host.cc:131: SetDefersLoading(true); On 2016/09/26 15:46:31, bbudge wrote: > On 2016/09/26 ...
4 years, 2 months ago (2016-09-29 13:40:22 UTC) #74
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h File third_party/WebKit/public/platform/WebURLLoaderClient.h (right): https://codereview.chromium.org/2230173002/diff/320001/third_party/WebKit/public/platform/WebURLLoaderClient.h#newcode54 third_party/WebKit/public/platform/WebURLLoaderClient.h:54: WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse, int64_t encodedDataLength) { ...
4 years, 2 months ago (2016-09-29 13:41:17 UTC) #75
tyoshino (SeeGerritForStatus)
On 2016/09/26 14:48:41, tyoshino wrote: > I'm still investigating the cause of the failures. > ...
4 years, 2 months ago (2016-09-29 13:49:48 UTC) #78
jochen (gone - plz use gerrit)
oh well, lgtm with some comments. https://codereview.chromium.org/2230173002/diff/500001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (left): https://codereview.chromium.org/2230173002/diff/500001/content/child/web_url_loader_impl.cc#oldcode648 content/child/web_url_loader_impl.cc:648: if (redirect_info.new_url == ...
4 years, 2 months ago (2016-09-30 11:11:24 UTC) #81
DaleCurtis
media/ lgtm
4 years, 2 months ago (2016-09-30 16:42:51 UTC) #82
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2230173002/diff/500001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (left): https://codereview.chromium.org/2230173002/diff/500001/content/child/web_url_loader_impl.cc#oldcode648 content/child/web_url_loader_impl.cc:648: if (redirect_info.new_url == GURL(new_request.url())) { On 2016/09/30 11:11:24, jochen ...
4 years, 2 months ago (2016-10-04 04:02:25 UTC) #87
tyoshino (SeeGerritForStatus)
japhet@, could you please take another look at the changes that: - changed DocumentThreadableLoader::redirectReceived() to ...
4 years, 2 months ago (2016-10-04 04:10:55 UTC) #88
Nate Chapin
lgtm
4 years, 2 months ago (2016-10-04 20:21:14 UTC) #89
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/2230173002/540001
4 years, 2 months ago (2016-10-05 03:39:50 UTC) #93
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/280403)
4 years, 2 months ago (2016-10-05 03:42:24 UTC) #95
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/2230173002/560001
4 years, 2 months ago (2016-10-05 06:22:23 UTC) #98
commit-bot: I haz the power
Committed patchset #29 (id:560001)
4 years, 2 months ago (2016-10-05 07:46:16 UTC) #100
commit-bot: I haz the power
4 years, 2 months ago (2016-10-05 07:47:49 UTC) #102
Message was sent while issue was closed.
Patchset 29 (id:??) landed as
https://crrev.com/c42eabb6f25a2349f6c4d579f2ab4be55502302b
Cr-Commit-Position: refs/heads/master@{#423102}

Powered by Google App Engine
This is Rietveld 408576698