One more in the chain, bashi@. If you have time to take a look, brilliant! If not, let me know and I'll find another reviewer. I'd like to get these in by Monday if possible... :)
shivanisha@: Would you mind taking a look as well?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm % nits, thanks!
navigation_request.GetRenderFrameHost()->GetReportingSource();nit: Can we add a comment to clarify here that the reporting source of the document being committed should be passed (vs the initiator document)?
const std::optional<base::UnguessableToken>& reporting_source,can this become non-optional once workers also support it?
std::optional<base::UnguessableToken> reporting_source;is the only reason this is optional is because it's not yet supported for workers? Can we add a TODO to make it non-optional once that's done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm
auto url_matches_patterns = [&url](const auto& patterns) {Can we rename this to `restriction_allowed()` or something, and takes `const NetworkRestriction&`, capuring `is_direct` to reduce dups below?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
navigation_request.GetRenderFrameHost()->GetReportingSource();nit: Can we add a comment to clarify here that the reporting source of the document being committed should be passed (vs the initiator document)?
An excellent suggestion!
const std::optional<base::UnguessableToken>& reporting_source,can this become non-optional once workers also support it?
I think it can, yes, but Workers are going to take some (ha!) work and probably won't make branch.
auto url_matches_patterns = [&url](const auto& patterns) {Can we rename this to `restriction_allowed()` or something, and takes `const NetworkRestriction&`, capuring `is_direct` to reduce dups below?
Done
std::optional<base::UnguessableToken> reporting_source;is the only reason this is optional is because it's not yet supported for workers? Can we add a TODO to make it non-optional once that's done
No. It's optional because we don't have a reporting source when we're parsing the headers. We don't have it until we commit a document, so this is something of a placeholder due to the order in which we're able to do things. I'll add a comment in the mojo definition about the lifecycle challenge.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hey Camille! Can you stamp the portion of this change in //content/browser?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! One question below.
allowlists.reporting_source =Just to check, this is only called for the final network response, not server redirects?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
allowlists.reporting_source =Just to check, this is only called for the final network response, not server redirects?
Yes, this is only called from Navigation throttle::WillProcessResponse() and WillCommitWithoutUrlLoader(), not from WillRedirectRequest()
Thanks! A few questions below.
mojo_base.mojom.UnguessableToken? reporting_source;Is this meant to be a reporting endpoint? In that case, would it make sense to do what COOP, COEP and DIP do and pass the reporting endpoint as a string here?
mojo_base.mojom.UnguessableToken? reporting_source;Is this meant to be a reporting endpoint? In that case, would it make sense to do what COOP, COEP and DIP do and pass the reporting endpoint as a string here?
the reporting endpoint string is also sent in the ConnectionAllowlist enforced and report_only fields above. The field `reporting_endpoint` is defined in line 53
mojo_base.mojom.UnguessableToken? reporting_source;Shivani SharmaIs this meant to be a reporting endpoint? In that case, would it make sense to do what COOP, COEP and DIP do and pass the reporting endpoint as a string here?
the reporting endpoint string is also sent in the ConnectionAllowlist enforced and report_only fields above. The field `reporting_endpoint` is defined in line 53
The reporting source token allows //net/reporting to bind the report we're trying to send to the document/worker from which it's being sent, so that the reporting endpoint (which //net/reporting calls "group") can be resolved. See https://source.chromium.org/chromium/chromium/src/+/main:net/reporting/reporting_service.h;l=64 for its eventual usage.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |