Skip to content

Commit

Permalink
Disables upstream features flagged by security/privacy teams.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarolin committed May 3, 2024
1 parent 9644bf7 commit 870e4f7
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ source_set("unit_tests") {
"//chrome/browser/enterprise/connectors/analysis:features",
"//chrome/browser/ui",
"//chrome/common/companion/visual_query:flags",
"//chrome/common/privacy_budget",
"//components/aggregation_service",
"//components/attribution_reporting",
"//components/autofill/core/common",
"//components/commerce/core:feature_list",
"//components/compose/core/browser:features",
"//components/content_settings/core/common:features",
"//components/device_signals/core/common:features",
"//components/heap_profiling/in_process",
Expand Down
8 changes: 8 additions & 0 deletions app/feature_defaults_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/companion/visual_query/features.h"
#include "chrome/common/privacy_budget/privacy_budget_features.h"
#include "components/aggregation_service/features.h"
#include "components/attribution_reporting/features.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#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/heap_profiling/in_process/heap_profiler_parameters.h"
#include "components/history/core/browser/features.h"
Expand Down Expand Up @@ -122,6 +124,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
&companion::features::internal::kSidePanelCompanion,
&companion::features::internal::kSidePanelCompanion2,
&companion::visual_query::features::kVisualQuerySuggestions,
&compose::features::kEnableCompose,
&content_settings::features::kTrackingProtection3pcd,
&content_settings::features::kUserBypassUI,
#if !BUILDFLAG(IS_ANDROID)
Expand All @@ -136,6 +139,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
&features::kChromeLabs,
&features::kChromeRefresh2023,
&features::kChromeRefresh2023NTB,
&features::kChromeStructuredMetrics,
&features::kChromeWebuiRefresh2023,
&features::kControlledFrame,
&features::kCookieDeprecationFacilitatedTesting,
Expand All @@ -149,6 +153,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#if !BUILDFLAG(IS_ANDROID)
&features::kHaTSWebUI,
#endif
&features::kIdentifiabilityStudyMetaExperiment,
&features::kIdleDetection,
&features::kKAnonymityService,
&features::kKAnonymityServiceOHTTPRequests,
Expand Down Expand Up @@ -202,6 +207,9 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#if !BUILDFLAG(IS_ANDROID)
&kForYouFre,
#endif
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
&kPreconnectAccountCapabilitiesBeforeSignIn,
#endif
#if BUILDFLAG(ENABLE_MIRROR)
&kVerifyRequestInitiatorForMirrorHeaders,
#endif
Expand Down
4 changes: 4 additions & 0 deletions chromium_src/chrome/browser/signin/signin_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{
#if !BUILDFLAG(IS_ANDROID)
{kForYouFre, base::FEATURE_DISABLED_BY_DEFAULT},
#endif // !BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
{kPreconnectAccountCapabilitiesBeforeSignIn,
base::FEATURE_DISABLED_BY_DEFAULT},
#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
#if BUILDFLAG(ENABLE_MIRROR)
{kVerifyRequestInitiatorForMirrorHeaders,
base::FEATURE_DISABLED_BY_DEFAULT},
Expand Down
1 change: 1 addition & 0 deletions chromium_src/chrome/common/chrome_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{
{kControlledFrame, base::FEATURE_DISABLED_BY_DEFAULT},
{kKAnonymityService, base::FEATURE_DISABLED_BY_DEFAULT},
{kKAnonymityServiceOHTTPRequests, base::FEATURE_DISABLED_BY_DEFAULT},
{kChromeStructuredMetrics, base::FEATURE_DISABLED_BY_DEFAULT},
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
{kDesktopPWAsLinkCapturing, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2024 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/common/privacy_budget/privacy_budget_features.cc"

#include "base/feature_override.h"

namespace features {

OVERRIDE_FEATURE_DEFAULT_STATES({{
{kIdentifiabilityStudyMetaExperiment, base::FEATURE_DISABLED_BY_DEFAULT},
}});

} // namespace features
16 changes: 16 additions & 0 deletions chromium_src/components/compose/core/browser/compose_features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2024 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/components/compose/core/browser/compose_features.cc"

#include "base/feature_override.h"

namespace compose::features {

OVERRIDE_FEATURE_DEFAULT_STATES({{
{kEnableCompose, base::FEATURE_DISABLED_BY_DEFAULT},
}});

} // namespace compose::features

0 comments on commit 870e4f7

Please sign in to comment.