diff --git a/ios/browser/api/https_upgrades/https_upgrade_service_factory.mm b/ios/browser/api/https_upgrades/https_upgrade_service_factory.mm index aa2523c756e..e37de245ad0 100644 --- a/ios/browser/api/https_upgrades/https_upgrade_service_factory.mm +++ b/ios/browser/api/https_upgrades/https_upgrade_service_factory.mm @@ -12,7 +12,8 @@ @implementation BraveHttpsUpgradeServiceFactory + (nullable id)serviceForBrowserState:(ChromeBrowserState*)browserState { - auto* service = HttpsUpgradeServiceFactory::GetForBrowserState(browserState); + ProfileIOS* profile = ProfileIOS::FromBrowserState(browserState); + auto* service = HttpsUpgradeServiceFactory::GetForProfile(profile); if (!service) { return nil; }