diff --git a/browser/brave_browser_main_parts.cc b/browser/brave_browser_main_parts.cc index 22d899beb17c..2d1d50676e55 100644 --- a/browser/brave_browser_main_parts.cc +++ b/browser/brave_browser_main_parts.cc @@ -53,6 +53,7 @@ #include "brave/browser/infobars/brave_confirm_p3a_infobar_delegate.h" #include "brave/browser/infobars/brave_sync_account_deleted_infobar_delegate.h" #include "brave/browser/infobars/sync_cannot_run_infobar_delegate.h" +#include "brave/browser/ipfs/ipfs_component_cleaner.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "components/infobars/content/content_infobar_manager.h" @@ -69,10 +70,6 @@ #include "extensions/browser/extension_system.h" #endif -#if !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) -#include "brave/browser/ipfs/ipfs_component_cleaner.h" -#endif - BraveBrowserMainParts::BraveBrowserMainParts(bool is_integration_test, StartupData* startup_data) : ChromeBrowserMainParts(is_integration_test, startup_data) {} @@ -166,9 +163,9 @@ void BraveBrowserMainParts::PostBrowserStart() { } #endif // !BUILDFLAG(IS_ANDROID) -#if !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_ANDROID) ipfs::CleanupIpfsComponent(); -#endif +#endif // !BUILDFLAG(IS_ANDROID) } void BraveBrowserMainParts::PreShutdown() { diff --git a/browser/ipfs/sources.gni b/browser/ipfs/sources.gni index ebde6b1276a7..bbab08e82ff6 100644 --- a/browser/ipfs/sources.gni +++ b/browser/ipfs/sources.gni @@ -8,9 +8,14 @@ import("//build/config/features.gni") brave_browser_ipfs_sources = [] brave_browser_ipfs_deps = [] -if (!is_android && !is_ios) { +if (!is_android) { brave_browser_ipfs_sources += [ "//brave/browser/ipfs/ipfs_component_cleaner.cc", "//brave/browser/ipfs/ipfs_component_cleaner.h", ] + brave_browser_ipfs_deps += [ + "//base", + "//build:buildflag_header_h", + "//chrome/common", + ] } diff --git a/chromium_src/chrome/browser/prefs/browser_prefs.cc b/chromium_src/chrome/browser/prefs/browser_prefs.cc index 75ee2b398ad3..954de048d94b 100644 --- a/chromium_src/chrome/browser/prefs/browser_prefs.cc +++ b/chromium_src/chrome/browser/prefs/browser_prefs.cc @@ -3,9 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include -#include - #include "brave/browser/brave_local_state_prefs.h" #include "brave/browser/brave_profile_prefs.h" #include "brave/browser/brave_rewards/rewards_prefs_util.h" diff --git a/components/ipfs/ipfs_prefs.cc b/components/ipfs/ipfs_prefs.cc index c9a84fbc59c2..14549b0c1b3d 100644 --- a/components/ipfs/ipfs_prefs.cc +++ b/components/ipfs/ipfs_prefs.cc @@ -6,7 +6,6 @@ #include "brave/components/ipfs/ipfs_prefs.h" #include "base/files/file_path.h" -#include "build/build_config.h" #include "components/prefs/pref_registry_simple.h" namespace { diff --git a/components/ipfs/ipfs_utils_unittest.cc b/components/ipfs/ipfs_utils_unittest.cc index f2654df9dca7..fd09d8a6ca29 100644 --- a/components/ipfs/ipfs_utils_unittest.cc +++ b/components/ipfs/ipfs_utils_unittest.cc @@ -5,23 +5,12 @@ #include "brave/components/ipfs/ipfs_utils.h" -#include -#include #include -#include #include -#include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/files/scoped_temp_dir.h" #include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" -#include "chrome/browser/prefs/browser_prefs.h" -#include "chrome/browser/sync/sync_service_factory.h" -#include "chrome/test/base/testing_profile.h" -#include "components/sync_preferences/pref_service_mock_factory.h" #include "content/public/test/browser_task_environment.h" -#include "net/base/url_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/test/BUILD.gn b/test/BUILD.gn index 339d4604c8c0..8dfc98556dec 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -147,7 +147,7 @@ test("brave_unit_tests") { "//components/sync_device_info/device_info_sync_bridge_unittest.cc", ] - if (!is_android && !is_ios) { + if (!is_android) { sources += [ "//brave/browser/ipfs/ipfs_component_cleaner_unittest.cc" ] }