Skip to content

Commit

Permalink
fix includes
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Sep 22, 2024
1 parent bd3df58 commit 40047ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
19 changes: 11 additions & 8 deletions browser/brave_app_controller_mac_browsertest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include <AppKit/AppKit.h>
#include "brave/browser/brave_app_controller_mac.h"

#include <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <objc/runtime.h>

#include <stddef.h>

#include <string>

#include "base/apple/foundation_util.h"
#include "base/apple/scoped_objc_class_swizzler.h"
#include "base/test/scoped_feature_list.h"
#include "brave/app/brave_command_ids.h"
#include "brave/browser/brave_app_controller_mac.h"
#include "brave/browser/brave_browser_features.h"
#include "brave/browser/brave_browser_process.h"
#include "brave/browser/profiles/profile_util.h"
#include "brave/browser/ui/views/frame/brave_browser_view.h"
#include "brave/components/tor/buildflags/buildflags.h"
#include "brave/components/tor/pref_names.h"
Expand All @@ -41,6 +40,10 @@
#include "components/policy/core/common/policy_pref_names.h"
#include "content/public/test/browser_test.h"

#if BUILDFLAG(ENABLE_TOR)
#include "brave/browser/tor/tor_profile_service_factory.h"
#endif // BUILDFLAG(ENABLE_TOR)

using bookmarks::BookmarkModel;
using bookmarks::BookmarkNode;

Expand Down Expand Up @@ -256,7 +259,7 @@

NSMenu* dockMenu = [ac applicationDockMenu:app];
ASSERT_TRUE(dockMenu);
ASSERT_FALSE(brave::IsTorDisabledForProfile(browser()->profile()));
ASSERT_FALSE(TorProfileServiceFactory::IsTorDisabled(browser()->profile()));

// Tor item should exist and be enabled
NSMenuItem* tor_menu = [dockMenu itemWithTag:IDC_NEW_OFFTHERECORD_WINDOW_TOR];
Expand Down Expand Up @@ -284,7 +287,7 @@

NSMenu* dockMenu = [ac applicationDockMenu:app];
ASSERT_TRUE(dockMenu);
ASSERT_FALSE(brave::IsTorDisabledForProfile(browser()->profile()));
ASSERT_FALSE(TorProfileServiceFactory::IsTorDisabled(browser()->profile()));
NSMenuItem* tor_menu = [dockMenu itemWithTag:IDC_NEW_OFFTHERECORD_WINDOW_TOR];
EXPECT_TRUE(tor_menu);
EXPECT_TRUE(tor_menu.enabled);
Expand All @@ -295,7 +298,7 @@
pref_service->SetInteger(
policy::policy_prefs::kIncognitoModeAvailability,
static_cast<int>(policy::IncognitoModeAvailability::kDisabled));
ASSERT_TRUE(brave::IsTorDisabledForProfile(browser()->profile()));
ASSERT_TRUE(TorProfileServiceFactory::IsTorDisabled(browser()->profile()));

// Tor item should exist and be enabled
EXPECT_FALSE([ac validateUserInterfaceItem:tor_menu]);
Expand All @@ -318,7 +321,7 @@

NSMenu* dockMenu = [ac applicationDockMenu:app];
ASSERT_TRUE(dockMenu);
ASSERT_FALSE(brave::IsTorDisabledForProfile(browser()->profile()));
ASSERT_FALSE(TorProfileServiceFactory::IsTorDisabled(browser()->profile()));
NSMenuItem* tor_menu = [dockMenu itemWithTag:IDC_NEW_OFFTHERECORD_WINDOW_TOR];
EXPECT_TRUE(tor_menu);
EXPECT_TRUE(tor_menu.enabled);
Expand Down
2 changes: 0 additions & 2 deletions browser/search/ntp_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
#include "brave/browser/search/ntp_utils.h"

#include "base/logging.h"
#include "brave/browser/profiles/profile_util.h"
#include "brave/components/constants/pref_names.h"
#include "chrome/browser/ui/webui/new_tab_page/ntp_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <string>

#include "base/no_destructor.h"
#include "brave/browser/profiles/profile_util.h"
#include "brave/components/search_engines/brave_prepopulated_engines.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/incognito_helpers.h"
Expand Down

0 comments on commit 40047ac

Please sign in to comment.