blob: b1d9c4663421ac13b314ca9d548d46784d796402 [file] [log] [blame]
sdefresne14900ee2015-11-27 14:43:211// Copyright 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Nazerke9c259052019-06-26 15:30:108#include "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
avi571943672015-12-22 02:12:4911#include <stddef.h>
12#include <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gregory Chatzinofff6523722017-11-21 01:33:5314#include "base/base_switches.h"
sdefresne14900ee2015-11-27 14:43:2115#include "base/bind.h"
danakjdb9ae7942020-11-11 16:01:3516#include "base/callback_helpers.h"
Hans Wennborg3a2fb61f2020-05-11 15:51:1617#include "base/check_op.h"
David Jean5ca263c2021-08-18 09:19:3018#import "base/mac/foundation_util.h"
Sylvain Defresne8327a2f2019-01-17 14:19:1819#include "base/no_destructor.h"
sdefresne14900ee2015-11-27 14:43:2120#include "base/strings/stringprintf.h"
21#include "base/strings/sys_string_conversions.h"
Sebastien Marchand75a7cdf2018-11-13 23:47:0322#include "base/system/sys_info.h"
Mohamad Ahmadic4df81f2017-12-20 04:41:5923#include "components/autofill/core/common/autofill_features.h"
Jared Sauld998539f2019-03-19 15:11:1724#include "components/autofill/core/common/autofill_payments_features.h"
Moe Ahmadid6d5d172018-06-20 17:20:2325#include "components/autofill/core/common/autofill_switches.h"
Olivier Robin3d60411622018-02-23 10:03:2226#include "components/autofill/ios/browser/autofill_switches.h"
Jesse McKenna85c1a59f2021-05-05 19:08:3027#include "components/breadcrumbs/core/features.h"
Matt Jones125dfb42022-02-11 17:23:4228#include "components/commerce/core/commerce_feature_list.h"
29#include "components/commerce/core/flag_descriptions.h"
Robbie Gibson5e3436632020-04-27 15:48:0430#include "components/content_settings/core/common/features.h"
sdefresne14900ee2015-11-27 14:43:2131#include "components/dom_distiller/core/dom_distiller_switches.h"
Guillaume Jenkins4e6ac1e2020-11-11 16:57:4032#include "components/enterprise/browser/enterprise_switches.h"
Tommy Nyquistc1d6dea12017-07-26 20:37:2333#include "components/feature_engagement/public/feature_constants.h"
34#include "components/feature_engagement/public/feature_list.h"
edchind847c0962021-03-03 18:17:0535#include "components/feed/feed_feature_list.h"
sdefresne14900ee2015-11-27 14:43:2136#include "components/flags_ui/feature_entry.h"
37#include "components/flags_ui/feature_entry_macros.h"
38#include "components/flags_ui/flags_storage.h"
39#include "components/flags_ui/flags_ui_switches.h"
Tanja Gornakb0985dd2018-10-11 17:24:4040#include "components/invalidation/impl/invalidation_switches.h"
noyau4cfb1332016-10-25 17:05:4241#include "components/ntp_tiles/switches.h"
Justin Donnelly33d712e2017-08-23 21:32:5142#include "components/omnibox/browser/omnibox_field_trial.h"
Tomasz Wiszkowskid938a1112019-03-06 18:01:5743#include "components/omnibox/common/omnibox_features.h"
Raj T3898f032021-08-19 23:51:2744#include "components/optimization_guide/core/optimization_guide_features.h"
Ioana Pandeled14ce9e2017-11-28 14:41:4645#include "components/password_manager/core/common/password_manager_features.h"
mathp9b4c11d2017-07-06 20:24:1346#include "components/payments/core/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4047#import "components/policy/core/common/policy_loader_ios_constants.h"
48#include "components/policy/policy_constants.h"
Joemer Ramos34175732022-02-14 18:59:1649#include "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2550#import "components/send_tab_to_self/features.h"
Tommy Martino0caf3362021-01-13 20:29:5851#include "components/shared_highlighting/core/common/shared_highlighting_features.h"
Valeriya Sinevicha79dc612018-09-25 14:49:0952#include "components/signin/core/browser/account_reconcilor.h"
Jérôme Lebelc374fdd2019-09-27 10:36:4853#include "components/signin/ios/browser/features.h"
Colin Blundell3517170e2019-07-11 08:16:3454#include "components/signin/public/base/signin_switches.h"
sdefresne36579782016-02-05 11:08:2555#include "components/strings/grit/components_strings.h"
Victor Hugo Vianna Silvaa48aa01c2022-02-09 20:38:2356#include "components/sync/base/command_line_switches.h"
57#include "components/sync/base/features.h"
Ewann570a6302021-08-17 07:22:4258#include "components/sync/base/pref_names.h"
Moe Ahmadie4cce1f2018-12-18 23:48:0159#include "components/translate/core/browser/translate_prefs.h"
Olivier Robinffe767c2022-04-21 13:13:2360#include "components/translate/core/common/translate_util.h"
Sylvain Defresneae6987e2018-03-01 13:21:4061#include "ios/chrome/browser/browsing_data/browsing_data_features.h"
sdefresne14900ee2015-11-27 14:43:2162#include "ios/chrome/browser/chrome_switches.h"
Eugene But2823dc7e2020-07-21 18:10:3763#include "ios/chrome/browser/crash_report/features.h"
Nazerke21bdc45a2019-07-11 09:02:0564#include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Ed Chin100660bf2022-04-26 16:59:1365#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselled042d552022-04-09 01:22:5966#include "ios/chrome/browser/policy/cloud/user_policy_switch.h"
edchin68696842020-04-09 17:19:3167#include "ios/chrome/browser/policy/policy_features.h"
Vincent Boisselle19200bc2021-09-01 17:58:2568#include "ios/chrome/browser/policy/policy_util.h"
Sylvain Defresne9c107082020-10-27 16:39:1369#include "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3470#import "ios/chrome/browser/sessions/session_features.h"
Gauthier Ambard33e03302019-02-21 13:28:5871#include "ios/chrome/browser/system_flags.h"
Louis Romeroac04f786a2022-04-19 09:39:3072#include "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2173#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5074#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2475#import "ios/chrome/browser/ui/download/features.h"
Aliona DANGLAebfd7d022021-10-08 14:15:4576#include "ios/chrome/browser/ui/first_run/fre_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3577#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
adamta273568472020-12-04 23:53:5778#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0179#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Tina Wang17514e2f2021-09-24 23:57:1880#import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_features.h"
Robbie Gibson686c56732021-10-04 17:11:4581#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
gogerald0ff29e52021-02-03 18:56:1982#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Nazerke0bf10c42020-11-12 11:17:3283#import "ios/chrome/browser/ui/tab_switcher/tab_grid/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2884#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Justin Cohen2d81c582018-01-22 14:46:4485#include "ios/chrome/browser/ui/ui_feature_flags.h"
Louis Romerofbfbd932022-04-15 18:04:5086#include "ios/chrome/browser/ui/util/features.h"
Yi Su392b3032018-06-05 07:26:4787#include "ios/chrome/browser/web/features.h"
sdefresne14900ee2015-11-27 14:43:2188#include "ios/chrome/grit/ios_strings.h"
Mustafa Emre Acer4de8863a2022-05-03 22:17:0189#include "ios/components/security_interstitials/https_only_mode/feature.h"
Sylvain Defresne559ce5f2022-01-13 17:14:5890#include "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
Eugene But61818bc2019-04-15 21:04:0791#include "ios/web/common/features.h"
Eugene Bute79f2742019-07-26 17:07:2292#include "ios/web/common/user_agent.h"
Eugene Butb1416232019-07-22 17:31:5893#include "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:2194
Sylvain Defresne9c107082020-10-27 16:39:1395#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
96#include "ios/chrome/browser/screen_time/features.h"
97#endif
98
sdefresne14900ee2015-11-27 14:43:2199#if !defined(OFFICIAL_BUILD)
100#include "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22101#endif
stkhapuginc1be1792016-12-13 14:30:53102
103#if !defined(__has_feature) || !__has_feature(objc_arc)
104#error "This file requires ARC support."
105#endif
sdefresne14900ee2015-11-27 14:43:21106
elawrence816f6790e2017-06-16 18:19:28107using flags_ui::FeatureEntry;
108
sdefresne14900ee2015-11-27 14:43:21109namespace {
Emily Starkbafa9062017-12-27 15:22:46110
Olivier Robin3d60411622018-02-23 10:03:22111const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
112 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
113 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
114 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
115 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
116 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
117 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
118 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
119 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
120 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
121};
122
Nohemi Fernandez222d6d42020-09-30 20:35:57123const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = {
124 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
125 {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"},
126 {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"},
127 {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"},
128};
129
Nohemi Fernandezc00842a2021-07-26 11:47:34130const FeatureEntry::Choice
131 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
132 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
133 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
134 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
135 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
136};
137
Stepan Khapugincc4e9842019-01-23 13:38:13138const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
139 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
140const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
141 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
142const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
143 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
144const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
145 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
152
153const FeatureEntry::FeatureVariation
154 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
155 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53156 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13157 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53158 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13159 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53160 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13161 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53162 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13163 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13169
Caitlin Fischer37e01232019-05-24 13:05:45170const FeatureEntry::FeatureParam
171 kAutofillUseMobileLabelDisambiguationShowAll[] = {
172 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
173 autofill::features::
174 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
175const FeatureEntry::FeatureParam
176 kAutofillUseMobileLabelDisambiguationShowOne[] = {
177 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
178 autofill::features::
179 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
180
181const FeatureEntry::FeatureVariation
182 kAutofillUseMobileLabelDisambiguationVariations[] = {
183 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53184 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45185 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53186 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45187
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10188const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59189 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
190 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
191const FeatureEntry::FeatureVariation
192 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
193 {"Remind me later",
194 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53195 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59196 nullptr}};
197
gogeralddb0d8ae2020-11-13 03:56:58198const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
199 {kDiscoverFeedIsNativeUIEnabled, "true"}};
200const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
201 {"Native UI", kDiscoverFeedInNtpEnableNativeUI,
Daniel Cheng1f047a82022-02-26 10:04:53202 std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
gogeralddb0d8ae2020-11-13 03:56:58203
Sergio Collazos9fcc6ed2021-10-06 00:58:03204const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = {
205 {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}};
206const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = {
207 {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}};
208const FeatureEntry::FeatureVariation
209 kEnableDiscoverFeedStaticResourceServingVariations[] = {
210 {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53211 std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03212 {"Preload Templates", kDiscoverFeedSRSPreloadTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53213 std::size(kDiscoverFeedSRSPreloadTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03214};
215
Robbie Gibson46351032022-03-31 19:46:23216const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
217 {kIOSOmniboxUpdatedPopupUIVariationName,
218 kIOSOmniboxUpdatedPopupUIVariation1}};
219const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
220 {kIOSOmniboxUpdatedPopupUIVariationName,
221 kIOSOmniboxUpdatedPopupUIVariation2}};
222const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
223 {"Version 1", kiOSOmniboxUpdatedPopupUIVersion1,
224 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
225 {"Version 2", kiOSOmniboxUpdatedPopupUIVersion2,
226 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}};
227
gogerald53c6e7a2021-04-15 22:07:35228const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08229 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35230 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
231const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08232 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35233 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
234const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08235 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35236 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
237const FeatureEntry::FeatureParam
238 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
239 {kStartSurfaceShrinkLogoParam, "true"},
240 {kStartSurfaceReturnToRecentTabParam, "true"},
241 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
242const FeatureEntry::FeatureParam
243 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
244 {kStartSurfaceHideShortcutsParam, "true"},
245 {kStartSurfaceReturnToRecentTabParam, "true"},
246 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
247const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08248 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35249 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
250const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
251 {kStartSurfaceHideShortcutsParam, "true"},
252 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
253const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08254 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35255 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
256const FeatureEntry::FeatureParam
257 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
258 {kStartSurfaceShrinkLogoParam, "true"},
259 {kStartSurfaceReturnToRecentTabParam, "true"},
260 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
261const FeatureEntry::FeatureParam
262 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
263 {kStartSurfaceHideShortcutsParam, "true"},
264 {kStartSurfaceReturnToRecentTabParam, "true"},
265 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08266
gogerald0e39e3aa2021-02-10 18:41:23267const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35268 {"10s:Show Return to Recent Tab tile",
269 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53270 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35271 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53272 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35273 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53274 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35275 {"10s:Shrink Logo and show Return to Recent Tab tile",
276 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53277 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35278 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
279 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53280 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35281 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53282 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35283 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53284 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35285 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53286 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35287 {"1h:Shrink Logo and show Return to Recent Tab tile",
288 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53289 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35290 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
291 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53292 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08293};
gogerald0e39e3aa2021-02-10 18:41:23294
Aliona DANGLA8fae66f02021-10-06 15:47:11295const FeatureEntry::FeatureParam kFREDefaultPromoTestingDefaultDelay[] = {
296 {kFREDefaultPromoTestingDefaultDelayParam, "true"}};
Aliona DANGLAebfd7d022021-10-08 14:15:45297const FeatureEntry::FeatureParam kFREDefaultPromoTestingOnly[] = {
298 {kFREDefaultPromoTestingOnlyParam, "true"}};
Aliona DANGLA8fae66f02021-10-06 15:47:11299const FeatureEntry::FeatureParam kFREDefaultPromoTestingShortDelay[] = {
300 {kFREDefaultPromoTestingShortDelayParam, "true"}};
301const FeatureEntry::FeatureVariation kFREDefaultPromoTestingVariations[] = {
302 {"Wait 14 days after FRE default browser promo",
303 kFREDefaultPromoTestingDefaultDelay,
Daniel Cheng1f047a82022-02-26 10:04:53304 std::size(kFREDefaultPromoTestingDefaultDelay), nullptr},
Aliona DANGLAebfd7d022021-10-08 14:15:45305 {"FRE default browser promo only", kFREDefaultPromoTestingOnly,
Daniel Cheng1f047a82022-02-26 10:04:53306 std::size(kFREDefaultPromoTestingOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11307 {"Wait 3 days after FRE default browser promo",
308 kFREDefaultPromoTestingShortDelay,
Daniel Cheng1f047a82022-02-26 10:04:53309 std::size(kFREDefaultPromoTestingShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11310};
311
Veronique Nguyen6593c762021-11-30 17:28:56312const FeatureEntry::FeatureVariation kEnableFREUIModuleIOSVariations[] = {
313 {"TOP | OLD",
314 (FeatureEntry::FeatureParam[]){
315 {kFREUIIdentitySwitcherPositionParam, "top"},
316 {kFREUIStringsSetParam, "old"}},
317 2, nullptr},
318 {"BOTTOM | OLD",
319 (FeatureEntry::FeatureParam[]){
320 {kFREUIIdentitySwitcherPositionParam, "bottom"},
321 {kFREUIStringsSetParam, "old"}},
322 2, nullptr},
323 {"TOP | NEW",
324 (FeatureEntry::FeatureParam[]){
325 {kFREUIIdentitySwitcherPositionParam, "top"},
326 {kFREUIStringsSetParam, "new"}},
327 2, nullptr},
328 {"BOTTOM | NEW",
329 (FeatureEntry::FeatureParam[]){
330 {kFREUIIdentitySwitcherPositionParam, "bottom"},
331 {kFREUIStringsSetParam, "new"}},
332 2, nullptr}};
333
jlebel041fc1c2022-03-04 12:53:30334const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = {
335 {kNewMobileIdentityConsistencyFREParam,
336 kNewMobileIdentityConsistencyFREParamUMADialog}};
337const FeatureEntry::FeatureParam kNewMICEFREWithThreeSteps[] = {
338 {kNewMobileIdentityConsistencyFREParam,
339 kNewMobileIdentityConsistencyFREParamThreeSteps}};
340const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
341 {kNewMobileIdentityConsistencyFREParam,
342 kNewMobileIdentityConsistencyFREParamTwoSteps}};
343const FeatureEntry::FeatureVariation
344 kNewMobileIdentityConsistencyFREVariations[] = {
345 {"New FRE with UMA dialog", kNewMICEFREWithUMADialog,
346 std::size(kNewMICEFREWithUMADialog), nullptr},
347 {"new FRE with 3 steps", kNewMICEFREWithThreeSteps,
348 std::size(kNewMICEFREWithThreeSteps), nullptr},
349 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
350 std::size(kNewMICEFREWithTwoSteps), nullptr}};
351
Louis Romero023cc5052022-04-08 23:29:39352const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
353 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01354const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
355 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
356const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
357 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
358const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
359 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
360const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39361 {"Target Highlight", kBubbleRichIPHTargetHighlight,
362 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01363 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
364 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
365 {"Dismissal and rich content", kBubbleRichIPHRich,
366 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39367 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01368 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
369};
370
Cooper Knaak1e026562017-07-26 05:22:28371// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21372// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28373// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
374// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21375// macro for this type supplying the command line to the macro.
376// . MULTI_VALUE: a list of choices, the first of which should correspond to a
377// deactivated state for this lab (i.e. no command line option). To specify
378// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
379// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28380// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
381// either enabled, disabled, or uses the default value of the associated
382// base::Feature instance. To specify this type of entry use the macro
383// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
384// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
385// base::Feature instance. Choices corresponding to the default state, a
386// universally enabled state, and a universally disabled state are
387// automatically included. To specify this type of entry use the macro
388// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
389// the array of choices.
390//
sdefresne14900ee2015-11-27 14:43:21391// See the documentation of FeatureEntry for details on the fields.
392//
393// When adding a new choice, add it to the end of the list.
394const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28395 {"in-product-help-demo-mode-choice",
396 flag_descriptions::kInProductHelpDemoModeName,
397 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
398 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23399 feature_engagement::kIPHDemoMode,
400 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09401 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22402 {"enable-autofill-credit-card-upload",
403 flag_descriptions::kAutofillCreditCardUploadName,
404 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24405 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Tina Wang41d431c2021-06-21 21:04:13406 {"enable-discover-feed-preview",
407 flag_descriptions::kEnableDiscoverFeedPreviewName,
408 flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos,
409 FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)},
Moe Ahmadid6d5d172018-06-20 17:20:23410 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
411 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
412 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51413 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23414 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
415 {"wallet-service-use-sandbox",
416 flag_descriptions::kWalletServiceUseSandboxName,
417 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
418 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
419 autofill::switches::kWalletServiceUseSandbox,
420 "1",
421 autofill::switches::kWalletServiceUseSandbox,
422 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59423 {"show-autofill-type-predictions",
424 flag_descriptions::kShowAutofillTypePredictionsName,
425 flag_descriptions::kShowAutofillTypePredictionsDescription,
426 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46427 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22428 {"autofill-ios-delay-between-fields",
429 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
430 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
431 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Kurt Horimotodc33af32018-05-01 01:39:14432 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53433 flag_descriptions::kFullscreenSmoothScrollingName,
434 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
435 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06436 {"webpage-default-zoom-from-dynamic-type",
437 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
438 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
439 flags_ui::kOsIos,
440 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56441 {"webpage-alternative-text-zoom",
442 flag_descriptions::kWebPageAlternativeTextZoomName,
443 flag_descriptions::kWebPageAlternativeTextZoomDescription,
444 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Kurt Horimoto79d590b2018-09-12 19:09:28445 {"toolbar-container", flag_descriptions::kToolbarContainerName,
446 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
447 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13448 {"omnibox-ui-max-autocomplete-matches",
449 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
450 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
451 flags_ui::kOsIos,
452 FEATURE_WITH_PARAMS_VALUE_TYPE(
453 omnibox::kUIExperimentMaxAutocompleteMatches,
454 kOmniboxUIMaxAutocompleteMatchesVariations,
455 "OmniboxUIMaxAutocompleteVariations")},
Robbie Gibson84f1ddc2020-12-10 21:41:28456 {"omnibox-local-history-zero-suggest",
457 flag_descriptions::kOmniboxLocalHistoryZeroSuggestName,
458 flag_descriptions::kOmniboxLocalHistoryZeroSuggestDescription,
459 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggest)},
Justin Cohen20b6f072019-01-16 01:38:50460#if defined(DCHECK_IS_CONFIGURABLE)
461 {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName,
462 flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos,
463 FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)},
464#endif // defined(DCHECK_IS_CONFIGURABLE)
Caitlin Fischer43edd90a2019-05-01 13:24:30465 {"autofill-use-mobile-label-disambiguation",
466 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
467 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
468 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45469 FEATURE_WITH_PARAMS_VALUE_TYPE(
470 autofill::features::kAutofillUseMobileLabelDisambiguation,
471 kAutofillUseMobileLabelDisambiguationVariations,
472 "AutofillUseMobileLabelDisambiguation")},
Olivier Robin43814bb2021-06-22 15:25:45473 {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName,
474 flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos,
475 FEATURE_VALUE_TYPE(kMetrickitCrashReport)},
Mike Doughertyb6c770d2019-09-13 22:56:46476 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
477 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30478 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Eugene But2823dc7e2020-07-21 18:10:37479 {"ios-synthetic-crash-reports",
480 flag_descriptions::kSyntheticCrashReportsForUteName,
481 flag_descriptions::kSyntheticCrashReportsForUteDescription,
482 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)},
Jérôme Lebelc374fdd2019-09-27 10:36:48483 {"force-startup-signin-promo",
484 flag_descriptions::kForceStartupSigninPromoName,
485 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29486 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22487 {"restore-session-from-cache",
488 flag_descriptions::kRestoreSessionFromCacheName,
489 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49490 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59491 {"autofill-save-card-dismiss-on-navigation",
492 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
493 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
494 flags_ui::kOsIos,
495 FEATURE_VALUE_TYPE(
496 autofill::features::kAutofillSaveCardDismissOnNavigation)},
sczs37d9c132020-07-18 06:06:33497 {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
adamta22a4d502020-05-21 03:12:21498 flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
gogeralddb0d8ae2020-11-13 03:56:58499 FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
500 kDiscoverFeedInNtpVariations,
501 "IOSDiscoverFeed")},
Roberto Mourab87b9722020-06-17 17:12:09502 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
503 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
504 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41505 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
506 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
507 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Veronique Nguyen6593c762021-11-30 17:28:56508 {"enable-fre-ui-module-ios-with-options",
509 flag_descriptions::kEnableFREUIModuleIOSName,
Tina Wanga252ca42021-04-01 17:14:23510 flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos,
Veronique Nguyen6593c762021-11-30 17:28:56511 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREUIModuleIOS,
512 kEnableFREUIModuleIOSVariations,
513 "EnableFREUIModuleIOS")},
jlebel041fc1c2022-03-04 12:53:30514 {"new-mobile-identity-consistency-fre",
515 flag_descriptions::kNewMobileIdentityConsistencyFREName,
516 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
517 flags_ui::kOsIos,
518 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
519 kNewMobileIdentityConsistencyFREVariations,
520 "NewMobileIdentityConsistencyFRE")},
Tina Wang17514e2f2021-09-24 23:57:18521 {"enable-long-message-duration",
522 flag_descriptions::kEnableLongMessageDurationName,
523 flag_descriptions::kEnableLongMessageDurationDescription, flags_ui::kOsIos,
524 FEATURE_VALUE_TYPE(kEnableLongMessageDuration)},
Sylvain Defresne9c107082020-10-27 16:39:13525#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45526 {"screen-time-integration-ios",
527 flag_descriptions::kScreenTimeIntegrationName,
528 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
529 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13530#endif
Nazerke3e993f72020-09-21 13:00:06531 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
532 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
533 FEATURE_VALUE_TYPE(kModernTabStrip)},
Nohemi Fernandez222d6d42020-09-30 20:35:57534 {"minutes-delay-to-restore-gaia-cookies-if-deleted",
535 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName,
536 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription,
537 flags_ui::kOsIos,
538 MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)},
Vidhan Jainb4de5c52021-08-30 17:08:02539 {"add-passwords-in-settings",
540 flag_descriptions::kAddPasswordsInSettingsName,
541 flag_descriptions::kAddPasswordsInSettingsDescription, flags_ui::kOsIos,
542 FEATURE_VALUE_TYPE(
543 password_manager::features::kSupportForAddPasswordsInSettings)},
Eugene Butf869bff2020-12-10 01:16:55544 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
545 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
546 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14547 {"default-browser-fullscreen-promo-experiment",
548 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
549 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
550 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59551 FEATURE_WITH_PARAMS_VALUE_TYPE(
552 kDefaultBrowserFullscreenPromoExperiment,
553 kDefaultBrowserFullscreenPromoExperimentVariations,
554 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11555 {"ios-shared-highlighting-color-change",
556 flag_descriptions::kIOSSharedHighlightingColorChangeName,
557 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07558 flags_ui::kOsIos,
559 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34560 {"ios-shared-highlighting-v2",
561 flag_descriptions::kIOSSharedHighlightingV2Name,
562 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
563 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45564 {"omnibox-new-textfield-implementation",
565 flag_descriptions::kOmniboxNewImplementationName,
566 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
567 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin422f08d2022-02-18 16:19:44568 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
569 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23570 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
571 kiOSOmniboxUpdatedPopupUIVariations,
572 "kIOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19573 {"start-surface", flag_descriptions::kStartSurfaceName,
574 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23575 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
576 kStartSurfaceVariations,
577 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28578 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
579 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
580 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42581 {"autofill-address-verification-in-save-prompt",
582 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
583 flag_descriptions::
584 kEnableAutofillAddressSavePromptAddressVerificationDescription,
585 flags_ui::kOsIos,
586 FEATURE_VALUE_TYPE(
587 autofill::features::
588 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Vidhan Jaina65741552021-03-09 17:18:27589 {"autofill-address-save-prompt",
590 flag_descriptions::kEnableAutofillAddressSavePromptName,
591 flag_descriptions::kEnableAutofillAddressSavePromptDescription,
592 flags_ui::kOsIos,
593 FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)},
Viktor Semeniuk68e794a2021-03-24 10:23:25594 {"filling-across-affiliated-websites",
595 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
596 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
597 flags_ui::kOsIos,
598 FEATURE_VALUE_TYPE(
599 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Jared Sauld47c2b72021-03-25 22:47:31600 {"autofill-parse-merchant-promo-code-fields",
601 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName,
602 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription,
603 flags_ui::kOsIos,
604 FEATURE_VALUE_TYPE(
605 autofill::features::kAutofillParseMerchantPromoCodeFields)},
edchin257cea2f2021-04-07 13:07:13606 {"interest-feed-v2-clicks-and-views-cond-upload",
607 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
608 flag_descriptions::
609 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
610 flags_ui::kOsIos,
611 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Mohammad Refaat76b14f542021-10-27 14:46:55612 {"tabs-search-ios", flag_descriptions::kTabsSearchName,
613 flag_descriptions::kTabsSearchDescription, flags_ui::kOsIos,
614 FEATURE_VALUE_TYPE(kTabsSearch)},
Mohammad Refaat95410082022-02-23 02:01:02615 {"tabs-search-regular-results-suggested-actions-ios",
616 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsName,
617 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsDescription,
618 flags_ui::kOsIos,
619 FEATURE_VALUE_TYPE(kTabsSearchRegularResultsSuggestedActions)},
Side Yilmaz0e6c15a2021-04-26 12:55:09620 {"incognito-brand-consistency-for-ios",
621 flag_descriptions::kIncognitoBrandConsistencyForIOSName,
622 flag_descriptions::kIncognitoBrandConsistencyForIOSDescription,
623 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIncognitoBrandConsistencyForIOS)},
Side Yilmaz6c53f7102021-09-07 13:26:19624 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
625 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
626 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33627 {"update-history-entry-points-in-incognito",
628 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
629 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
630 flags_ui::kOsIos,
631 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
jlebeld95434d652021-06-22 10:32:48632 {"sync-trusted-vault-passphrase-ios-rpc",
633 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName,
634 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription,
635 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51636 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)},
Mikel Astiz850b0fe2021-06-16 09:47:27637 {"sync-trusted-vault-passphrase-promo",
638 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
639 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
640 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51641 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27642 {"sync-trusted-vault-passphrase-recovery",
643 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
644 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
645 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51646 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34647 {"wait-threshold-seconds-for-capabilities-api",
648 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
649 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
650 flags_ui::kOsIos,
651 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23652 {"autofill-fill-merchant-promo-code-fields",
653 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
654 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
655 flags_ui::kOsIos,
656 FEATURE_VALUE_TYPE(
657 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Gauthier Ambard14d3a262021-08-09 18:09:23658 {"context-menu-phase2",
659 flag_descriptions::kWebViewNativeContextMenuPhase2Name,
660 flag_descriptions::kWebViewNativeContextMenuPhase2Description,
661 flags_ui::kOsIos,
662 FEATURE_VALUE_TYPE(web::features::kWebViewNativeContextMenuPhase2)},
Gauthier Ambard14d3a262021-08-09 18:09:23663 {"default-wkwebview-context-menu",
664 flag_descriptions::kDefaultWebViewContextMenuName,
665 flag_descriptions::kDefaultWebViewContextMenuDescription, flags_ui::kOsIos,
666 FEATURE_VALUE_TYPE(web::features::kDefaultWebViewContextMenu)},
Sylvain Defresnedff67e42021-09-24 09:43:03667 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
668 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
669 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
670 {"enable-new-download-api", flag_descriptions::kEnableNewDownloadAPIName,
671 flag_descriptions::kEnableNewDownloadAPIDescription, flags_ui::kOsIos,
672 FEATURE_VALUE_TYPE(web::features::kEnableNewDownloadAPI)},
Evan Bernstein0a85f332021-09-29 19:07:24673 {"use-lens-to-search-for-image",
674 flag_descriptions::kUseLensToSearchForImageName,
675 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44676 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40677 {"use-load-simulated-request-for-error-page-navigation",
678 flag_descriptions::kUseLoadSimulatedRequestForErrorPageNavigationName,
679 flag_descriptions::
680 kUseLoadSimulatedRequestForErrorPageNavigationDescription,
681 flags_ui::kOsIos,
682 FEATURE_VALUE_TYPE(
683 web::features::kUseLoadSimulatedRequestForErrorPageNavigation)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03684 {"enable-discover-feed-static-resource-serving",
685 flag_descriptions::kEnableDiscoverFeedStaticResourceServingName,
686 flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription,
687 flags_ui::kOsIos,
688 FEATURE_WITH_PARAMS_VALUE_TYPE(
689 kEnableDiscoverFeedStaticResourceServing,
690 kEnableDiscoverFeedStaticResourceServingVariations,
691 "IOSDiscoverFeedStaticResourceServing")},
692 {"enable-disco-feed-endpoint",
693 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
694 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
695 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11696 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
697 {"enable-fre-default-browser-screen-testing",
698 flag_descriptions::kEnableFREDefaultBrowserScreenTestingName,
699 flag_descriptions::kEnableFREDefaultBrowserScreenTestingDescription,
700 flags_ui::kOsIos,
701 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserScreenTesting,
702 kFREDefaultPromoTestingVariations,
ginny huang5ba43b82021-10-06 18:28:18703 "EnableFREDefaultBrowserScreenTesting")},
edchin1313f2b2021-10-11 08:08:47704 {"enable-discover-feed-shorter-cache",
705 flag_descriptions::kEnableDiscoverFeedShorterCacheName,
706 flag_descriptions::kEnableDiscoverFeedShorterCacheDescription,
707 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedShorterCache)},
Tommy Martino7393d762021-10-12 17:59:28708 {"shared-highlighting-amp",
709 flag_descriptions::kIOSSharedHighlightingAmpName,
710 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
711 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28712 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42713 commerce::flag_descriptions::kCommercePriceTrackingName,
714 commerce::flag_descriptions::kCommercePriceTrackingDescription,
715 flags_ui::kOsIos,
716 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
717 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15718 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06719 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
720 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
721 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54722 {"ntp-view-hierarchy-repair",
723 flag_descriptions::kNTPViewHierarchyRepairName,
724 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)},
Chris Lu37588a92021-11-02 21:19:45726 {"single-ntp", flag_descriptions::kSingleNtpName,
727 flag_descriptions::kSingleNtpDescription, flags_ui::kOsIos,
728 FEATURE_VALUE_TYPE(kSingleNtp)},
Justin Cohen69cec682021-11-04 20:10:26729 {"synthesized-restore-session",
730 flag_descriptions::kSynthesizedRestoreSessionName,
731 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
732 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Chris Lu4723b822021-11-05 21:47:44733 {"remove-extra-ntps", flag_descriptions::kRemoveExcessNTPsExperimentName,
734 flag_descriptions::kRemoveExcessNTPsExperimentDescription,
Sylvain Defresne1619dd002021-11-06 10:09:48735 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kRemoveExcessNTPs)},
736 {"lazily-create-web-state-on-restoration",
737 flag_descriptions::kLazilyCreateWebStateOnRestorationName,
738 flag_descriptions::kLazilyCreateWebStateOnRestorationDescription,
739 flags_ui::kOsIos,
740 FEATURE_VALUE_TYPE(web::features::kEnableUnrealizedWebStates)},
ginny huang1f1755c2021-11-11 23:38:23741 {"enable-shortened-password-auto-fill-instruction",
742 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionName,
743 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionDescription,
744 flags_ui::kOsIos,
745 FEATURE_VALUE_TYPE(kEnableShortenedPasswordAutoFillInstruction)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41746 {"enable-password-manager-branding-update",
747 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
748 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
749 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19750 FEATURE_VALUE_TYPE(
751 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
Gauthier Ambard1d326e22021-12-16 10:57:53752 {"default-mode-ua", flag_descriptions::kAddSettingForDefaultPageModeName,
753 flag_descriptions::kAddSettingForDefaultPageModeDescription,
754 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAddSettingForDefaultPageMode)},
ginnnnnnny1532d872021-12-20 15:57:37755 {"ios-media-permissions-control",
756 flag_descriptions::kMediaPermissionsControlName,
757 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
758 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34759 {"enable-save-session-tabs-in-separate-files",
760 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
761 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
762 flags_ui::kOsIos,
763 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Gauthier Ambard42ad0bb2021-12-22 16:50:48764 {"use-sf-symbols-samples", flag_descriptions::kUseSFSymbolsSamplesName,
765 flag_descriptions::kUseSFSymbolsSamplesDescription, flags_ui::kOsIos,
766 FEATURE_VALUE_TYPE(kUseSFSymbolsSamples)},
Gauthier Ambardfa182542022-01-07 08:27:50767 {"use-new-popup-menu", flag_descriptions::kUseUIKitPopupMenuName,
768 flag_descriptions::kUseUIKitPopupMenuDescription, flags_ui::kOsIos,
769 FEATURE_VALUE_TYPE(kUseUIKitPopupMenu)},
Nohemi Fernandez76f54802022-01-10 18:23:32770 {"enable-unicorn-account-support",
771 flag_descriptions::kEnableUnicornAccountSupportName,
772 flag_descriptions::kEnableUnicornAccountSupportDescription,
773 flags_ui::kOsIos,
774 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
Chris Lu411bea82022-01-12 18:19:22775 {"single-cell-content-suggestions",
776 flag_descriptions::kSingleCellContentSuggestionsName,
777 flag_descriptions::kSingleCellContentSuggestionsDescription,
778 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSingleCellContentSuggestions)},
Chris Lue5211052022-02-02 20:44:04779 {"content-suggestions-header-migration",
780 flag_descriptions::kContentSuggestionsHeaderMigrationName,
781 flag_descriptions::kContentSuggestionsHeaderMigrationDescription,
782 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContentSuggestionsHeaderMigration)},
rgod90cca8b2022-02-04 12:38:27783 {"leak-detection-unauthenticated",
784 flag_descriptions::kLeakDetectionUnauthenticatedName,
785 flag_descriptions::kLeakDetectionUnauthenticatedDescription,
786 flags_ui::kOsIos,
787 FEATURE_VALUE_TYPE(
788 password_manager::features::kLeakDetectionUnauthenticated)},
Veronique Nguyenfc9824b2022-02-10 17:12:53789 {"mute-compromised-passwords",
790 flag_descriptions::kMuteCompromisedPasswordsName,
791 flag_descriptions::kMuteCompromisedPasswordsDescription, flags_ui::kOsIos,
792 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Veronique Nguyen00ba26ea2022-02-25 14:57:17793 {"enable-favicon-passwords",
794 flag_descriptions::kEnableFaviconForPasswordsName,
795 flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos,
796 FEATURE_VALUE_TYPE(
797 password_manager::features::kEnableFaviconForPasswords)},
Shivani Chauhanbf97b0d2022-02-08 22:21:28798 {"autofill-enable-sending-bcn-in-get-upload-details",
799 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
800 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
801 flags_ui::kOsIos,
802 FEATURE_VALUE_TYPE(
803 autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
Ali Juma1429cf8a2022-02-09 15:31:01804 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
805 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
806 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramos34175732022-02-14 18:59:16807 {"enable-enhanced-safe-browsing",
808 flag_descriptions::kEnhancedProtectionName,
809 flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)},
Christian Xu612e2852022-02-10 17:27:42811 {"context-menu-phase2-screenshot",
812 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotName,
813 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotDescription,
814 flags_ui::kOsIos,
815 FEATURE_VALUE_TYPE(
816 web::features::kWebViewNativeContextMenuPhase2Screenshot)},
Shivani Chauhanaf1eb74d2022-02-11 21:13:19817 {"autofill-enable-unmask-card-request-set-instrument-id",
818 flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName,
819 flag_descriptions::
820 kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription,
821 flags_ui::kOsIos,
822 FEATURE_VALUE_TYPE(
823 autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00824 {"send-tab-to-self-signin-promo",
825 flag_descriptions::kSendTabToSelfSigninPromoName,
826 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
827 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Chris Lu7f560f72022-03-01 18:19:01828 {"content-suggestions-uiviewcontroller-migration",
829 flag_descriptions::kContentSuggestionsUIViewControllerMigrationName,
830 flag_descriptions::kContentSuggestionsUIViewControllerMigrationDescription,
831 flags_ui::kOsIos,
832 FEATURE_VALUE_TYPE(kContentSuggestionsUIViewControllerMigration)},
Christian Xubd60c4b72022-03-22 15:25:01833 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
834 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
835 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
836 kBubbleRichIPHVariations,
837 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22838 {"autofill-enforce-delays-in-strike-database",
839 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
840 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
841 flags_ui::kOsIos,
842 FEATURE_VALUE_TYPE(
843 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Ewann4f260562022-04-11 13:37:19844 {"download-calendar", flag_descriptions::kDownloadCalendarName,
845 flag_descriptions::kDownloadCalendarDescription, flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(kDownloadCalendar)},
Louis Romerofbfbd932022-04-15 18:04:50847 {"uiview-window-observing", flag_descriptions::kUIViewWindowObservingName,
848 flag_descriptions::kUIViewWindowObservingDescription, flags_ui::kOsIos,
849 FEATURE_VALUE_TYPE(kUIViewWindowObserving)},
Jared Saulb0473bd2022-04-20 00:03:41850 {"autofill-upstream-allow-additional-email-domains",
851 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
852 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
853 flags_ui::kOsIos,
854 FEATURE_VALUE_TYPE(
855 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
856 {"autofill-upstream-allow-all-email-domains",
857 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
858 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
859 flags_ui::kOsIos,
860 FEATURE_VALUE_TYPE(
861 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Olivier Robinffe767c2022-04-21 13:13:23862 {"enable-tflite-language-detection",
863 flag_descriptions::kTFLiteLanguageDetectionName,
864 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
865 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
866 {"optimization-guide-model-downloading",
867 flag_descriptions::kOptimizationGuideModelDownloadingName,
868 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
869 flags_ui::kOsIos,
870 FEATURE_VALUE_TYPE(
871 optimization_guide::features::kOptimizationGuideModelDownloading)},
872 {"optimization-target-prediction",
873 flag_descriptions::kOptimizationTargetPredictionName,
874 flag_descriptions::kOptimizationTargetPredictionDescription,
875 flags_ui::kOsIos,
876 FEATURE_VALUE_TYPE(
877 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54878 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
879 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
880 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
881 {"sync-standalone-invalidations-wallet-and-offer",
882 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
883 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
884 flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01886 {"suggestions-scrolling-ipad",
887 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
888 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
889 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
David Jean7a8fa702022-05-02 15:21:22890 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
891 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
892 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:01893 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
894 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
895 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Sylvain Defresne1619dd002021-11-06 10:09:48896};
sdefresne14900ee2015-11-27 14:43:21897
Rohit Raobed794c2020-04-27 15:27:45898bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
899 return false;
900}
901
902flags_ui::FlagsState& GetGlobalFlagsState() {
903 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
904 nullptr);
905 return *flags_state;
906}
David Jean5ca263c2021-08-18 09:19:30907// Creates the experimental test policies map, used by AsyncPolicyLoader and
908// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:34909NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:21910 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
911
Guillaume Jenkins25e9bd72020-08-27 17:39:06912 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:55913 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:06914 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:55915
Guillaume Jenkins25e9bd72020-08-27 17:39:06916 // Set some sample policy values for testing if EnableSamplePolicies is set to
917 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:40918 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:55919 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:01920 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
921
Guillaume Jenkinseeb7007c2020-06-25 22:55:40922 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
923
924 // 2 = Disable all variations
925 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
926
927 // 2 = Do not allow any site to show popups
928 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
929
Tina Wang5abee802020-07-29 23:09:52930 // Set default search engine.
931 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
932 @YES,
933 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
934 @"http://www.google.com/search?q={searchTerms}",
935 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:02936 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:52937
Tina Wang89068c82020-10-29 15:51:50938 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
939
Gauthier Ambard21b23702021-04-16 16:11:27940 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
941
Guillaume Jenkinseeb7007c2020-06-25 22:55:40942 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:01943
944 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:53945
946 // 2 = Enhanced safe browsing protection
947 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
948
949 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:55950 }];
951 }
952
Ewann227a3c02021-04-19 12:04:54953 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:04954 NSString* sync_policy_key =
955 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:30956 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:54957 }
Ewann227a3c02021-04-19 12:04:54958
Ewann570a6302021-08-17 07:22:42959 // SyncTypesListDisabled policy.
960 NSString* Sync_types_list_disabled_key =
961 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
962 NSMutableArray* Sync_types_list_disabled_values =
963 [[NSMutableArray alloc] init];
964 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
965 [Sync_types_list_disabled_values addObject:@"bookmarks"];
966 }
967 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
968 [Sync_types_list_disabled_values addObject:@"readingList"];
969 }
970 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
971 [Sync_types_list_disabled_values addObject:@"preferences"];
972 }
973 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
974 [Sync_types_list_disabled_values addObject:@"passwords"];
975 }
976 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
977 [Sync_types_list_disabled_values addObject:@"autofill"];
978 }
979 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
980 [Sync_types_list_disabled_values addObject:@"typedUrls"];
981 }
982 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
983 [Sync_types_list_disabled_values addObject:@"tabs"];
984 }
985 if ([Sync_types_list_disabled_values count]) {
986 [testing_policies addEntriesFromDictionary:@{
987 Sync_types_list_disabled_key : Sync_types_list_disabled_values
988 }];
Ewann570a6302021-08-17 07:22:42989 }
990
Gauthier Ambard073eaa92021-11-22 15:24:13991 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:52992 NSString* incognito_policy_key =
993 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
994 NSInteger incognito_mode_availability =
995 [defaults integerForKey:incognito_policy_key];
996 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:52997 [testing_policies addEntriesFromDictionary:@{
998 incognito_policy_key : @(incognito_mode_availability),
999 }];
1000 }
1001
Ewann40a8f8a2021-07-29 10:01:201002 NSString* restriction_pattern =
1003 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1004 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291005 NSString* restrict_key =
1006 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201007 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291008 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201009 }];
1010 }
1011
Vincent Boisselle19200bc2021-09-01 17:58:251012 // If the sign-in policy is set (not "None"), add the policy key to the list
1013 // of enabled experimental policies, and set the value.
1014 NSString* const kSigninPolicyKey = @"BrowserSignin";
1015 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1016 if (signin_policy_mode) {
1017 // Remove the mode offset that was used to represent the unset policy.
1018 --signin_policy_mode;
1019 DCHECK(signin_policy_mode >= 0);
1020
Vincent Boisselle19200bc2021-09-01 17:58:251021 [testing_policies addEntriesFromDictionary:@{
1022 kSigninPolicyKey : @(signin_policy_mode),
1023 }];
1024 }
1025
Veronique Nguyen9b1044f2022-01-11 14:41:131026 // If the New Tab Page URL is set (not empty) add the value to the list of
1027 // test policies.
1028 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1029 if ([ntp_location length] > 0) {
1030 NSString* ntp_location_key =
1031 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1032 [testing_policies
1033 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571034 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131035 }
1036
Ali Juma9ec36d22022-03-28 14:53:121037 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1038 NSString* allow_backups_key =
1039 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1040 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1041 [allowed_experimental_policies addObject:allow_backups_key];
1042 }
1043
Guillaume Jenkins25e9bd72020-08-27 17:39:061044 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1045 // policy.
1046 if ([allowed_experimental_policies count] > 0) {
1047 [testing_policies setValue:allowed_experimental_policies
1048 forKey:base::SysUTF8ToNSString(
1049 policy::key::kEnableExperimentalPolicies)];
1050 }
1051
David Jean6f85d44f2021-08-19 08:08:451052 // Warning: Add new flags to TestingPoliciesHash() below.
1053
David Jean5ca263c2021-08-18 09:19:301054 return testing_policies;
1055}
David Jean6f85d44f2021-08-19 08:08:451056
1057// Generates a unique NSString based on currently monitored policies from
1058// NSUserDefaults standardUserDefaults.
1059NSString* TestingPoliciesHash() {
1060 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1061 return [NSString
Ali Juma9ec36d22022-03-28 14:53:121062 stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d",
1063 [defaults boolForKey:@"DisallowChromeDataInBackups"],
David Jean6f85d44f2021-08-19 08:08:451064 [defaults boolForKey:@"EnableSyncDisabledPolicy"],
1065 [defaults boolForKey:@"EnableSamplePolicies"],
1066 (int)[defaults
1067 integerForKey:@"IncognitoModeAvailability"],
1068 [defaults stringForKey:@"RestrictAccountsToPatterns"],
1069 [defaults boolForKey:@"SyncTypesListBookmarks"],
1070 [defaults boolForKey:@"SyncTypesListReadingList"],
1071 [defaults boolForKey:@"SyncTypesListPreferences"],
1072 [defaults boolForKey:@"SyncTypesListPasswords"],
1073 [defaults boolForKey:@"SyncTypesListAutofill"],
1074 [defaults boolForKey:@"SyncTypesListTypedUrls"],
1075 [defaults boolForKey:@"SyncTypesListTabs"]];
1076}
David Jean5ca263c2021-08-18 09:19:301077} // namespace
1078
1079// Add all switches from experimental flags to |command_line|.
1080void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1081 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1082
1083 // Set the UA flag if UseMobileSafariUA is enabled.
1084 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1085 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1086 // Chrome puts its product token.
1087 int32_t major = 0;
1088 int32_t minor = 0;
1089 int32_t bugfix = 0;
1090 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1091 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1092
1093 command_line->AppendSwitchASCII(switches::kUserAgent,
1094 web::BuildMobileUserAgent(product));
1095 }
1096
1097 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341098 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301099
1100 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1101 // Management to enabled and add the token to the list of policies.
1102 NSString* token_key =
1103 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1104 NSString* token = [defaults stringForKey:token_key];
1105
1106 if ([token length] > 0) {
1107 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1108 [testing_policies setValue:token forKey:token_key];
1109 }
1110
Vincent Boisselled042d552022-04-09 01:22:591111 if ([defaults boolForKey:@"EnableUserPolicy"]) {
1112 policy::EnableUserPolicy();
1113 }
1114
Guillaume Jenkins57606d72020-08-13 17:32:551115 // If some policies were set, commit them to the app's registration defaults.
1116 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401117 NSDictionary* registration_defaults =
1118 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1119 [defaults registerDefaults:registration_defaults];
1120 }
1121
sdefresne14900ee2015-11-27 14:43:211122 // Freeform commandline flags. These are added last, so that any flags added
1123 // earlier in this function take precedence.
1124 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1125 base::CommandLine::StringVector flags;
1126 // Append an empty "program" argument.
1127 flags.push_back("");
1128
1129 // The number of flags corresponds to the number of text fields in
1130 // Experimental.plist.
1131 const int kNumFreeformFlags = 5;
1132 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1133 NSString* key =
1134 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1135 NSString* flag = [defaults stringForKey:key];
1136 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331137 // iOS keyboard replaces -- with —, so undo that.
1138 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1139 withString:@"--"
1140 options:0
1141 range:NSMakeRange(0, 1)];
1142 // To make things easier, allow flags with no dashes by prepending them
1143 // here. This also allows for flags that just have one dash if they
1144 // exist.
1145 if (![flag hasPrefix:@"-"]) {
1146 flag = [@"--" stringByAppendingString:flag];
1147 }
sdefresne14900ee2015-11-27 14:43:211148 flags.push_back(base::SysNSStringToUTF8(flag));
1149 }
1150 }
1151
1152 base::CommandLine temp_command_line(flags);
1153 command_line->AppendArguments(temp_command_line, false);
1154 }
msardafc76f662017-02-24 12:46:281155
justincohendacc85d2017-06-28 23:34:101156 // Populate command line flag for 3rd party keyboard omnibox workaround.
1157 NSString* enableThirdPartyKeyboardWorkaround =
1158 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1159 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1160 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1161 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1162 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1163 }
1164
Sylvain Defresned3cd8d92022-01-18 13:35:081165 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211166}
1167
David Jean5ca263c2021-08-18 09:19:301168void MonitorExperimentalSettingsChanges() {
David Jean5ca263c2021-08-18 09:19:301169 // Startup values for settings to be observed.
David Jean6f85d44f2021-08-19 08:08:451170 __block NSString* hash = TestingPoliciesHash();
David Jeane83ed652021-08-25 14:52:481171 static std::atomic_bool pending_check(false);
David Jean5ca263c2021-08-18 09:19:301172
1173 auto monitor = ^(NSNotification* notification) {
David Jeane83ed652021-08-25 14:52:481174 bool has_pending_check = pending_check.exchange(true);
1175 if (has_pending_check)
1176 return;
1177
David Jeanbc0fae32021-08-25 10:31:391178 // Can be called from any thread from where the notification was sent,
1179 // but since it may change standardUserDefaults, and that has to be on main
1180 // thread, dispatch to main thread.
1181 dispatch_async(dispatch_get_main_queue(), ^{
1182 // Check if observed settings have changed. Since source and destination
1183 // are both user defaults, this is required to avoid cycling back here.
1184 NSString* newHash = TestingPoliciesHash();
1185 if (![newHash isEqualToString:hash]) {
1186 hash = newHash;
David Jean5ca263c2021-08-18 09:19:301187
David Jeanbc0fae32021-08-25 10:31:391188 // Publish update.
1189 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1190 NSMutableDictionary* testing_policies =
Vincent Boisselleed0e6f1a2021-11-09 06:47:341191 CreateExperimentalTestingPolicies();
David Jeanbc0fae32021-08-25 10:31:391192 NSDictionary* registration_defaults =
1193 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1194 [defaults registerDefaults:registration_defaults];
1195 }
David Jeane83ed652021-08-25 14:52:481196
1197 pending_check.store(false);
David Jeanbc0fae32021-08-25 10:31:391198 });
David Jean5ca263c2021-08-18 09:19:301199 };
1200
1201 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1202 [center addObserverForName:NSUserDefaultsDidChangeNotification
1203 object:nil
David Jeanbc0fae32021-08-25 10:31:391204 queue:nil
David Jean5ca263c2021-08-18 09:19:301205 usingBlock:monitor];
1206}
1207
sdefresne14900ee2015-11-27 14:43:211208void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1209 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181210 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111211 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531212 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211213}
1214
jkrcalbf073372016-07-29 07:21:311215std::vector<std::string> RegisterAllFeatureVariationParameters(
1216 flags_ui::FlagsStorage* flags_storage,
1217 base::FeatureList* feature_list) {
Justin Cohen2e2adb52019-10-25 17:00:021218 // Occasionally DCHECK crashes on canary can be very distuptive. An
1219 // experimental flag was added to aid in temporarily disabling this for
1220 // canary testers.
1221#if defined(DCHECK_IS_CONFIGURABLE)
1222 if (experimental_flags::AreDCHECKCrashesDisabled()) {
1223 std::vector<base::FeatureList::FeatureOverrideInfo> overrides;
1224 overrides.push_back(
1225 {std::cref(base::kDCheckIsFatalFeature),
1226 base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE});
1227 feature_list->RegisterExtraFeatureOverrides(std::move(overrides));
1228 }
1229#endif // defined(DCHECK_IS_CONFIGURABLE)
1230
Sylvain Defresne8327a2f2019-01-17 14:19:181231 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1232 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311233}
1234
sdefresne14900ee2015-11-27 14:43:211235void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1236 flags_ui::FlagAccess access,
Morten Stenshorne7afa5802021-07-15 10:04:431237 base::Value::ListStorage& supported_entries,
1238 base::Value::ListStorage& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181239 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211240 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511241 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211242}
1243
1244void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1245 const std::string& internal_name,
1246 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181247 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1248 enable);
sdefresne14900ee2015-11-27 14:43:211249}
1250
1251void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181252 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211253}
1254
1255namespace testing {
1256
Elly Fong-Jones323ab1092021-08-23 22:36:311257base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1258 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531259 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211260}
1261
1262} // namespace testing