diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index d5416f7954a9..41df2f128f3e 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -640,9 +640,6 @@ Or change later at $2brave://settings/ext - - Bat Ads Service - Bat Rewards Service diff --git a/browser/about_flags.cc b/browser/about_flags.cc index 5d4f0f94d60c..3467c11bd9dc 100644 --- a/browser/about_flags.cc +++ b/browser/about_flags.cc @@ -761,15 +761,6 @@ FEATURE_VALUE_TYPE( \ brave_rewards::features::kPlatformCreatorDetectionFeature), \ }, \ - { \ - "brave-ads-should-launch-brave-ads-as-an-in-process-service", \ - "Launch Brave Ads as an in-process service", \ - "Launch Brave Ads as an in-process service removing the utility " \ - "process.", \ - kOsAll, \ - FEATURE_VALUE_TYPE( \ - brave_ads::kShouldLaunchBraveAdsAsAnInProcessServiceFeature), \ - }, \ { \ "brave-ads-should-always-run-brave-ads-service", \ "Should always run Brave Ads service", \ diff --git a/browser/brave_ads/services/bat_ads_service_factory_impl.cc b/browser/brave_ads/services/bat_ads_service_factory_impl.cc index 040c64b4c433..785b1d893925 100644 --- a/browser/brave_ads/services/bat_ads_service_factory_impl.cc +++ b/browser/brave_ads/services/bat_ads_service_factory_impl.cc @@ -13,11 +13,8 @@ #include "base/task/single_thread_task_runner_thread_mode.h" #include "base/task/thread_pool.h" #include "brave/browser/brave_ads/services/service_sandbox_type.h" -#include "brave/components/brave_ads/core/public/ads_feature.h" #include "brave/components/services/bat_ads/bat_ads_service_impl.h" -#include "brave/grit/brave_generated_resources.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/service_process_host.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" @@ -46,14 +43,6 @@ mojo::Remote LaunchInProcessBatAdsService() { return bat_ads_service_remote; } -// Launches a new Bat Ads Service utility process. -mojo::Remote LaunchOutOfProcessBatAdsService() { - return content::ServiceProcessHost::Launch( - content::ServiceProcessHost::Options() - .WithDisplayName(IDS_SERVICE_BAT_ADS) - .Pass()); -} - } // namespace BatAdsServiceFactoryImpl::BatAdsServiceFactoryImpl() = default; @@ -64,8 +53,7 @@ mojo::Remote BatAdsServiceFactoryImpl::Launch() const { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - return ShouldLaunchAsInProcessService() ? LaunchInProcessBatAdsService() - : LaunchOutOfProcessBatAdsService(); + return LaunchInProcessBatAdsService(); } } // namespace brave_ads diff --git a/components/brave_ads/core/internal/ads_feature.cc b/components/brave_ads/core/internal/ads_feature.cc index 5310af7f9811..d02300bf8d29 100644 --- a/components/brave_ads/core/internal/ads_feature.cc +++ b/components/brave_ads/core/internal/ads_feature.cc @@ -7,15 +7,6 @@ namespace brave_ads { -BASE_FEATURE(kShouldLaunchBraveAdsAsAnInProcessServiceFeature, - "ShouldLaunchBraveAdsAsInProcessService", - base::FEATURE_ENABLED_BY_DEFAULT); - -bool ShouldLaunchAsInProcessService() { - return base::FeatureList::IsEnabled( - kShouldLaunchBraveAdsAsAnInProcessServiceFeature); -} - BASE_FEATURE(kShouldAlwaysRunBraveAdsServiceFeature, "ShouldAlwaysRunBraveAdsService", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/components/brave_ads/core/internal/ads_feature_unittest.cc b/components/brave_ads/core/internal/ads_feature_unittest.cc index 6394474b9110..2f8e9999c170 100644 --- a/components/brave_ads/core/internal/ads_feature_unittest.cc +++ b/components/brave_ads/core/internal/ads_feature_unittest.cc @@ -12,21 +12,6 @@ namespace brave_ads { -TEST(BraveAdsBraveAdsFeatureTest, ShouldLaunchAsInProcessService) { - // Act & Assert - EXPECT_TRUE(ShouldLaunchAsInProcessService()); -} - -TEST(BraveAdsBraveAdsFeatureTest, ShouldNotLaunchAsInProcessService) { - // Arrange - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitAndDisableFeature( - kShouldLaunchBraveAdsAsAnInProcessServiceFeature); - - // Act & Assert - EXPECT_FALSE(ShouldLaunchAsInProcessService()); -} - TEST(BraveAdsBraveAdsFeatureTest, ShouldAlwaysRunService) { // Arrange const base::test::ScopedFeatureList scoped_feature_list( diff --git a/components/brave_ads/core/public/ads_feature.h b/components/brave_ads/core/public/ads_feature.h index 2d894c8cf6f9..71f9142d1be9 100644 --- a/components/brave_ads/core/public/ads_feature.h +++ b/components/brave_ads/core/public/ads_feature.h @@ -10,11 +10,6 @@ namespace brave_ads { -// Set to `true` to launch as an in process service. -BASE_DECLARE_FEATURE(kShouldLaunchBraveAdsAsAnInProcessServiceFeature); - -bool ShouldLaunchAsInProcessService(); - // Set to `true` to always run the ads service, even if Brave Private Ads are // disabled. BASE_DECLARE_FEATURE(kShouldAlwaysRunBraveAdsServiceFeature);