From 828afc34fafe33baad497dbb456a7bb099a10137 Mon Sep 17 00:00:00 2001 From: Vadym Struts Date: Thu, 12 Dec 2024 12:33:00 +0100 Subject: [PATCH] review changes Signed-off-by: Vadym Struts --- browser/about_flags.cc | 3 +-- browser/cosmetic_filters/cosmetic_filters_tab_helper.cc | 8 +++++--- components/cosmetic_filters/common/cosmetic_filters.mojom | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/browser/about_flags.cc b/browser/about_flags.cc index 83dba169c756..e8bb97c7d2d0 100644 --- a/browser/about_flags.cc +++ b/browser/about_flags.cc @@ -690,8 +690,7 @@ { \ "block-element-feature", \ "Enable Block Element feature", \ - "Allows to block sekected HTML element on the page" \ - "marked as a known threat.", \ + "Allows to block selected HTML element on the page", \ kOsAll, \ FEATURE_VALUE_TYPE( \ brave_shields::features::kBraveShieldsElementPicker), \ diff --git a/browser/cosmetic_filters/cosmetic_filters_tab_helper.cc b/browser/cosmetic_filters/cosmetic_filters_tab_helper.cc index a43df64272a6..ead61963ff4f 100644 --- a/browser/cosmetic_filters/cosmetic_filters_tab_helper.cc +++ b/browser/cosmetic_filters/cosmetic_filters_tab_helper.cc @@ -106,9 +106,11 @@ void CosmeticFiltersTabHelper::GetElementPickerThemeInfo( GetWebContents().GetColorMode() == ui::ColorProviderKey::ColorMode::kDark, color_provider.GetColor(kColorSidePanelBadgeBackground)); #else // !BUILDFLAG(IS_ANDROID) - std::move(callback).Run(chrome::android::GetDarkModeState() == - chrome::android::DarkModeState::kDarkModeSystem, - GetThemeBackgroundColor()); + const auto dark_mode_state = chrome::android::GetDarkModeState(); + std::move(callback).Run( + dark_mode_state == chrome::android::DarkModeState::kDarkModeSystem || + dark_mode_state == chrome::android::DarkModeState::kDarkModeApp, + GetThemeBackgroundColor()); #endif // !BUILDFLAG(IS_ANDROID) } diff --git a/components/cosmetic_filters/common/cosmetic_filters.mojom b/components/cosmetic_filters/common/cosmetic_filters.mojom index e9e113cf5557..4b13390f7b34 100644 --- a/components/cosmetic_filters/common/cosmetic_filters.mojom +++ b/components/cosmetic_filters/common/cosmetic_filters.mojom @@ -26,7 +26,7 @@ interface CosmeticFiltersHandler { ManageCustomFilters(); GetElementPickerThemeInfo() => ( - bool is_nightly_mode_enabled, int32 background_color); + bool is_dark_mode_enabled, int32 background_color); }; // An interface to render frame agent `CosmeticFiltersJSHandler` to control