Disable Chromium's default PDF viewer infobar (#35556)

The kPdfInfoBar feature (enabled by default in Chromium) prompts users
to set Chrome as the default PDF viewer. Brave should not show this
Chrome-specific upsell.
This commit is contained in:
Brian R. Bondy
2026-04-15 22:24:29 -04:00
committed by GitHub
parent 1d60bf41fa
commit 7fb7c7af69
3 changed files with 10 additions and 0 deletions
+3
View File
@@ -166,6 +166,9 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
&features::kFewerUpdateConfirmations,
&features::kShortcutsNotApps,
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
&features::kPdfInfoBar,
#endif
&features::kHttpsFirstBalancedMode,
&features::kIdleDetection,
@@ -14,6 +14,10 @@ namespace features {
OVERRIDE_FEATURE_DEFAULT_STATES({{
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
{kFewerUpdateConfirmations, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
// PDF infobar is only used on Windows and macOS upstream.
{kPdfInfoBar, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
// TODO(https://github.com/brave/brave-browser/issues/46337): Re-enable
// scrim views if needed.
+3
View File
@@ -5,6 +5,9 @@
## why the filter is required and create an associated tracking issue.
##
# Tests assume kPdfInfoBar is enabled; we disable it.
-PdfInfoBarControllerTest.*
# These tests won't work without TPM hardware
-TPMMetricsProviderTest.GetMetricsFullName
-TpmIdentifierTest.TpmTest