This was reported in 4051120 and 4051886. This seems like a regression that may have been introduced in this PR.
The core issue is that the primary_url is being evaluated as blank for opaque origins here.
const GURL primary_url =
navigation_handle->GetParentFrameOrOuterDocument()
? navigation_handle->GetParentFrameOrOuterDocument()
->GetOutermostMainFrame()
->GetLastCommittedOrigin()
.GetURL()
: url::Origin::Create(navigation_handle->GetURL()).GetURL();
which then is used to query the various ContentSettingType from the HostContentsSettingsMap and by default the map returns the default state to both get/set the corresponding type. We should ensure primary_url is not blank at this point.
This was reported in 4051120 and 4051886. This seems like a regression that may have been introduced in this PR.
The core issue is that the
primary_urlis being evaluated as blank for opaque origins here.which then is used to query the various
ContentSettingTypefrom theHostContentsSettingsMapand by default the map returns the default state to both get/set the corresponding type. We should ensureprimary_urlis not blank at this point.