Skip to content

Commit

Permalink
Merge pull request brave#25132 from brave/maxk-cr128-followup-disable…
Browse files Browse the repository at this point in the history
…-upstream-features

[Cr128 follow up] Disables features flagged by security/privacy team.
  • Loading branch information
mkarolin authored Aug 15, 2024
2 parents ef470d6 + 0d8c6ed commit 1784981
Show file tree
Hide file tree
Showing 7 changed files with 50 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 @@ -146,6 +146,7 @@ source_set("unit_tests") {
"//components/page_info/core",
"//components/performance_manager",
"//components/permissions",
"//components/plus_addresses:features",
"//components/privacy_sandbox",
"//components/safe_browsing/core/common",
"//components/search",
Expand All @@ -154,6 +155,7 @@ source_set("unit_tests") {
"//components/signin/public/base:signin_buildflags",
"//components/subresource_filter/core/common",
"//components/sync/base:features",
"//components/webapps/browser",
"//gpu/config",
"//services/device/public/cpp:device_features",
"//services/network/public/cpp",
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 @@ -37,6 +37,7 @@
#include "components/page_info/core/features.h"
#include "components/performance_manager/public/features.h"
#include "components/permissions/features.h"
#include "components/plus_addresses/features.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/search/ntp_features.h"
Expand All @@ -46,6 +47,7 @@
#include "components/signin/public/base/signin_switches.h"
#include "components/subresource_filter/core/common/common_features.h"
#include "components/sync/base/features.h"
#include "components/webapps/browser/features.h"
#include "content/common/features.h"
#include "content/public/common/content_features.h"
#include "content/public/common/dips_utils.h"
Expand Down Expand Up @@ -143,6 +145,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#if !BUILDFLAG(IS_ANDROID)
&features::kDesktopPWAsLinkCapturing,
#endif
&features::kDevToolsConsoleInsights,
&features::kDigitalGoodsApi,
&features::kDIPS,
&features::kFedCm,
Expand Down Expand Up @@ -203,6 +206,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
&metrics::structured::kEnabledStructuredMetricsService,
&metrics::structured::kPhoneHubStructuredMetrics,
&net::features::kEnableWebTransportDraft07,
&net::features::kTopLevelTpcdOriginTrial,
&net::features::kTpcdMetadataGrants,
&net::features::kWaitForFirstPartySetsInit,
&network::features::kFledgePst,
Expand Down Expand Up @@ -241,14 +245,17 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#endif
&permissions::features::kPermissionOnDeviceNotificationPredictions,
&permissions::features::kShowRelatedWebsiteSetsPermissionGrants,
&plus_addresses::features::kPlusAddressesEnabled,
&privacy_sandbox::kEnforcePrivacySandboxAttestations,
&privacy_sandbox::kOverridePrivacySandboxSettingsLocalTesting,
&privacy_sandbox::kPrivacySandboxFirstPartySetsUI,
&privacy_sandbox::kPrivacySandboxProactiveTopicsBlocking,
&privacy_sandbox::kPrivacySandboxSettings4,
&privacy_sandbox::kTrackingProtectionContentSettingUbControl,
&safe_browsing::kExtensionTelemetryDisableOffstoreExtensions,
&safe_browsing::kExtensionTelemetryForEnterprise,
&safe_browsing::kExtensionTelemetryTabsApiSignal,
&safe_browsing::kGooglePlayProtectInApkTelemetry,
&segmentation_platform::features::kSegmentationPlatformCollectTabRankData,
&segmentation_platform::features::kSegmentationPlatformDeviceTier,
&segmentation_platform::features::kSegmentationPlatformFeature,
Expand All @@ -260,6 +267,7 @@ TEST(FeatureDefaultsTest, DisabledFeatures) {
#if !BUILDFLAG(IS_ANDROID)
&translate::kTFLiteLanguageDetectionEnabled,
#endif
&webapps::features::kWebAppsEnableMLModelForPromotion,
};

for (const auto* feature : disabled_features) {
Expand Down
1 change: 1 addition & 0 deletions chromium_src/chrome/browser/browser_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{

{kBookmarkTriggerForPrerender2, base::FEATURE_DISABLED_BY_DEFAULT},
{kDestroyProfileOnBrowserClose, base::FEATURE_DISABLED_BY_DEFAULT},
{kDevToolsConsoleInsights, base::FEATURE_DISABLED_BY_DEFAULT},
// Google has asked embedders not to enforce these pins:
// https://groups.google.com/a/chromium.org/g/embedder-dev/c/XsNTwEiN1lI/m/TMXh-ZvOAAAJ
{kKeyPinningComponentUpdater, base::FEATURE_DISABLED_BY_DEFAULT},
Expand Down
17 changes: 17 additions & 0 deletions chromium_src/components/plus_addresses/features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* 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/plus_addresses/features.cc"

#include "base/feature_override.h"
#include "build/build_config.h"

namespace plus_addresses::features {

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

} // namespace plus_addresses::features
2 changes: 2 additions & 0 deletions chromium_src/components/safe_browsing/core/common/features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace safe_browsing {
OVERRIDE_FEATURE_DEFAULT_STATES({{
{kExtensionTelemetryDisableOffstoreExtensions,
base::FEATURE_DISABLED_BY_DEFAULT},
{kExtensionTelemetryForEnterprise, base::FEATURE_DISABLED_BY_DEFAULT},
{kExtensionTelemetryTabsApiSignal, base::FEATURE_DISABLED_BY_DEFAULT},
{kGooglePlayProtectInApkTelemetry, base::FEATURE_DISABLED_BY_DEFAULT},
}});

} // namespace safe_browsing
19 changes: 19 additions & 0 deletions chromium_src/components/webapps/browser/features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* 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/webapps/browser/features.cc"

#include "base/feature_override.h"
#include "build/build_config.h"

namespace webapps {
namespace features {

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

} // namespace features
} // namespace webapps
1 change: 1 addition & 0 deletions chromium_src/net/base/features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{
// Enable NIK-partitioning by default.
{kPartitionConnectionsByNetworkIsolationKey,
base::FEATURE_ENABLED_BY_DEFAULT},
{kTopLevelTpcdOriginTrial, base::FEATURE_DISABLED_BY_DEFAULT},
{kTpcdMetadataGrants, base::FEATURE_DISABLED_BY_DEFAULT},
{kWaitForFirstPartySetsInit, base::FEATURE_DISABLED_BY_DEFAULT},
}});
Expand Down

0 comments on commit 1784981

Please sign in to comment.