Skip to content

Commit

Permalink
Removed NTPBrandedWallpaper feature flag
Browse files Browse the repository at this point in the history
fix brave/brave-browser#19754

As we can customize this feature in NTP, we don't need to maintain this
feature flag. Also this makes regression when this flag is off.
  • Loading branch information
simonhong committed Dec 7, 2021
1 parent 6e93385 commit 4735112
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 23 deletions.
10 changes: 0 additions & 10 deletions browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ using brave_shields::features::kBraveExtensionNetworkBlocking;
using brave_shields::features::kCosmeticFilteringSyncLoad;

using debounce::features::kBraveDebounce;
using ntp_background_images::features::kBraveNTPBrandedWallpaper;
using ntp_background_images::features::kBraveNTPBrandedWallpaperDemo;
using ntp_background_images::features::kBraveNTPSuperReferralWallpaper;

Expand Down Expand Up @@ -147,11 +146,6 @@ constexpr char kCosmeticFilteringSyncLoadDescription[] =
constexpr char kBraveIpfsName[] = "Enable IPFS";
constexpr char kBraveIpfsDescription[] = "Enable native support of IPFS.";

constexpr char kBraveNTPBrandedWallpaperName[] =
"New Tab Page Branded Wallpapers";
constexpr char kBraveNTPBrandedWallpaperDescription[] =
"Allow New Tab Page Branded Wallpapers and user preference.";

constexpr char kBraveNTPBrandedWallpaperDemoName[] =
"New Tab Page Demo Branded Wallpaper";
constexpr char kBraveNTPBrandedWallpaperDemoDescription[] =
Expand Down Expand Up @@ -375,10 +369,6 @@ constexpr char kFileSystemAccessAPIDescription[] =
flag_descriptions::kUseDevUpdaterUrlName, \
flag_descriptions::kUseDevUpdaterUrlDescription, kOsAll, \
FEATURE_VALUE_TYPE(brave_component_updater::kUseDevUpdaterUrl)}, \
{"brave-ntp-branded-wallpaper", \
flag_descriptions::kBraveNTPBrandedWallpaperName, \
flag_descriptions::kBraveNTPBrandedWallpaperDescription, kOsAll, \
FEATURE_VALUE_TYPE(kBraveNTPBrandedWallpaper)}, \
{"brave-ntp-branded-wallpaper-demo", \
flag_descriptions::kBraveNTPBrandedWallpaperDemoName, \
flag_descriptions::kBraveNTPBrandedWallpaperDemoDescription, kOsAll, \
Expand Down
5 changes: 0 additions & 5 deletions browser/brave_browser_process_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "brave/components/brave_sync/network_time_helper.h"
#include "brave/components/debounce/browser/debounce_component_installer.h"
#include "brave/components/debounce/common/features.h"
#include "brave/components/ntp_background_images/browser/features.h"
#include "brave/components/ntp_background_images/browser/ntp_background_images_service.h"
#include "brave/components/p3a/brave_p3a_service.h"
#include "brave/components/p3a/buildflags.h"
Expand Down Expand Up @@ -85,7 +84,6 @@

using brave_component_updater::BraveComponent;
using ntp_background_images::NTPBackgroundImagesService;
using ntp_background_images::features::kBraveNTPBrandedWallpaper;

namespace {

Expand Down Expand Up @@ -217,9 +215,6 @@ BraveBrowserProcessImpl::ad_block_regional_service_manager() {

NTPBackgroundImagesService*
BraveBrowserProcessImpl::ntp_background_images_service() {
if (!base::FeatureList::IsEnabled(kBraveNTPBrandedWallpaper))
return nullptr;

if (!ntp_background_images_service_) {
ntp_background_images_service_ =
std::make_unique<NTPBackgroundImagesService>(component_updater(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "brave/components/brave_today/common/pref_names.h"
#include "brave/components/crypto_dot_com/browser/buildflags/buildflags.h"
#include "brave/components/ftx/browser/buildflags/buildflags.h"
#include "brave/components/ntp_background_images/browser/features.h"
#include "brave/components/ntp_background_images/browser/url_constants.h"
#include "brave/components/ntp_background_images/browser/view_counter_service.h"
#include "brave/components/ntp_background_images/common/pref_names.h"
Expand All @@ -44,7 +43,6 @@
#include "content/public/browser/web_ui_data_source.h"

using ntp_background_images::ViewCounterServiceFactory;
using ntp_background_images::features::kBraveNTPBrandedWallpaper;
using ntp_background_images::prefs::kBrandedWallpaperNotificationDismissed;
using ntp_background_images::prefs::kNewTabPageShowBackgroundImage;
using ntp_background_images::prefs::
Expand Down Expand Up @@ -200,8 +198,7 @@ BraveNewTabMessageHandler* BraveNewTabMessageHandler::Create(
}

source->AddBoolean("featureFlagBraveNTPSponsoredImagesWallpaper",
base::FeatureList::IsEnabled(kBraveNTPBrandedWallpaper) &&
is_ads_supported_locale_);
is_ads_supported_locale_);
source->AddBoolean("braveTalkPromptAllowed",
BraveNewTabMessageHandler::CanPromptBraveTalk());

Expand Down
3 changes: 0 additions & 3 deletions components/ntp_background_images/browser/features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
namespace ntp_background_images {
namespace features {

const base::Feature kBraveNTPBrandedWallpaper{
"BraveNTPBrandedWallpaperName",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kBraveNTPBrandedWallpaperDemo{
"BraveNTPBrandedWallpaperDemoName",
base::FEATURE_DISABLED_BY_DEFAULT};
Expand Down
1 change: 0 additions & 1 deletion components/ntp_background_images/browser/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct Feature;

namespace ntp_background_images {
namespace features {
extern const base::Feature kBraveNTPBrandedWallpaper;
extern const base::Feature kBraveNTPBrandedWallpaperDemo;
extern const base::Feature kBraveNTPSuperReferralWallpaper;
} // namespace features
Expand Down

0 comments on commit 4735112

Please sign in to comment.