[iOS] Expose the associated profile in BraveWebViewConfiguration (#34227)

This commit is contained in:
Kyle Hickinson
2026-02-26 16:20:55 -05:00
committed by GitHub
parent 4d624381b2
commit 7fc572a582
2 changed files with 8 additions and 0 deletions
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
CWV_EXPORT
@interface BraveWebViewConfiguration : CWVWebViewConfiguration
/// The profile associated with this web view configuration
@property(readonly) id<ProfileBridge> profile;
/// Exposes the website data store associated with the WKWebViewConfiguration
///
/// Note: Usage of this should be limited to when the
@@ -25,6 +25,11 @@
CWVAutofillDataManager* _autofillDataManager;
}
- (id<ProfileBridge>)profile {
auto* profile = ProfileIOS::FromBrowserState(self.browserState);
return [[ProfileBridgeImpl alloc] initWithProfile:profile];
}
- (WKWebsiteDataStore*)websiteDataStore {
DCHECK(base::FeatureList::IsEnabled(
brave::features::kUseProfileWebViewConfiguration))