Commit ad83cbc3 authored by Andrey Zaytsev's avatar Andrey Zaytsev Committed by Commit Bot

Metrics settings on Android: added a flag for the feature

Bug: 1132805
Change-Id: I24b988384eb45c315e0d59cd330e27dafb938483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435226
Commit-Queue: Andrey Zaytsev <andzaytsev@google.com>
Auto-Submit: Andrey Zaytsev <andzaytsev@google.com>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812101}
parent 6589b3d1
......@@ -2287,6 +2287,22 @@ constexpr char kAssistantTimersV2InternalName[] = "enable-assistant-timers-v2";
constexpr char kAmbientModeInternalName[] = "enable-ambient-mode";
#endif // OS_CHROMEOS
#if defined(OS_ANDROID)
// The variations of --metrics-settings-android.
const FeatureEntry::FeatureParam kMetricsSettingsAndroidAlternativeOne[] = {
{"fre", "1"}};
const FeatureEntry::FeatureParam kMetricsSettingsAndroidAlternativeTwo[] = {
{"fre", "2"}};
const FeatureEntry::FeatureVariation kMetricsSettingsAndroidVariations[] = {
{"Alternative FRE 1", kMetricsSettingsAndroidAlternativeOne,
base::size(kMetricsSettingsAndroidAlternativeOne), nullptr},
{"Alternative FRE 2", kMetricsSettingsAndroidAlternativeTwo,
base::size(kMetricsSettingsAndroidAlternativeTwo), nullptr},
};
#endif // defined(OS_ANDROID)
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
......@@ -5398,6 +5414,14 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kSafetyCheckAndroid)},
#endif
#if defined(OS_ANDROID)
{"metrics-settings-android", flag_descriptions::kMetricsSettingsAndroidName,
flag_descriptions::kMetricsSettingsAndroidDescription, kOsAndroid,
FEATURE_WITH_PARAMS_VALUE_TYPE(features::kSafetyCheckAndroid,
kMetricsSettingsAndroidVariations,
"MetricsSettingsAndroid")},
#endif
#if defined(OS_ANDROID)
{"safe-browsing-client-side-detection-android",
flag_descriptions::kSafeBrowsingClientSideDetectionAndroidName,
......
......@@ -3087,6 +3087,15 @@
"owners": [ "ccameron", "jvanverth" ],
"expiry_milestone": 83
},
{
"name": "metrics-settings-android",
"owners": [
"andzaytsev",
"msramek",
"chrome-friendly-settings@google.com"
],
"expiry_milestone": 95
},
{
"name": "mixed-forms-disable-autofill",
"owners": [ "carlosil" ],
......
......@@ -1382,6 +1382,10 @@ const char kMediaRouterCastAllowAllIPsDescription[] =
"Have the Media Router connect to Cast devices on all IP addresses, not "
"just RFC1918/RFC4193 private addresses.";
const char kMetricsSettingsAndroidName[] = "Metrics Settings on Android";
const char kMetricsSettingsAndroidDescription[] =
"Enables the new design of metrics settings.";
const char kMixedFormsDisableAutofillName[] =
"Disable autofill for mixed forms";
const char kMixedFormsDisableAutofillDescription[] =
......
......@@ -806,6 +806,9 @@ extern const char kMediaHistoryDescription[];
extern const char kMediaRouterCastAllowAllIPsName[];
extern const char kMediaRouterCastAllowAllIPsDescription[];
extern const char kMetricsSettingsAndroidName[];
extern const char kMetricsSettingsAndroidDescription[];
extern const char kMixedFormsDisableAutofillName[];
extern const char kMixedFormsDisableAutofillDescription[];
......
......@@ -85,6 +85,7 @@ const base::Feature* kFeaturesExposedToJava[] = {
&features::kDownloadsLocationChange,
&features::kGenericSensorExtraClasses,
&features::kInstallableAmbientBadgeInfoBar,
&features::kMetricsSettingsAndroid,
&features::kNetworkServiceInProcess,
&features::kOverscrollHistoryNavigation,
&features::kPredictivePrefetchingAllowedOnAllConnectionTypes,
......
......@@ -316,6 +316,7 @@ public abstract class ChromeFeatureList {
"MessagesForAndroidInfrastructure";
public static final String MOBILE_IDENTITY_CONSISTENCY = "MobileIdentityConsistency";
public static final String MODAL_PERMISSION_DIALOG_VIEW = "ModalPermissionDialogView";
public static final String METRICS_SETTINGS_ANDROID = "MetricsSettingsAndroid";
public static final String NEW_PHOTO_PICKER = "NewPhotoPicker";
public static final String NOTIFICATION_SUSPENDER = "NotificationSuspender";
public static final String NTP_ARTICLE_SUGGESTIONS = "NTPArticleSuggestions";
......
......@@ -549,6 +549,12 @@ const base::Feature kMeteredShowToggle{"MeteredShowToggle",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif
#if defined(OS_ANDROID)
// Enables the new design of metrics settings.
const base::Feature kMetricsSettingsAndroid{"MetricsSettingsAndroid",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif
// Enables the use of native notification centers instead of using the Message
// Center for displaying the toasts. The feature is hardcoded to enabled for
// Chrome OS.
......
......@@ -350,6 +350,11 @@ COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kMeteredShowToggle;
#endif
#if defined(OS_ANDROID)
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kMetricsSettingsAndroid;
#endif
#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kNativeNotifications;
......
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