Commit fe1b2e05 authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

Adding Chrome flag for "Force Unified Consent Bump"

This Chrome flag is only for debug purpose, and it is not meant
to be turned on by default.

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ib52d02611f383114e302e2e600da9397d7ff6641
Reviewed-on: https://chromium-review.googlesource.com/1158827
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580513}
parent fd8eed83
...@@ -3752,6 +3752,11 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3752,6 +3752,11 @@ const FeatureEntry kFeatureEntries[] = {
kUnifiedConsentVariations, kUnifiedConsentVariations,
"UnifiedConsentVariations")}, "UnifiedConsentVariations")},
{"force-unified-consent-bump",
flag_descriptions::kForceUnifiedConsentBumpName,
flag_descriptions::kForceUnifiedConsentBumpDescription, kOsAll,
FEATURE_VALUE_TYPE(unified_consent::kForceUnifiedConsentBump)},
{"simplify-https-indicator", flag_descriptions::kSimplifyHttpsIndicatorName, {"simplify-https-indicator", flag_descriptions::kSimplifyHttpsIndicatorName,
flag_descriptions::kSimplifyHttpsIndicatorDescription, kOsDesktop, flag_descriptions::kSimplifyHttpsIndicatorDescription, kOsDesktop,
FEATURE_WITH_PARAMS_VALUE_TYPE(toolbar::features::kSimplifyHttpsIndicator, FEATURE_WITH_PARAMS_VALUE_TYPE(toolbar::features::kSimplifyHttpsIndicator,
......
...@@ -1922,6 +1922,11 @@ const char kUnifiedConsentDescription[] = ...@@ -1922,6 +1922,11 @@ const char kUnifiedConsentDescription[] =
"features. This includes new confirmation screens and improved settings " "features. This includes new confirmation screens and improved settings "
"pages."; "pages.";
const char kForceUnifiedConsentBumpName[] = "Force Unified Consent Bump";
const char kForceUnifiedConsentBumpDescription[] =
"Force the unified consent bump UI to be shown on every start-up. This "
"flag is for debug purpose, to test the UI.";
const char kUiPartialSwapName[] = "Partial swap"; const char kUiPartialSwapName[] = "Partial swap";
const char kUiPartialSwapDescription[] = "Sets partial swap behavior."; const char kUiPartialSwapDescription[] = "Sets partial swap behavior.";
......
...@@ -1163,6 +1163,9 @@ extern const char kTrySupportedChannelLayoutsDescription[]; ...@@ -1163,6 +1163,9 @@ extern const char kTrySupportedChannelLayoutsDescription[];
extern const char kUnifiedConsentName[]; extern const char kUnifiedConsentName[];
extern const char kUnifiedConsentDescription[]; extern const char kUnifiedConsentDescription[];
extern const char kForceUnifiedConsentBumpName[];
extern const char kForceUnifiedConsentBumpDescription[];
extern const char kUiPartialSwapName[]; extern const char kUiPartialSwapName[];
extern const char kUiPartialSwapDescription[]; extern const char kUiPartialSwapDescription[];
......
...@@ -14,6 +14,8 @@ namespace unified_consent { ...@@ -14,6 +14,8 @@ namespace unified_consent {
const base::Feature kUnifiedConsent{"UnifiedConsent", const base::Feature kUnifiedConsent{"UnifiedConsent",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const char kUnifiedConsentShowBumpParameter[] = "show_consent_bump"; const char kUnifiedConsentShowBumpParameter[] = "show_consent_bump";
const base::Feature kForceUnifiedConsentBump{"ForceUnifiedConsentBump",
base::FEATURE_DISABLED_BY_DEFAULT};
namespace internal { namespace internal {
UnifiedConsentFeatureState GetUnifiedConsentFeatureState() { UnifiedConsentFeatureState GetUnifiedConsentFeatureState() {
......
...@@ -22,6 +22,7 @@ enum class UnifiedConsentFeatureState { ...@@ -22,6 +22,7 @@ enum class UnifiedConsentFeatureState {
// Improved and unified consent for privacy-related features. // Improved and unified consent for privacy-related features.
extern const base::Feature kUnifiedConsent; extern const base::Feature kUnifiedConsent;
extern const char kUnifiedConsentShowBumpParameter[]; extern const char kUnifiedConsentShowBumpParameter[];
extern const base::Feature kForceUnifiedConsentBump;
namespace internal { namespace internal {
// Returns the state of the "Unified Consent" feature. // Returns the state of the "Unified Consent" feature.
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "components/sync/base/model_type.h" #include "components/sync/base/model_type.h"
#include "components/sync/base/sync_prefs.h" #include "components/sync/base/sync_prefs.h"
#include "components/sync/driver/sync_service.h" #include "components/sync/driver/sync_service.h"
#include "components/unified_consent/feature.h"
#include "components/unified_consent/pref_names.h" #include "components/unified_consent/pref_names.h"
#include "components/unified_consent/unified_consent_service_client.h" #include "components/unified_consent/unified_consent_service_client.h"
...@@ -78,6 +79,8 @@ MigrationState UnifiedConsentService::GetMigrationState() { ...@@ -78,6 +79,8 @@ MigrationState UnifiedConsentService::GetMigrationState() {
} }
bool UnifiedConsentService::ShouldShowConsentBump() { bool UnifiedConsentService::ShouldShowConsentBump() {
if (base::FeatureList::IsEnabled(unified_consent::kForceUnifiedConsentBump))
return true;
return GetMigrationState() == return GetMigrationState() ==
MigrationState::IN_PROGRESS_SHOULD_SHOW_CONSENT_BUMP; MigrationState::IN_PROGRESS_SHOULD_SHOW_CONSENT_BUMP;
} }
......
...@@ -297,6 +297,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -297,6 +297,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"unified-consent", flag_descriptions::kUnifiedConsentName, {"unified-consent", flag_descriptions::kUnifiedConsentName,
flag_descriptions::kUnifiedConsentDescription, flags_ui::kOsIos, flag_descriptions::kUnifiedConsentDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(unified_consent::kUnifiedConsent)}, FEATURE_VALUE_TYPE(unified_consent::kUnifiedConsent)},
{"force-unified-consent-bump",
flag_descriptions::kForceUnifiedConsentBumpName,
flag_descriptions::kForceUnifiedConsentBumpDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(unified_consent::kForceUnifiedConsentBump)},
{"autofill-dynamic-forms", flag_descriptions::kAutofillDynamicFormsName, {"autofill-dynamic-forms", flag_descriptions::kAutofillDynamicFormsName,
flag_descriptions::kAutofillDynamicFormsDescription, flags_ui::kOsIos, flag_descriptions::kAutofillDynamicFormsDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(autofill::features::kAutofillDynamicForms)}, FEATURE_VALUE_TYPE(autofill::features::kAutofillDynamicForms)},
......
...@@ -258,6 +258,11 @@ const char kUnifiedConsentDescription[] = ...@@ -258,6 +258,11 @@ const char kUnifiedConsentDescription[] =
"features. This includes new confirmation screens and improved settings " "features. This includes new confirmation screens and improved settings "
"pages."; "pages.";
const char kForceUnifiedConsentBumpName[] = "Force Unified Consent Bump";
const char kForceUnifiedConsentBumpDescription[] =
"Force the unified consent bump UI to be shown on every start-up. This "
"flag is for debug purpose, to test the UI.";
const char kUseDdljsonApiName[] = "Use new ddljson API for Doodles"; const char kUseDdljsonApiName[] = "Use new ddljson API for Doodles";
const char kUseDdljsonApiDescription[] = const char kUseDdljsonApiDescription[] =
"Enables the new ddljson API to fetch Doodles for the NTP."; "Enables the new ddljson API to fetch Doodles for the NTP.";
......
...@@ -216,6 +216,10 @@ extern const char kUIRefreshPhase1Description[]; ...@@ -216,6 +216,10 @@ extern const char kUIRefreshPhase1Description[];
extern const char kUnifiedConsentName[]; extern const char kUnifiedConsentName[];
extern const char kUnifiedConsentDescription[]; extern const char kUnifiedConsentDescription[];
// Title and description for the flag to force the consent bump.
extern const char kForceUnifiedConsentBumpName[];
extern const char kForceUnifiedConsentBumpDescription[];
// Title and description for the flag to enable the ddljson Doodle API. // Title and description for the flag to enable the ddljson Doodle API.
extern const char kUseDdljsonApiName[]; extern const char kUseDdljsonApiName[];
extern const char kUseDdljsonApiDescription[]; extern const char kUseDdljsonApiDescription[];
......
...@@ -27669,6 +27669,7 @@ from previous Chrome versions. ...@@ -27669,6 +27669,7 @@ from previous Chrome versions.
<int value="-1939003674" label="NetworkServiceInProcess:disabled"/> <int value="-1939003674" label="NetworkServiceInProcess:disabled"/>
<int value="-1938263248" label="enable-extension-info-dialog"/> <int value="-1938263248" label="enable-extension-info-dialog"/>
<int value="-1937077699" label="http-form-warning"/> <int value="-1937077699" label="http-form-warning"/>
<int value="-1934661084" label="ForceUnifiedConsentBump:disabled"/>
<int value="-1933425042" label="OfflinePreviews:enabled"/> <int value="-1933425042" label="OfflinePreviews:enabled"/>
<int value="-1930720286" label="nacl-debug-mask"/> <int value="-1930720286" label="nacl-debug-mask"/>
<int value="-1928198763" label="enable-async-dns"/> <int value="-1928198763" label="enable-async-dns"/>
...@@ -29153,6 +29154,7 @@ from previous Chrome versions. ...@@ -29153,6 +29154,7 @@ from previous Chrome versions.
<int value="1105439588" label="enable-swipe-selection"/> <int value="1105439588" label="enable-swipe-selection"/>
<int value="1107543566" label="enable-one-copy"/> <int value="1107543566" label="enable-one-copy"/>
<int value="1108663108" label="disable-device-discovery-notifications"/> <int value="1108663108" label="disable-device-discovery-notifications"/>
<int value="1111871757" label="ForceUnifiedConsentBump:enabled"/>
<int value="1112051724" label="DetectingHeavyPages:enabled"/> <int value="1112051724" label="DetectingHeavyPages:enabled"/>
<int value="1112885300" label="VizHitTestDrawQuad:disabled"/> <int value="1112885300" label="VizHitTestDrawQuad:disabled"/>
<int value="1113365156" label="tab-management-experiment-type-chive"/> <int value="1113365156" label="tab-management-experiment-type-chive"/>
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