void SetActivationBeaconUrl(const GURL& url) { activation_beacon_url_ = url; }Jiacheng GuoIs this method used?
Done
GURL resolved_url = GetCurrentURL().Resolve(endpoint);Jiacheng GuoThe URL should be relative the the origin rather than the current URL.
Done
url::Origin::Create(resolved_url)Jiacheng GuoIf we use `Resolve` with the current origin, the returned URL is guaranteed to be same-origin.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
IN_PROC_BROWSER_TEST_F(NavPrefetchBrowserTest, ActivationBeaconSent) {Jiacheng GuoPlease add a test verifying that if the endpoint is set to a different origin such as `b.com/beacon`, the activation beacon should be sent.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
head->parsed_headers->prefetch_activation_beacon_endpoint.has_value()) {Can we guard these changes with a feature flag?
url::Origin::Create(GetCurrentURL()))) {(For a follow-up) It would be nice to report to DevTools console when the endpoint specified by the header is not in the same origin for debuggability.
const GURL& activation_beacon_url() const { return activation_beacon_url_; }This getter is not used in this CL. Can we remove this?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |