support enterprise roots
This commit is contained in:
@@ -118,6 +118,22 @@ class DeveloperSettingsScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SwitchListTile.adaptive(
|
||||||
|
title: const Text('Use third party CA certificates'),
|
||||||
|
subtitle: const Text(
|
||||||
|
'Allows the use of third party certificates from the Android CA store',
|
||||||
|
),
|
||||||
|
secondary: const Icon(MdiIcons.certificate),
|
||||||
|
value: engineSettings.enterpriseRootsEnabled,
|
||||||
|
onChanged: (value) async {
|
||||||
|
await ref
|
||||||
|
.read(saveEngineSettingsControllerProvider.notifier)
|
||||||
|
.save(
|
||||||
|
(currentSettings) => currentSettings.copyWith
|
||||||
|
.enterpriseRootsEnabled(value),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
CustomListTile(
|
CustomListTile(
|
||||||
title: 'Error Logs',
|
title: 'Error Logs',
|
||||||
subtitle: 'Copy logs for issue reporting',
|
subtitle: 'Copy logs for issue reporting',
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
|||||||
@override
|
@override
|
||||||
WebContentIsolationStrategy get webContentIsolationStrategy =>
|
WebContentIsolationStrategy get webContentIsolationStrategy =>
|
||||||
super.webContentIsolationStrategy!;
|
super.webContentIsolationStrategy!;
|
||||||
|
@override
|
||||||
|
bool get enterpriseRootsEnabled => super.enterpriseRootsEnabled!;
|
||||||
|
|
||||||
final QueryParameterStripping queryParameterStripping;
|
final QueryParameterStripping queryParameterStripping;
|
||||||
|
|
||||||
@@ -80,6 +82,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
|||||||
required super.cookieBannerHandlingGlobalRulesSubFrames,
|
required super.cookieBannerHandlingGlobalRulesSubFrames,
|
||||||
required super.webContentIsolationStrategy,
|
required super.webContentIsolationStrategy,
|
||||||
required super.userAgent,
|
required super.userAgent,
|
||||||
|
required super.enterpriseRootsEnabled,
|
||||||
required this.queryParameterStripping,
|
required this.queryParameterStripping,
|
||||||
required this.bounceTrackingProtectionMode,
|
required this.bounceTrackingProtectionMode,
|
||||||
});
|
});
|
||||||
@@ -98,6 +101,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
|||||||
QueryParameterStripping? queryParameterStripping,
|
QueryParameterStripping? queryParameterStripping,
|
||||||
BounceTrackingProtectionMode? bounceTrackingProtectionMode,
|
BounceTrackingProtectionMode? bounceTrackingProtectionMode,
|
||||||
super.userAgent,
|
super.userAgent,
|
||||||
|
bool? enterpriseRootsEnabled,
|
||||||
}) : queryParameterStripping =
|
}) : queryParameterStripping =
|
||||||
queryParameterStripping ?? QueryParameterStripping.disabled,
|
queryParameterStripping ?? QueryParameterStripping.disabled,
|
||||||
bounceTrackingProtectionMode =
|
bounceTrackingProtectionMode =
|
||||||
@@ -122,6 +126,7 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
|||||||
webContentIsolationStrategy:
|
webContentIsolationStrategy:
|
||||||
webContentIsolationStrategy ??
|
webContentIsolationStrategy ??
|
||||||
WebContentIsolationStrategy.isolateHighValue,
|
WebContentIsolationStrategy.isolateHighValue,
|
||||||
|
enterpriseRootsEnabled: enterpriseRootsEnabled ?? false,
|
||||||
);
|
);
|
||||||
|
|
||||||
factory EngineSettings.fromJson(Map<String, dynamic> json) =>
|
factory EngineSettings.fromJson(Map<String, dynamic> json) =>
|
||||||
@@ -144,5 +149,6 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
|||||||
super.userAgent,
|
super.userAgent,
|
||||||
queryParameterStripping,
|
queryParameterStripping,
|
||||||
bounceTrackingProtectionMode,
|
bounceTrackingProtectionMode,
|
||||||
|
super.enterpriseRootsEnabled,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ abstract class _$EngineSettingsCWProxy {
|
|||||||
|
|
||||||
EngineSettings userAgent(String? userAgent);
|
EngineSettings userAgent(String? userAgent);
|
||||||
|
|
||||||
|
EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled);
|
||||||
|
|
||||||
EngineSettings queryParameterStripping(
|
EngineSettings queryParameterStripping(
|
||||||
QueryParameterStripping queryParameterStripping,
|
QueryParameterStripping queryParameterStripping,
|
||||||
);
|
);
|
||||||
@@ -67,6 +69,7 @@ abstract class _$EngineSettingsCWProxy {
|
|||||||
bool? cookieBannerHandlingGlobalRulesSubFrames,
|
bool? cookieBannerHandlingGlobalRulesSubFrames,
|
||||||
WebContentIsolationStrategy? webContentIsolationStrategy,
|
WebContentIsolationStrategy? webContentIsolationStrategy,
|
||||||
String? userAgent,
|
String? userAgent,
|
||||||
|
bool? enterpriseRootsEnabled,
|
||||||
QueryParameterStripping queryParameterStripping,
|
QueryParameterStripping queryParameterStripping,
|
||||||
BounceTrackingProtectionMode bounceTrackingProtectionMode,
|
BounceTrackingProtectionMode bounceTrackingProtectionMode,
|
||||||
});
|
});
|
||||||
@@ -134,6 +137,10 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
|||||||
@override
|
@override
|
||||||
EngineSettings userAgent(String? userAgent) => this(userAgent: userAgent);
|
EngineSettings userAgent(String? userAgent) => this(userAgent: userAgent);
|
||||||
|
|
||||||
|
@override
|
||||||
|
EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled) =>
|
||||||
|
this(enterpriseRootsEnabled: enterpriseRootsEnabled);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
EngineSettings queryParameterStripping(
|
EngineSettings queryParameterStripping(
|
||||||
QueryParameterStripping queryParameterStripping,
|
QueryParameterStripping queryParameterStripping,
|
||||||
@@ -165,6 +172,7 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
|||||||
const $CopyWithPlaceholder(),
|
const $CopyWithPlaceholder(),
|
||||||
Object? webContentIsolationStrategy = const $CopyWithPlaceholder(),
|
Object? webContentIsolationStrategy = const $CopyWithPlaceholder(),
|
||||||
Object? userAgent = const $CopyWithPlaceholder(),
|
Object? userAgent = const $CopyWithPlaceholder(),
|
||||||
|
Object? enterpriseRootsEnabled = const $CopyWithPlaceholder(),
|
||||||
Object? queryParameterStripping = const $CopyWithPlaceholder(),
|
Object? queryParameterStripping = const $CopyWithPlaceholder(),
|
||||||
Object? bounceTrackingProtectionMode = const $CopyWithPlaceholder(),
|
Object? bounceTrackingProtectionMode = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
@@ -223,6 +231,11 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
|||||||
? _value.userAgent
|
? _value.userAgent
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: userAgent as String?,
|
: userAgent as String?,
|
||||||
|
enterpriseRootsEnabled:
|
||||||
|
enterpriseRootsEnabled == const $CopyWithPlaceholder()
|
||||||
|
? _value.enterpriseRootsEnabled
|
||||||
|
// ignore: cast_nullable_to_non_nullable
|
||||||
|
: enterpriseRootsEnabled as bool?,
|
||||||
queryParameterStripping:
|
queryParameterStripping:
|
||||||
queryParameterStripping == const $CopyWithPlaceholder()
|
queryParameterStripping == const $CopyWithPlaceholder()
|
||||||
? _value.queryParameterStripping
|
? _value.queryParameterStripping
|
||||||
@@ -288,6 +301,7 @@ EngineSettings _$EngineSettingsFromJson(Map<String, dynamic> json) =>
|
|||||||
json['bounceTrackingProtectionMode'],
|
json['bounceTrackingProtectionMode'],
|
||||||
),
|
),
|
||||||
userAgent: json['userAgent'] as String?,
|
userAgent: json['userAgent'] as String?,
|
||||||
|
enterpriseRootsEnabled: json['enterpriseRootsEnabled'] as bool?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$EngineSettingsToJson(
|
Map<String, dynamic> _$EngineSettingsToJson(
|
||||||
@@ -311,6 +325,7 @@ Map<String, dynamic> _$EngineSettingsToJson(
|
|||||||
'webContentIsolationStrategy':
|
'webContentIsolationStrategy':
|
||||||
_$WebContentIsolationStrategyEnumMap[instance
|
_$WebContentIsolationStrategyEnumMap[instance
|
||||||
.webContentIsolationStrategy]!,
|
.webContentIsolationStrategy]!,
|
||||||
|
'enterpriseRootsEnabled': instance.enterpriseRootsEnabled,
|
||||||
'queryParameterStripping':
|
'queryParameterStripping':
|
||||||
_$QueryParameterStrippingEnumMap[instance.queryParameterStripping]!,
|
_$QueryParameterStrippingEnumMap[instance.queryParameterStripping]!,
|
||||||
'bounceTrackingProtectionMode':
|
'bounceTrackingProtectionMode':
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ class EngineSettingsRepository extends _$EngineSettingsRepository {
|
|||||||
),
|
),
|
||||||
'bounceTrackingProtectionMode': settings['bounceTrackingProtectionMode']
|
'bounceTrackingProtectionMode': settings['bounceTrackingProtectionMode']
|
||||||
?.readAs(DriftSqlType.string, db.typeMapping),
|
?.readAs(DriftSqlType.string, db.typeMapping),
|
||||||
|
'enterpriseRootsEnabled': settings['enterpriseRootsEnabled']?.readAs(
|
||||||
|
DriftSqlType.bool,
|
||||||
|
db.typeMapping,
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ final engineSettingsWithDefaultsProvider =
|
|||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
typedef EngineSettingsWithDefaultsRef = AutoDisposeProviderRef<EngineSettings>;
|
typedef EngineSettingsWithDefaultsRef = AutoDisposeProviderRef<EngineSettings>;
|
||||||
String _$engineSettingsRepositoryHash() =>
|
String _$engineSettingsRepositoryHash() =>
|
||||||
r'aa522c35377280c451f6ac9e5f7063eab7ba6efc';
|
r'd0c2fbe060b5eaee7189f6cb0dd58c97cf5987b5';
|
||||||
|
|
||||||
/// See also [EngineSettingsRepository].
|
/// See also [EngineSettingsRepository].
|
||||||
@ProviderFor(EngineSettingsRepository)
|
@ProviderFor(EngineSettingsRepository)
|
||||||
|
|||||||
+7
@@ -129,6 +129,9 @@ class GeckoEngineSettingsApiImpl : GeckoEngineSettingsApi {
|
|||||||
|
|
||||||
//TODO: Add bounce tracking protection when available
|
//TODO: Add bounce tracking protection when available
|
||||||
}
|
}
|
||||||
|
if(settings.enterpriseRootsEnabled != null) {
|
||||||
|
components.core.engineSettings.enterpriseRootsEnabled = settings.enterpriseRootsEnabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateRuntimeSettings(settings: GeckoEngineSettings) {
|
override fun updateRuntimeSettings(settings: GeckoEngineSettings) {
|
||||||
@@ -197,6 +200,10 @@ class GeckoEngineSettingsApiImpl : GeckoEngineSettingsApi {
|
|||||||
|
|
||||||
reloadSession = true
|
reloadSession = true
|
||||||
}
|
}
|
||||||
|
if(settings.enterpriseRootsEnabled != null) {
|
||||||
|
components.core.engine.settings.enterpriseRootsEnabled = components.core.engineSettings.enterpriseRootsEnabled
|
||||||
|
reloadSession = true
|
||||||
|
}
|
||||||
|
|
||||||
if(reloadSession) {
|
if(reloadSession) {
|
||||||
components.useCases.sessionUseCases.reload()
|
components.useCases.sessionUseCases.reload()
|
||||||
|
|||||||
+6
-3
@@ -1,4 +1,4 @@
|
|||||||
// Autogenerated from Pigeon (v26.0.0), do not edit directly.
|
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
|
||||||
// See also: https://pub.dev/packages/pigeon
|
// See also: https://pub.dev/packages/pigeon
|
||||||
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
|
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
|
||||||
|
|
||||||
@@ -1542,7 +1542,8 @@ data class GeckoEngineSettings (
|
|||||||
val cookieBannerHandlingGlobalRulesSubFrames: Boolean? = null,
|
val cookieBannerHandlingGlobalRulesSubFrames: Boolean? = null,
|
||||||
val webContentIsolationStrategy: WebContentIsolationStrategy? = null,
|
val webContentIsolationStrategy: WebContentIsolationStrategy? = null,
|
||||||
val userAgent: String? = null,
|
val userAgent: String? = null,
|
||||||
val contentBlocking: ContentBlocking? = null
|
val contentBlocking: ContentBlocking? = null,
|
||||||
|
val enterpriseRootsEnabled: Boolean? = null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
companion object {
|
companion object {
|
||||||
@@ -1559,7 +1560,8 @@ data class GeckoEngineSettings (
|
|||||||
val webContentIsolationStrategy = pigeonVar_list[9] as WebContentIsolationStrategy?
|
val webContentIsolationStrategy = pigeonVar_list[9] as WebContentIsolationStrategy?
|
||||||
val userAgent = pigeonVar_list[10] as String?
|
val userAgent = pigeonVar_list[10] as String?
|
||||||
val contentBlocking = pigeonVar_list[11] as ContentBlocking?
|
val contentBlocking = pigeonVar_list[11] as ContentBlocking?
|
||||||
return GeckoEngineSettings(javascriptEnabled, trackingProtectionPolicy, httpsOnlyMode, globalPrivacyControlEnabled, preferredColorScheme, cookieBannerHandlingMode, cookieBannerHandlingModePrivateBrowsing, cookieBannerHandlingGlobalRules, cookieBannerHandlingGlobalRulesSubFrames, webContentIsolationStrategy, userAgent, contentBlocking)
|
val enterpriseRootsEnabled = pigeonVar_list[12] as Boolean?
|
||||||
|
return GeckoEngineSettings(javascriptEnabled, trackingProtectionPolicy, httpsOnlyMode, globalPrivacyControlEnabled, preferredColorScheme, cookieBannerHandlingMode, cookieBannerHandlingModePrivateBrowsing, cookieBannerHandlingGlobalRules, cookieBannerHandlingGlobalRulesSubFrames, webContentIsolationStrategy, userAgent, contentBlocking, enterpriseRootsEnabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fun toList(): List<Any?> {
|
fun toList(): List<Any?> {
|
||||||
@@ -1576,6 +1578,7 @@ data class GeckoEngineSettings (
|
|||||||
webContentIsolationStrategy,
|
webContentIsolationStrategy,
|
||||||
userAgent,
|
userAgent,
|
||||||
contentBlocking,
|
contentBlocking,
|
||||||
|
enterpriseRootsEnabled,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Autogenerated from Pigeon (v26.0.0), do not edit directly.
|
// Autogenerated from Pigeon (v26.0.1), do not edit directly.
|
||||||
// See also: https://pub.dev/packages/pigeon
|
// See also: https://pub.dev/packages/pigeon
|
||||||
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
|
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
|
||||||
|
|
||||||
@@ -1880,6 +1880,7 @@ class GeckoEngineSettings {
|
|||||||
this.webContentIsolationStrategy,
|
this.webContentIsolationStrategy,
|
||||||
this.userAgent,
|
this.userAgent,
|
||||||
this.contentBlocking,
|
this.contentBlocking,
|
||||||
|
this.enterpriseRootsEnabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
bool? javascriptEnabled;
|
bool? javascriptEnabled;
|
||||||
@@ -1906,6 +1907,8 @@ class GeckoEngineSettings {
|
|||||||
|
|
||||||
ContentBlocking? contentBlocking;
|
ContentBlocking? contentBlocking;
|
||||||
|
|
||||||
|
bool? enterpriseRootsEnabled;
|
||||||
|
|
||||||
List<Object?> _toList() {
|
List<Object?> _toList() {
|
||||||
return <Object?>[
|
return <Object?>[
|
||||||
javascriptEnabled,
|
javascriptEnabled,
|
||||||
@@ -1920,6 +1923,7 @@ class GeckoEngineSettings {
|
|||||||
webContentIsolationStrategy,
|
webContentIsolationStrategy,
|
||||||
userAgent,
|
userAgent,
|
||||||
contentBlocking,
|
contentBlocking,
|
||||||
|
enterpriseRootsEnabled,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1941,6 +1945,7 @@ class GeckoEngineSettings {
|
|||||||
webContentIsolationStrategy: result[9] as WebContentIsolationStrategy?,
|
webContentIsolationStrategy: result[9] as WebContentIsolationStrategy?,
|
||||||
userAgent: result[10] as String?,
|
userAgent: result[10] as String?,
|
||||||
contentBlocking: result[11] as ContentBlocking?,
|
contentBlocking: result[11] as ContentBlocking?,
|
||||||
|
enterpriseRootsEnabled: result[12] as bool?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -592,6 +592,7 @@ class GeckoEngineSettings {
|
|||||||
final WebContentIsolationStrategy? webContentIsolationStrategy;
|
final WebContentIsolationStrategy? webContentIsolationStrategy;
|
||||||
final String? userAgent;
|
final String? userAgent;
|
||||||
final ContentBlocking? contentBlocking;
|
final ContentBlocking? contentBlocking;
|
||||||
|
final bool? enterpriseRootsEnabled;
|
||||||
|
|
||||||
GeckoEngineSettings(
|
GeckoEngineSettings(
|
||||||
this.javascriptEnabled,
|
this.javascriptEnabled,
|
||||||
@@ -606,6 +607,7 @@ class GeckoEngineSettings {
|
|||||||
this.webContentIsolationStrategy,
|
this.webContentIsolationStrategy,
|
||||||
this.userAgent,
|
this.userAgent,
|
||||||
this.contentBlocking,
|
this.contentBlocking,
|
||||||
|
this.enterpriseRootsEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user