Skip to content

Commit

Permalink
fixed according review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Vadym Struts <vstruts@brave.com>
  • Loading branch information
vadimstruts committed Aug 29, 2024
1 parent 39c6847 commit 6705afd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 23 deletions.
9 changes: 3 additions & 6 deletions browser/brave_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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) {}
Expand Down Expand Up @@ -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() {
Expand Down
7 changes: 6 additions & 1 deletion browser/ipfs/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
3 changes: 0 additions & 3 deletions chromium_src/chrome/browser/prefs/browser_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <utility>

#include "brave/browser/brave_local_state_prefs.h"
#include "brave/browser/brave_profile_prefs.h"
#include "brave/browser/brave_rewards/rewards_prefs_util.h"
Expand Down
1 change: 0 additions & 1 deletion components/ipfs/ipfs_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 0 additions & 11 deletions components/ipfs/ipfs_utils_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,12 @@

#include "brave/components/ipfs/ipfs_utils.h"

#include <fstream>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#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 {
Expand Down
2 changes: 1 addition & 1 deletion test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}

Expand Down

0 comments on commit 6705afd

Please sign in to comment.