diff --git a/ios/app/BUILD.gn b/ios/app/BUILD.gn index 5847b8002505..eac8e33b267e 100644 --- a/ios/app/BUILD.gn +++ b/ios/app/BUILD.gn @@ -61,6 +61,7 @@ source_set("app") { "//components/history/core/browser", "//components/keyed_service/core", "//components/password_manager/core/browser", + "//components/safe_browsing/core/common:safe_browsing_prefs", "//components/send_tab_to_self", "//components/sync/base", "//components/sync/service", diff --git a/ios/app/DEPS b/ios/app/DEPS index d7745c59a192..a4fcc61a615e 100644 --- a/ios/app/DEPS +++ b/ios/app/DEPS @@ -15,6 +15,7 @@ include_rules = [ "+components/history/core/browser", "+components/keyed_service/core", "+components/password_manager/core", + "+components/safe_browsing/core/common/safe_browsing_prefs.h", "+components/send_tab_to_self", "+ios/public/provider/chrome/browser/chrome_browser_provider.h", "+ios/public/provider/chrome/browser/overrides/overrides_api.h", diff --git a/ios/app/brave_core_main.mm b/ios/app/brave_core_main.mm index 1030a876a5cd..fb78221efe43 100644 --- a/ios/app/brave_core_main.mm +++ b/ios/app/brave_core_main.mm @@ -49,6 +49,7 @@ #include "components/keyed_service/core/service_access_type.h" #include "components/password_manager/core/browser/password_store.h" #include "components/prefs/pref_service.h" +#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/send_tab_to_self/send_tab_to_self_sync_service.h" #include "ios/chrome/app/startup/provider_registration.h" #include "ios/chrome/browser/bookmarks/model/bookmark_undo_service_factory.h" @@ -202,6 +203,10 @@ - (instancetype)initWithUserAgent:(NSString*)userAgent browserStateManager->GetLastUsedBrowserState(); _mainBrowserState = chromeBrowserState; + // Disable Safe-Browsing via Prefs + chromeBrowserState->GetPrefs()->SetBoolean(prefs::kSafeBrowsingEnabled, + false); + // Setup main browser _browserList = BrowserListFactory::GetForBrowserState(_mainBrowserState); _browser = Browser::Create(_mainBrowserState); diff --git a/ios/browser/application_context/brave_application_context_impl.h b/ios/browser/application_context/brave_application_context_impl.h index ac03b18d13a1..ef0859d7d15d 100644 --- a/ios/browser/application_context/brave_application_context_impl.h +++ b/ios/browser/application_context/brave_application_context_impl.h @@ -36,7 +36,6 @@ class BraveApplicationContextImpl : public ApplicationContextImpl { // ApplicationContextImpl ukm::UkmRecorder* GetUkmRecorder() override; - SafeBrowsingService* GetSafeBrowsingService() override; BrowserPolicyConnectorIOS* GetBrowserPolicyConnector() override; gcm::GCMDriver* GetGCMDriver() override; diff --git a/ios/browser/application_context/brave_application_context_impl.mm b/ios/browser/application_context/brave_application_context_impl.mm index bc36b8f3ee48..9b17cd0460a7 100644 --- a/ios/browser/application_context/brave_application_context_impl.mm +++ b/ios/browser/application_context/brave_application_context_impl.mm @@ -33,10 +33,6 @@ return nullptr; } -SafeBrowsingService* BraveApplicationContextImpl::GetSafeBrowsingService() { - return nullptr; -} - BrowserPolicyConnectorIOS* BraveApplicationContextImpl::GetBrowserPolicyConnector() { return nullptr;