Adding Arthur for the renderer_host parts
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sorry for the late review.
/*early_hints_preloaded_resources=*/I think this comment is no longer necessary, as it's clear from the type name.
EarlyHintsPreloadInfoPtr>() /* early_hints_preloaded_resources
*/Ditto.
/*early_hints_preloaded_resources=*/Ditto.
/*early_hints_preloaded_resources=*/Ditto.
network.mojom.RequestDestination destination;Instead of destination, can we use `network::mojom::LinkAsAttribute`, so that more directly translate it to "as" string in Blink?
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/link_header.mojom;l=22-32;drc=e7e1a3be8c621322129fa519118d8291acc467e4
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled()) {Why do we remove the feature flag check?
// Only track <link rel=preload> in `preload_records_` for theCan you keep the back-quotes?
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled() &&Ditto. Why is this feature flag check removed?
default:Can we avoid using the default so that the compiler can detect when a new enum is added?
if (!href) href = supportFileUrl(as);Can you revert removing braces in this file?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
network.mojom.RequestDestination destination;Instead of destination, can we use `network::mojom::LinkAsAttribute`, so that more directly translate it to "as" string in Blink?
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/link_header.mojom;l=22-32;drc=e7e1a3be8c621322129fa519118d8291acc467e4
Also, `LinkHeader` struct can be reused instead of `EarlyHintsPreloadInfo`.
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/link_header.mojom;l=42-60;drc=e7e1a3be8c621322129fa519118d8291acc467e4
@n
Change-Id: Ib82ba3c1b0275e8396cb6055971f12210af710cbHi Yoav!
@nhi...@chromium.org already made nice comments. I will mostly defer to him. Please close this when ready for me to double check and stamp
I think this comment is no longer necessary, as it's clear from the type name.
Done
EarlyHintsPreloadInfoPtr>() /* early_hints_preloaded_resources
*/Yoav Weiss (@Shopify)Ditto.
Done
/*early_hints_preloaded_resources=*/Yoav Weiss (@Shopify)Ditto.
Done
/*early_hints_preloaded_resources=*/Yoav Weiss (@Shopify)Ditto.
Done
Hiroki NakagawaInstead of destination, can we use `network::mojom::LinkAsAttribute`, so that more directly translate it to "as" string in Blink?
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/link_header.mojom;l=22-32;drc=e7e1a3be8c621322129fa519118d8291acc467e4
Also, `LinkHeader` struct can be reused instead of `EarlyHintsPreloadInfo`.
https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/link_header.mojom;l=42-60;drc=e7e1a3be8c621322129fa519118d8291acc467e4
Done
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled()) {Why do we remove the feature flag check?
Bad merge conflict resolution (on this and the braces removal..)
// Only track <link rel=preload> in `preload_records_` for theCan you keep the back-quotes?
Done
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled() &&Ditto. Why is this feature flag check removed?
Done
Can we avoid using the default so that the compiler can detect when a new enum is added?
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (!href) href = supportFileUrl(as);Yoav Weiss (@Shopify)Can you revert removing braces in this file?
Done
| Commit-Queue | +1 |
// Returns the crossorigin mode for the IDL interface.This is reverting comments from the previous CL.. I'm looking into it
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
// Returns the crossorigin mode for the IDL interface.This is reverting comments from the previous CL.. I'm looking into it
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const V8CrossOriginMode crossorigin_;Should we keep this as `CrossOriginAttributeValue` according to this previous review comment?
https://chromium-review.git.corp.google.com/c/chromium/src/+/7715319/comment/3166799c_9b9d71c6/
String ResourceTypeToAsAttributeString(ResourceType type) {Instead of adding a new helper, can we keep using `PreloadHelper::GetAsAttributeFromResourceType()` that was introduced by the previous CL?
break; // kCrossOriginAttributeNotSet is the defaultInstead of depending on the default value, can we explicitly set `info.crossorigin` to `kCrossOriginAttributeNotSet` here?
// Also record early hints preloads for the SpeculationMeasurement API.
for (const auto& [url, entry] : resources) {
if (!preload_records_.Contains(url)) {
PreloadInfo info;
info.as = LinkAsAttributeToString(entry.as);
switch (entry.cross_origin) {
case network::mojom::CrossOriginAttribute::kAnonymous:
info.crossorigin = kCrossOriginAttributeAnonymous;
break;
case network::mojom::CrossOriginAttribute::kUseCredentials:
info.crossorigin = kCrossOriginAttributeUseCredentials;
break;
case network::mojom::CrossOriginAttribute::kUnspecified:
break; // kCrossOriginAttributeNotSet is the default
}
preload_records_.insert(url, std::move(info));
}
}This should be guarded by the feature flag:
```
// Also record early hints preloads for the SpeculationMeasurement API.
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled()) {
for (const auto& [url, entry] : resources) {
// ...
}
}
```
// Mark as used in preload_records_ for the SpeculationMeasurement API.
auto record_it = preload_records_.find(initial_url);
if (record_it != preload_records_.end()) {
record_it->value.used_time = base::TimeTicks::Now();
}Ditto. This should be guarded by the feature flag.
{as_attr: 'fetch', crossorigin_attr: ''},
{as_attr: 'fetch', crossorigin_attr: 'use-credentials'},Test cases for "fetch" are not consistent with others. Is this intentional? I wonder if this should be like this:
```
{as_attr: 'fetch'},
{as_attr: 'fetch', crossorigin_attr: 'anonymous'},
{as_attr: 'fetch', crossorigin_attr: 'use-credentials'},
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
Should we keep this as `CrossOriginAttributeValue` according to this previous review comment?
https://chromium-review.git.corp.google.com/c/chromium/src/+/7715319/comment/3166799c_9b9d71c6/
Done
String ResourceTypeToAsAttributeString(ResourceType type) {Instead of adding a new helper, can we keep using `PreloadHelper::GetAsAttributeFromResourceType()` that was introduced by the previous CL?
Oops, apologies. I moved that helper from PreloadHelper to Resource, so that it can be used in platform/
break; // kCrossOriginAttributeNotSet is the defaultInstead of depending on the default value, can we explicitly set `info.crossorigin` to `kCrossOriginAttributeNotSet` here?
Done
// Also record early hints preloads for the SpeculationMeasurement API.
for (const auto& [url, entry] : resources) {
if (!preload_records_.Contains(url)) {
PreloadInfo info;
info.as = LinkAsAttributeToString(entry.as);
switch (entry.cross_origin) {
case network::mojom::CrossOriginAttribute::kAnonymous:
info.crossorigin = kCrossOriginAttributeAnonymous;
break;
case network::mojom::CrossOriginAttribute::kUseCredentials:
info.crossorigin = kCrossOriginAttributeUseCredentials;
break;
case network::mojom::CrossOriginAttribute::kUnspecified:
break; // kCrossOriginAttributeNotSet is the default
}
preload_records_.insert(url, std::move(info));
}
}This should be guarded by the feature flag:
```
// Also record early hints preloads for the SpeculationMeasurement API.
if (RuntimeEnabledFeatures::SpeculationMeasurementEnabled()) {
for (const auto& [url, entry] : resources) {
// ...
}
}
```
Done
// Mark as used in preload_records_ for the SpeculationMeasurement API.
auto record_it = preload_records_.find(initial_url);
if (record_it != preload_records_.end()) {
record_it->value.used_time = base::TimeTicks::Now();
}Ditto. This should be guarded by the feature flag.
Done
{as_attr: 'fetch', crossorigin_attr: ''},
{as_attr: 'fetch', crossorigin_attr: 'use-credentials'},Test cases for "fetch" are not consistent with others. Is this intentional? I wonder if this should be like this:
```
{as_attr: 'fetch'},
{as_attr: 'fetch', crossorigin_attr: 'anonymous'},
{as_attr: 'fetch', crossorigin_attr: 'use-credentials'},
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |