Commit 4b662942 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[unified-consent] Disable UnifiedConsent on ChromeOS

Bug: 954919
Change-Id: I0939944da11c5ff3406c2753d11d0f895497a76f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578568Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Auto-Submit: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653532}
parent 472927c5
......@@ -11,11 +11,10 @@ namespace unified_consent {
// base::Feature definition.
const base::Feature kUnifiedConsent {
"UnifiedConsent",
#if defined(OS_LINUX) || defined(OS_WIN) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
base::FEATURE_ENABLED_BY_DEFAULT
#else
#if defined(OS_CHROMEOS) || defined(OS_IOS) || defined(OS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
......
......@@ -12,15 +12,39 @@
namespace unified_consent {
TEST(UnifiedConsentFeatureTest, FeatureState) {
#if defined(OS_LINUX) || defined(OS_WIN) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
// Linux platforms
#if defined(OS_ANDROID)
// Unified consent is disabled by default.
EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
#endif
#if defined(OS_CHROMEOS)
// Unified consent is disabled by default.
EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
#endif
#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
// Unified consent is enabled by default.
EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
#else
#endif
// Apple platforms
#if defined(OS_IOS)
// Unified consent is disabled by default.
EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
// Unified consent is enabled by default.
EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
#endif
// Windows
#if defined(OS_WIN)
// Unified consent is enabled by default.
EXPECT_TRUE(IsUnifiedConsentFeatureEnabled());
#endif
{
ScopedUnifiedConsent scoped_disabled(UnifiedConsentFeatureState::kDisabled);
EXPECT_FALSE(IsUnifiedConsentFeatureEnabled());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment