support enterprise roots

This commit is contained in:
Fabian Freund
2025-08-28 15:42:43 +02:00
parent a5acf9a732
commit 8c1106472a
9 changed files with 63 additions and 5 deletions
@@ -53,6 +53,8 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
@override
WebContentIsolationStrategy get webContentIsolationStrategy =>
super.webContentIsolationStrategy!;
@override
bool get enterpriseRootsEnabled => super.enterpriseRootsEnabled!;
final QueryParameterStripping queryParameterStripping;
@@ -80,6 +82,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
required super.cookieBannerHandlingGlobalRulesSubFrames,
required super.webContentIsolationStrategy,
required super.userAgent,
required super.enterpriseRootsEnabled,
required this.queryParameterStripping,
required this.bounceTrackingProtectionMode,
});
@@ -98,6 +101,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
QueryParameterStripping? queryParameterStripping,
BounceTrackingProtectionMode? bounceTrackingProtectionMode,
super.userAgent,
bool? enterpriseRootsEnabled,
}) : queryParameterStripping =
queryParameterStripping ?? QueryParameterStripping.disabled,
bounceTrackingProtectionMode =
@@ -122,6 +126,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
webContentIsolationStrategy:
webContentIsolationStrategy ??
WebContentIsolationStrategy.isolateHighValue,
enterpriseRootsEnabled: enterpriseRootsEnabled ?? false,
);
factory EngineSettings.fromJson(Map<String, dynamic> json) =>
@@ -144,5 +149,6 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
super.userAgent,
queryParameterStripping,
bounceTrackingProtectionMode,
super.enterpriseRootsEnabled,
];
}
@@ -41,6 +41,8 @@ abstract class _$EngineSettingsCWProxy {
EngineSettings userAgent(String? userAgent);
EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled);
EngineSettings queryParameterStripping(
QueryParameterStripping queryParameterStripping,
);
@@ -67,6 +69,7 @@ abstract class _$EngineSettingsCWProxy {
bool? cookieBannerHandlingGlobalRulesSubFrames,
WebContentIsolationStrategy? webContentIsolationStrategy,
String? userAgent,
bool? enterpriseRootsEnabled,
QueryParameterStripping queryParameterStripping,
BounceTrackingProtectionMode bounceTrackingProtectionMode,
});
@@ -134,6 +137,10 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
@override
EngineSettings userAgent(String? userAgent) => this(userAgent: userAgent);
@override
EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled) =>
this(enterpriseRootsEnabled: enterpriseRootsEnabled);
@override
EngineSettings queryParameterStripping(
QueryParameterStripping queryParameterStripping,
@@ -165,6 +172,7 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
const $CopyWithPlaceholder(),
Object? webContentIsolationStrategy = const $CopyWithPlaceholder(),
Object? userAgent = const $CopyWithPlaceholder(),
Object? enterpriseRootsEnabled = const $CopyWithPlaceholder(),
Object? queryParameterStripping = const $CopyWithPlaceholder(),
Object? bounceTrackingProtectionMode = const $CopyWithPlaceholder(),
}) {
@@ -223,6 +231,11 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
? _value.userAgent
// ignore: cast_nullable_to_non_nullable
: userAgent as String?,
enterpriseRootsEnabled:
enterpriseRootsEnabled == const $CopyWithPlaceholder()
? _value.enterpriseRootsEnabled
// ignore: cast_nullable_to_non_nullable
: enterpriseRootsEnabled as bool?,
queryParameterStripping:
queryParameterStripping == const $CopyWithPlaceholder()
? _value.queryParameterStripping
@@ -288,6 +301,7 @@ EngineSettings _$EngineSettingsFromJson(Map<String, dynamic> json) =>
json['bounceTrackingProtectionMode'],
),
userAgent: json['userAgent'] as String?,
enterpriseRootsEnabled: json['enterpriseRootsEnabled'] as bool?,
);
Map<String, dynamic> _$EngineSettingsToJson(
@@ -311,6 +325,7 @@ Map<String, dynamic> _$EngineSettingsToJson(
'webContentIsolationStrategy':
_$WebContentIsolationStrategyEnumMap[instance
.webContentIsolationStrategy]!,
'enterpriseRootsEnabled': instance.enterpriseRootsEnabled,
'queryParameterStripping':
_$QueryParameterStrippingEnumMap[instance.queryParameterStripping]!,
'bounceTrackingProtectionMode':