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

Issue 2405483002: Make the request initiator Optional (Closed)

Created:
4 years, 2 months ago by clamy
Modified:
4 years, 1 month ago
Reviewers:
sky, Mike West, nasko, horo, mmenke, lfg
CC:
blink-worker-reviews_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, loading-reviews_chromium.org, michaeln, nhiroki, Randy Smith (Not in Mondays), serviceworker-reviews, shimazu+serviceworker_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make the request initiator Optional This CL makes the request initiator used in ResourceRequests and NetURLRequests optional. This will eventually allow to distinguish between a unique initiator and a request with no initiator (eg. a top-level browser-initiated navigation). BUG=475027 Committed: https://crrev.com/f8d16c7cc9a1ca8e3f861616c495d3a1a9557fc5 Cr-Commit-Position: refs/heads/master@{#430276}

Patch Set 1 #

Patch Set 2 : Introduce NullableOrigin to use for request initiator #

Total comments: 3

Patch Set 3 : Rewrite using base::Optional #

Total comments: 2

Patch Set 4 : Rebase #

Patch Set 5 : Addressed comments + test fixes #

Patch Set 6 : Rebase #

Patch Set 7 : Addressed mmenke's comments #

Patch Set 8 : Fixed compilation error #

Total comments: 6

Patch Set 9 : Addressed comments + rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -49 lines) Patch
M chrome/browser/ui/search_engines/search_engine_tab_helper.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/async_revalidation_manager_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_browsertest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/security_exploit_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/foreign_fetch_request_handler.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_fetch_dispatcher.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M content/common/net/url_fetcher.cc View 1 2 3 4 5 6 1 chunk +8 lines, -7 lines 0 comments Download
M content/common/resource_request.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M content/public/common/url_fetcher.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -3 lines 0 comments Download
M content/public/test/test_download_request_handler.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/base/registry_controlled_domains/registry_controlled_domain.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M net/base/registry_controlled_domains/registry_controlled_domain.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_fetcher.h View 1 2 3 4 5 6 2 chunks +8 lines, -6 lines 0 comments Download
M net/url_request/url_fetcher_core.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M net/url_request/url_fetcher_core.cc View 1 2 3 4 5 6 5 chunks +11 lines, -8 lines 0 comments Download
M net/url_request/url_fetcher_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_fetcher_impl.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -3 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 64 (39 generated)
clamy
@nasko, mkwst: PTAL. This is a follow-up on https://codereview.chromium.org/2099243002/ where there was an issue with ...
4 years, 2 months ago (2016-10-07 15:07:44 UTC) #5
nasko
https://codereview.chromium.org/2405483002/diff/20001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/2405483002/diff/20001/content/child/web_url_loader_impl.cc#newcode534 content/child/web_url_loader_impl.cc:534: new url::NullableOrigin(request.requestorOrigin()); Isn't the goal of a nullable origin ...
4 years, 2 months ago (2016-10-10 22:28:12 UTC) #12
Mike West
//url LGTM, if you add tests for `NullableOrigin` that show it behaving similarly to `Origin`, ...
4 years, 2 months ago (2016-10-11 08:50:31 UTC) #13
clamy
Ok so to sum it up, we have two possible approaches: 1) Eventually make Origin ...
4 years, 2 months ago (2016-10-11 12:49:35 UTC) #14
dcheng
On 2016/10/11 12:49:35, clamy wrote: > Ok so to sum it up, we have two ...
4 years, 2 months ago (2016-10-11 17:02:16 UTC) #15
clamy
On 2016/10/11 17:02:16, dcheng wrote: > On 2016/10/11 12:49:35, clamy wrote: > > Ok so ...
4 years, 2 months ago (2016-10-12 11:46:47 UTC) #16
clamy
Following dcheng's suggestion, I rewrote the patch using Optional, which makes it nicer. PTAL.
4 years, 2 months ago (2016-10-14 12:58:13 UTC) #19
Mike West
The lack of //url LGTM. Even LGTMer than before. :) https://codereview.chromium.org/2405483002/diff/40001/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/2405483002/diff/40001/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode229 ...
4 years, 2 months ago (2016-10-14 13:05:59 UTC) #20
nasko
The code looks good, but the description and title of the CL should change to ...
4 years, 2 months ago (2016-10-17 17:44:07 UTC) #23
clamy
PTAL. The description & title of the CL have been updated. https://codereview.chromium.org/2405483002/diff/40001/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): ...
4 years, 2 months ago (2016-10-19 16:00:43 UTC) #28
Mike West
On 2016/10/19 at 16:00:43, clamy wrote: > PTAL. The description & title of the CL ...
4 years, 2 months ago (2016-10-20 09:33:23 UTC) #31
nasko
LGTM
4 years, 2 months ago (2016-10-21 16:45:39 UTC) #32
clamy
@mmenke: PTAL at the changes in net/
4 years, 1 month ago (2016-11-02 13:48:39 UTC) #34
mmenke1
On 2016/11/02 13:48:39, clamy (slow) wrote: > @mmenke: PTAL at the changes in net/ Won't ...
4 years, 1 month ago (2016-11-02 13:51:33 UTC) #35
clamy
On 2016/11/02 13:51:33, mmenke (incorrect) wrote: > On 2016/11/02 13:48:39, clamy (slow) wrote: > > ...
4 years, 1 month ago (2016-11-02 13:58:50 UTC) #36
mmenke
On 2016/11/02 13:58:50, clamy (slow) wrote: > On 2016/11/02 13:51:33, mmenke (incorrect) wrote: > > ...
4 years, 1 month ago (2016-11-02 14:05:20 UTC) #37
clamy
Thanks! I've made the change to URLFetcher in the latest patch set, and added a ...
4 years, 1 month ago (2016-11-02 18:10:49 UTC) #41
mmenke
net/ LGTM https://codereview.chromium.org/2405483002/diff/130001/net/base/registry_controlled_domains/registry_controlled_domain.h File net/base/registry_controlled_domains/registry_controlled_domain.h (right): https://codereview.chromium.org/2405483002/diff/130001/net/base/registry_controlled_domains/registry_controlled_domain.h#newcode205 net/base/registry_controlled_domains/registry_controlled_domain.h:205: PrivateRegistryFilter filter); Mention behavior for a null ...
4 years, 1 month ago (2016-11-03 17:58:58 UTC) #48
horo
content/browser/service_worker/*: lgtm https://codereview.chromium.org/2405483002/diff/130001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2405483002/diff/130001/content/browser/service_worker/service_worker_url_request_job.cc#newcode779 content/browser/service_worker/service_worker_url_request_job.cc:779: (!request()->initiator().has_value() || Just to confirm: The initiator ...
4 years, 1 month ago (2016-11-04 03:13:35 UTC) #49
clamy
Thanks! @lfg: PTAL at the changes in extensions/browser/guest_view @sky: PTAL at the changes in chrome/browser/ui/search_engines ...
4 years, 1 month ago (2016-11-04 16:03:50 UTC) #53
lfg
lgtm
4 years, 1 month ago (2016-11-04 16:18:47 UTC) #54
sky
LGTM
4 years, 1 month ago (2016-11-04 17:52:54 UTC) #57
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/2405483002/150001
4 years, 1 month ago (2016-11-07 13:35:57 UTC) #60
commit-bot: I haz the power
Committed patchset #9 (id:150001)
4 years, 1 month ago (2016-11-07 15:21:16 UTC) #62
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 15:23:18 UTC) #64
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f8d16c7cc9a1ca8e3f861616c495d3a1a9557fc5
Cr-Commit-Position: refs/heads/master@{#430276}

Powered by Google App Engine
This is Rietveld 408576698