[cr147] Disables upstream features flagged by security/privacy.
This commit is contained in:
@@ -141,6 +141,7 @@ source_set("unit_tests") {
|
||||
"//components/commerce/core:feature_list",
|
||||
"//components/compose/core/browser:features",
|
||||
"//components/content_settings/core/common:features",
|
||||
"//components/contextual_tasks/public:feature_list",
|
||||
"//components/device_signals/core/common:features",
|
||||
"//components/embedder_support",
|
||||
"//components/enterprise/connectors/core",
|
||||
|
||||
@@ -27,6 +27,7 @@ include_rules += [
|
||||
"+components/component_updater/component_updater_switches.h",
|
||||
"+components/compose/core/browser/compose_features.h",
|
||||
"+components/content_settings/core/common/features.h",
|
||||
"+components/contextual_tasks/public/features.h",
|
||||
"+components/device_signals/core/common/signals_features.h",
|
||||
"+components/dom_distiller/core/dom_distiller_switches.h",
|
||||
"+components/embedder_support/switches.h",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "components/commerce/core/commerce_feature_list.h"
|
||||
#include "components/compose/core/browser/compose_features.h"
|
||||
#include "components/content_settings/core/common/features.h"
|
||||
#include "components/contextual_tasks/public/features.h"
|
||||
#include "components/feature_engagement/public/feature_constants.h"
|
||||
#include "components/heap_profiling/in_process/heap_profiler_parameters.h"
|
||||
#include "components/history/core/browser/features.h"
|
||||
@@ -134,6 +135,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
|
||||
&compose::features::kEnableCompose,
|
||||
&content_settings::features::kTrackingProtection3pcd,
|
||||
&content_settings::features::kUserBypassUI,
|
||||
&contextual_tasks::kContextualTasks,
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
&enterprise_signals::features::kDeviceSignalsConsentDialog,
|
||||
&extensions_features::kExtensionManifestV2Disabled,
|
||||
@@ -147,7 +149,9 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
|
||||
#endif
|
||||
&features::kBookmarkTriggerForPrefetch,
|
||||
&features::kChromeStructuredMetrics,
|
||||
&features::kDevToolsAiAssistanceContextSelectionAgent,
|
||||
&features::kDevToolsAiCodeCompletion,
|
||||
&features::kDevToolsAiCodeGeneration,
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
&features::kDevToolsConsoleInsights,
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
@@ -155,6 +159,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
|
||||
&features::kDevToolsNewPermissionDialog,
|
||||
#endif // BUILDFLAG(ENABLE_DEVTOOLS_FRONTEND)
|
||||
&features::kDevToolsPrivacyUI,
|
||||
&features::kDevToolsUseGcaApi,
|
||||
&features::kDigitalGoodsApi,
|
||||
&features::kFedCm,
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
@@ -163,6 +168,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
|
||||
#endif
|
||||
&features::kHttpsFirstBalancedMode,
|
||||
&features::kIdleDetection,
|
||||
&features::kIndigo,
|
||||
&features::kNewTabPageTriggerForPrerender2,
|
||||
&features::kPrivacySandboxAdsAPIsOverride,
|
||||
&features::kPrivacySandboxAdsAPIsM1Override,
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
|
||||
namespace features {
|
||||
OVERRIDE_FEATURE_DEFAULT_STATES({{
|
||||
{kDevToolsAiAssistanceContextSelectionAgent,
|
||||
base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kDevToolsAiCodeCompletion, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kDevToolsAiCodeGeneration, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
{kDevToolsConsoleInsights, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
{kDevToolsNewPermissionDialog, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kDevToolsUseGcaApi, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
}});
|
||||
|
||||
} // namespace features
|
||||
|
||||
@@ -15,6 +15,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{
|
||||
{kChromeStructuredMetrics, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kDesktopPWAsTabStripSettings, base::FEATURE_ENABLED_BY_DEFAULT},
|
||||
{kHttpsFirstBalancedMode, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kIndigo, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
{kSCTAuditing, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
{kTrustSafetySentimentSurvey, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Copyright (c) 2026 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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 "components/contextual_tasks/public/features.h"
|
||||
|
||||
#include "base/feature_override.h"
|
||||
|
||||
#include <components/contextual_tasks/public/features.cc>
|
||||
|
||||
namespace contextual_tasks {
|
||||
|
||||
OVERRIDE_FEATURE_DEFAULT_STATES({{
|
||||
{kContextualTasks, base::FEATURE_DISABLED_BY_DEFAULT},
|
||||
}});
|
||||
|
||||
} // namespace contextual_tasks
|
||||
@@ -109,6 +109,7 @@ void BraveContentRendererClient::
|
||||
|
||||
// These features don't have dedicated WebRuntimeFeatures wrappers.
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("AdTagging", false);
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("AIClassifierAPI", false);
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("DigitalGoods", false);
|
||||
if (!base::FeatureList::IsEnabled(blink::features::kFileSystemAccessAPI)) {
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("FileSystemAccessLocal",
|
||||
@@ -119,6 +120,7 @@ void BraveContentRendererClient::
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("FledgeMultiBid", false);
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("PrivateStateTokens",
|
||||
false);
|
||||
blink::WebRuntimeFeatures::EnableFeatureFromString("ProfilerAPI", false);
|
||||
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
||||
if (base::FeatureList::IsEnabled(
|
||||
|
||||
Reference in New Issue
Block a user