|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by Yoav Weiss Modified:
3 years, 10 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/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSplit requestResource into request preparation and loading
This CL is refactoring of requestResource in order to split the
request preparation phase from the request loading phase.
This would enable to separate these phases for link prefetch, in order to
delay its actual loading.
BUG=651160
Review-Url: https://codereview.chromium.org/2660213003
Cr-Commit-Position: refs/heads/master@{#447454}
Committed: https://chromium.googlesource.com/chromium/src/+/ab7722c427586b8b0b7e0f82e2f3e7d5d67ec46a
Patch Set 1 #
Total comments: 3
Patch Set 2 : refactor so it makes more sense #
Total comments: 1
Patch Set 3 : Review comments #
Messages
Total messages: 28 (16 generated)
The CQ bit was checked by yoav@yoav.ws to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== requestResource refactoring This is simple refactoring of requestResource in order to split the request preparation phase from the request loading phase. This would enable e.g. to separate these phases for link prefetch, in order to delay the latter. BUG= ========== to ========== Split requestResource into request preparation and loading This CL is refactoring of requestResource in order to split the request preparation phase from the request loading phase. This would enable to separate these phases for link prefetch, in order to delay its actual loading. BUG=651160 ==========
yoav@yoav.ws changed reviewers: + csharrison@chromium.org
Hey Charlie, Mind taking a look? This CL doesn't change functionality, but logically splits requestResource into two functional parts.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
looks good, just a few comments. https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:473: TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", This changes behavior, as trace events are scoped to the function they are defined in. Could you just move this to the top of requestResource, so it is aligned with the SCOPED_BLINK_UMA histogram? https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h (right): https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h:174: struct PrepareRequestReturnValues { delete unused struct. https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h:179: Resource* prepareRequest(FetchRequest&, Please document this method. It is a bit strange for a method to be called "prepareRequest" but return a Resource*, so I think a little explanation is necessary.
The CQ bit was checked by yoav@yoav.ws to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/01/30 22:02:58, Charlie Harrison-slow til Feb3 wrote: > looks good, just a few comments. > > https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... > File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp > (right): > > https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... > third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:473: > TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", > This changes behavior, as trace events are scoped to the function they are > defined in. Could you just move this to the top of requestResource, so it is > aligned with the SCOPED_BLINK_UMA histogram? Moved > > https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... > File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h (right): > > https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... > third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h:174: struct > PrepareRequestReturnValues { > delete unused struct. oops! > > https://codereview.chromium.org/2660213003/diff/1/third_party/WebKit/Source/p... > third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h:179: Resource* > prepareRequest(FetchRequest&, > Please document this method. It is a bit strange for a method to be called > "prepareRequest" but return a Resource*, so I think a little explanation is > necessary. Changed the function so that it makes more sense. I'm not opposed to documenting it more (and let me know if that's needed), but I hope current form makes more sense. Also, took out the static resource creation, as it's not really related to the "request preparation" phase.
LGTM even though the Resource*& makes me queasy :)
On 2017/01/31 19:00:40, Charlie Harrison-slow til Feb3 wrote: > LGTM even though the Resource*& makes me queasy :) I'm open to suggestions :D Would a ** be better?
japhet@chromium.org changed reviewers: + japhet@chromium.org
Makes sense, just a parameter nitpick: https://codereview.chromium.org/2660213003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2660213003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:460: Resource*& resource) { "Resource*&" is dubious. Maybe return an enum: enum class PrepareRequestPolicy { Abort, Continue, Block }; ...and call resourceForBlockedRequest() is Block is returned?
The CQ bit was checked by yoav@yoav.ws to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/01/31 19:40:22, Nate Chapin wrote: > Makes sense, just a parameter nitpick: > > https://codereview.chromium.org/2660213003/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp > (right): > > https://codereview.chromium.org/2660213003/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:460: > Resource*& resource) { > "Resource*&" is dubious. Maybe return an enum: > > enum class PrepareRequestPolicy { > Abort, > Continue, > Block > }; > > ...and call resourceForBlockedRequest() is Block is returned? Changed as suggested. PTAL
still lgtm (non-owners)
On 2017/01/31 20:46:46, Charlie Harrison-slow til Feb3 wrote: > still lgtm (non-owners) Thanks! :) japhet@ can you take a look? (since this dir moved out of core, I'm no longer an owner)
LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yoav@yoav.ws
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1485926904015470,
"parent_rev": "d5eb39411c1c5fc9400a711dde056b14ed0a4509", "commit_rev":
"ab7722c427586b8b0b7e0f82e2f3e7d5d67ec46a"}
Message was sent while issue was closed.
Description was changed from ========== Split requestResource into request preparation and loading This CL is refactoring of requestResource in order to split the request preparation phase from the request loading phase. This would enable to separate these phases for link prefetch, in order to delay its actual loading. BUG=651160 ========== to ========== Split requestResource into request preparation and loading This CL is refactoring of requestResource in order to split the request preparation phase from the request loading phase. This would enable to separate these phases for link prefetch, in order to delay its actual loading. BUG=651160 Review-Url: https://codereview.chromium.org/2660213003 Cr-Commit-Position: refs/heads/master@{#447454} Committed: https://chromium.googlesource.com/chromium/src/+/ab7722c427586b8b0b7e0f82e2f3... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/ab7722c427586b8b0b7e0f82e2f3... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
