Disables Chromium features flagged by security/privacy teams.

This commit is contained in:
mkarolin
2022-08-23 00:19:35 -04:00
parent c882ab53c3
commit 85a8dd71ac
6 changed files with 45 additions and 1 deletions
+8 -1
View File
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "chrome/browser/domain_reliability/service_factory.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_features.h"
#include "chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/chrome_test_utils.h"
@@ -82,12 +83,14 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
const base::Feature* disabled_features[] = {
&autofill::features::kAutofillEnableAccountWalletStorage,
&autofill::features::kAutofillEnableOfferNotificationForPromoCodes,
&autofill::features::kAutofillEnableRemadeDownstreamMetrics,
&autofill::features::kAutofillSaveCardUiExperiment,
&autofill::features::kAutofillServerCommunication,
&autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains,
&blink::features::kAdInterestGroupAPI,
&blink::features::kBrowsingTopics,
&blink::features::kAllowURNsInIframes,
&blink::features::kBrowsingTopics,
&blink::features::kClientHintsMetaEquivDelegateCH,
&blink::features::kComputePressure,
&blink::features::kConversionMeasurement,
&blink::features::kCssSelectorFragmentAnchor,
@@ -107,6 +110,9 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&commerce::kShoppingPDPMetrics,
&commerce::kRetailCoupons,
&enterprise_connectors::kLocalContentAnalysisEnabled,
#if BUILDFLAG(IS_WIN)
&features::kAppBoundEncryptionMetrics,
#endif
#if !BUILDFLAG(IS_ANDROID)
&features::kCopyLinkToText,
#endif
@@ -115,6 +121,7 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&features::kFedCm,
&features::kFirstPartySets,
&features::kIdleDetection,
&features::kIsolatePrerenders,
&features::kNavigationRequestPreconnect,
&features::kNotificationTriggers,
&features::kOmniboxTriggerForNoStatePrefetch,
@@ -10,6 +10,9 @@
namespace features {
OVERRIDE_FEATURE_DEFAULT_STATES({{
#if BUILDFLAG(IS_WIN)
{kAppBoundEncryptionMetrics, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
#if !BUILDFLAG(IS_ANDROID)
{kCopyLinkToText, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
@@ -0,0 +1,16 @@
/* Copyright (c) 2022 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 "src/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.cc"
#include "base/feature_override.h"
namespace features {
OVERRIDE_FEATURE_DEFAULT_STATES({{
{kIsolatePrerenders, base::FEATURE_DISABLED_BY_DEFAULT},
}});
} // namespace features
@@ -13,6 +13,7 @@ namespace features {
OVERRIDE_FEATURE_DEFAULT_STATES({{
{kAutofillEnableOfferNotificationForPromoCodes,
base::FEATURE_DISABLED_BY_DEFAULT},
{kAutofillEnableRemadeDownstreamMetrics, base::FEATURE_DISABLED_BY_DEFAULT},
{kAutofillSaveCardUiExperiment, base::FEATURE_DISABLED_BY_DEFAULT},
{kAutofillUpstreamAllowAdditionalEmailDomains,
base::FEATURE_DISABLED_BY_DEFAULT},
@@ -0,0 +1,16 @@
/* Copyright (c) 2022 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 "src/content/browser/private_aggregation/private_aggregation_features.cc"
#include "base/feature_override.h"
namespace content {
OVERRIDE_FEATURE_DEFAULT_STATES({{
{kPrivateAggregationApi, base::FEATURE_DISABLED_BY_DEFAULT},
}});
} // namespace content
+1
View File
@@ -19,6 +19,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{
{kAdInterestGroupAPI, base::FEATURE_DISABLED_BY_DEFAULT},
{kAllowURNsInIframes, base::FEATURE_DISABLED_BY_DEFAULT},
{kBrowsingTopics, base::FEATURE_DISABLED_BY_DEFAULT},
{kClientHintsMetaEquivDelegateCH, base::FEATURE_DISABLED_BY_DEFAULT},
{kComputePressure, base::FEATURE_DISABLED_BY_DEFAULT},
{kConversionMeasurement, base::FEATURE_DISABLED_BY_DEFAULT},
{kCssSelectorFragmentAnchor, base::FEATURE_DISABLED_BY_DEFAULT},