| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Xiaochen, PTAL at the changes in connection_allowlist_gating* and its usage, thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1. Main Script Fetch:Can you clarify up top whether this is about blocking / allowing the fetching and registration of service worker scripts themselves, vs Document subresources bound for an already-present service worker? It's not clear to me.
2. Once the main script response is received in ServiceWorkerNewScriptFetcher::OnReceiveResponse, the allowlist headers (if any) are parsed and propagated to WorkerScriptFetcherResult.The formatting of this is REALLY hard to read. Can you clean it up?
Since web based service workers cannot be from a local scheme (addedWhat are "web"-based service worker? What other kinds are there?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can you clarify up top whether this is about blocking / allowing the fetching and registration of service worker scripts themselves, vs Document subresources bound for an already-present service worker? It's not clear to me.
Done
2. Once the main script response is received in ServiceWorkerNewScriptFetcher::OnReceiveResponse, the allowlist headers (if any) are parsed and propagated to WorkerScriptFetcherResult.The formatting of this is REALLY hard to read. Can you clean it up?
Done
Since web based service workers cannot be from a local scheme (addedWhat are "web"-based service worker? What other kinds are there?
I don't know much about them but I was told there are extension service workers and in those cases the existing function ShouldServiceWorkerInheritPolicyContainerFromCreator() gets invoked, while for web SWs this doesn't get invoked. (I'll cc you in the chat thread)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Removed reviewers from attention set as we are discussing the spec, in parallel. Will add back when that's resolved.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
PTAL, thanks!
(Adding reviewers to attention set as the CL is updated to match the spec)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
friendly ping, thanks!
if (response_url.SchemeIsLocal() && creator_policies) {Should this condition also include extension worker?
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());nit: this is equivalent to `std::nullopt`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (response_url.SchemeIsLocal() && creator_policies) {Should this condition also include extension worker?
Good point, I updated to pass the return value of ShouldServiceWorkerInheritPolicyContainerFromCreator to this function which checks for all the relevant conditions
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());nit: this is equivalent to `std::nullopt`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (inherit_from_creator && creator_policies) {If `inherit_from_creator` is true but `creator_policies` is nullptr, function falls through and the logic for non-local scheme might be executed for local scheme worker.
I think it should be something like this?
```
if (inherit_from_creator) {
return creator_policies ? creator_policies->connection_allowlists
: network::ConnectionAllowlists();
}
```
->ShouldServiceWorkerInheritPolicyContainerFromCreator(nit: The if condition above has already checked this is false. We can just pass a false here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());nit: Let's update this to std::nullopt too.
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Ditto
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Ditto.
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());Ditto.
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Ditto.
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Ditto.
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Ditto.
If `inherit_from_creator` is true but `creator_policies` is nullptr, function falls through and the logic for non-local scheme might be executed for local scheme worker.
I think it should be something like this?
```
if (inherit_from_creator) {
return creator_policies ? creator_policies->connection_allowlists
: network::ConnectionAllowlists();
}
```
Done
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());nit: Let's update this to std::nullopt too.
Done
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Shivani SharmaDitto
Done
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Shivani SharmaDitto.
Done
->ShouldServiceWorkerInheritPolicyContainerFromCreator(nit: The if condition above has already checked this is false. We can just pass a false here.
Done
std::optional<base::UnguessableToken>(), PolicyContainerPolicies());Shivani SharmaDitto.
Done
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Shivani SharmaDitto.
Done
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Shivani SharmaDitto.
Done
/*network_restrictions_id=*/std::optional<base::UnguessableToken>(),Shivani SharmaDitto.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sorry for the slow reply, but let me ask the author to write an explainer or so to explain the corner case if not yet. Or, will you link the document with this CL?
Recently, I got filed on the corner case scenario for the SW static routing API's cache source scenario, and I got a bit nervous for such corner case behavior.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sorry for the slow reply, but let me ask the author to write an explainer or so to explain the corner case if not yet. Or, will you link the document with this CL?
Recently, I got filed on the corner case scenario for the SW static routing API's cache source scenario, and I got a bit nervous for such corner case behavior.
I've responded to the questions in the issue here. PTAL, thanks!
https://issues.chromium.org/u/1/issues/492456052#comment4
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |