Commit 6762a091 authored by David Roger's avatar David Roger Committed by Commit Bot

[Unity] Add feature flag for enabling Unity

Change-Id: I44027badf2aaa5d4aa556ab6bfb686b0e8913b98
Reviewed-on: https://chromium-review.googlesource.com/893562Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533283}
parent a2df537a
......@@ -1348,6 +1348,8 @@ split_static_library("browser") {
"signin/signin_tracker_factory.h",
"signin/signin_util.cc",
"signin/signin_util.h",
"signin/unified_consent_helper.cc",
"signin/unified_consent_helper.h",
"site_details.cc",
"site_details.h",
"speech/chrome_speech_recognition_manager_delegate.cc",
......
......@@ -3697,6 +3697,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(ash::switches::kAshEnableNewOverviewUi)},
#endif // defined(OS_CHROMEOS)
{"unified-consent", flag_descriptions::kUnifiedConsentName,
flag_descriptions::kUnifiedConsentDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kUnifiedConsent)},
// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
// Histograms" in tools/metrics/histograms/README.md (run the
......
......@@ -1537,6 +1537,12 @@ const char kTrySupportedChannelLayoutsDescription[] =
"to do stereo to surround expansion if supported. May expose third party "
"driver bugs, use with caution.";
const char kUnifiedConsentName[] = "Unified Consent";
const char kUnifiedConsentDescription[] =
"Enables a unified management of user consent for privacy-related "
"features. This includes new confirmation screens and improved settings "
"pages.";
const char kUiPartialSwapName[] = "Partial swap";
const char kUiPartialSwapDescription[] = "Sets partial swap behavior.";
......
......@@ -940,6 +940,9 @@ extern const char kTranslateRankerEnforcementDescription[];
extern const char kTrySupportedChannelLayoutsName[];
extern const char kTrySupportedChannelLayoutsDescription[];
extern const char kUnifiedConsentName[];
extern const char kUnifiedConsentDescription[];
extern const char kUiPartialSwapName[];
extern const char kUiPartialSwapDescription[];
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/signin/unified_consent_helper.h"
#include "base/feature_list.h"
#include "build/buildflag.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/common/chrome_features.h"
#include "components/signin/core/browser/signin_features.h"
bool IsUnifiedConsentEnabled(Profile* profile) {
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
// On Dice platforms, unified consent requires Dice to be enabled first.
if (!AccountConsistencyModeManager::IsDiceEnabledForProfile(profile))
return false;
#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
return base::FeatureList::IsEnabled(features::kUnifiedConsent);
}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SIGNIN_UNIFIED_CONSENT_HELPER_H_
#define CHROME_BROWSER_SIGNIN_UNIFIED_CONSENT_HELPER_H_
class Profile;
// Returns true if unified consent is enabled for |profile|.
bool IsUnifiedConsentEnabled(Profile* profile);
#endif // CHROME_BROWSER_SIGNIN_UNIFIED_CONSENT_HELPER_H_
......@@ -553,6 +553,10 @@ const base::Feature kSyzyasanDeferredFree{"SyzyasanDeferredFree",
const base::Feature kTopSitesFromSiteEngagement{
"TopSitesFromSiteEngagement", base::FEATURE_DISABLED_BY_DEFAULT};
// Improved and unified consent for privacy-related features.
const base::Feature kUnifiedConsent{"UnifiedConsent",
base::FEATURE_DISABLED_BY_DEFAULT};
// Enables using the local NTP if Google is the default search engine.
const base::Feature kUseGoogleLocalNtp{"UseGoogleLocalNtp",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -297,6 +297,8 @@ extern const base::Feature kTabMetricsLogging;
extern const base::Feature kTopSitesFromSiteEngagement;
extern const base::Feature kUnifiedConsent;
extern const base::Feature kUseGoogleLocalNtp;
#if defined(OS_CHROMEOS)
......
......@@ -25427,6 +25427,7 @@ from previous Chrome versions.
<int value="-1691281364" label="enable-notification-action-icons"/>
<int value="-1686782572" label="ChromeHomeInactivitySheetExpansion:disabled"/>
<int value="-1682843294" label="DataReductionProxyDecidesTransform:enabled"/>
<int value="-1677715989" label="UnifiedConsent:disabled"/>
<int value="-1670137340"
label="OptimizeLoadingIPCForSmallResources:disabled"/>
<int value="-1669486359" label="ImportantSitesInCBD:enabled"/>
......@@ -25979,6 +25980,7 @@ from previous Chrome versions.
label="CrossOriginMediaPlaybackRequiresUserGesture:disabled"/>
<int value="-290672626" label="enable-asm-wasm"/>
<int value="-288316828" label="enable-delegated-renderer"/>
<int value="-284547865" label="UnifiedConsent:enabled"/>
<int value="-281844827" label="AutofillCreditCardAblationExperiment:enabled"/>
<int value="-280111192" label="AutofillUpstreamSendDetectedValues:enabled"/>
<int value="-279920685" label="affiliation-based-matching:enabled"/>
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