blob: 987be0848b63f73cf064e5219c9a60d56f38a693 [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"
Peter Boström3f798572022-07-26 23:44:3618#import "base/debug/debugging_buildflags.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Sylvain Defresne8327a2f2019-01-17 14:19:1820#include "base/no_destructor.h"
sdefresne14900ee2015-11-27 14:43:2121#include "base/strings/stringprintf.h"
22#include "base/strings/sys_string_conversions.h"
Sebastien Marchand75a7cdf2018-11-13 23:47:0323#include "base/system/sys_info.h"
Mohamad Ahmadic4df81f2017-12-20 04:41:5924#include "components/autofill/core/common/autofill_features.h"
Jared Sauld998539f2019-03-19 15:11:1725#include "components/autofill/core/common/autofill_payments_features.h"
Moe Ahmadid6d5d172018-06-20 17:20:2326#include "components/autofill/core/common/autofill_switches.h"
Olivier Robin3d60411622018-02-23 10:03:2227#include "components/autofill/ios/browser/autofill_switches.h"
Jesse McKenna85c1a59f2021-05-05 19:08:3028#include "components/breadcrumbs/core/features.h"
Matt Jones125dfb42022-02-11 17:23:4229#include "components/commerce/core/commerce_feature_list.h"
30#include "components/commerce/core/flag_descriptions.h"
Robbie Gibson5e3436632020-04-27 15:48:0431#include "components/content_settings/core/common/features.h"
sdefresne14900ee2015-11-27 14:43:2132#include "components/dom_distiller/core/dom_distiller_switches.h"
Guillaume Jenkins4e6ac1e2020-11-11 16:57:4033#include "components/enterprise/browser/enterprise_switches.h"
Tommy Nyquistc1d6dea12017-07-26 20:37:2334#include "components/feature_engagement/public/feature_constants.h"
35#include "components/feature_engagement/public/feature_list.h"
edchind847c0962021-03-03 18:17:0536#include "components/feed/feed_feature_list.h"
sdefresne14900ee2015-11-27 14:43:2137#include "components/flags_ui/feature_entry.h"
38#include "components/flags_ui/feature_entry_macros.h"
39#include "components/flags_ui/flags_storage.h"
40#include "components/flags_ui/flags_ui_switches.h"
Tanja Gornakb0985dd2018-10-11 17:24:4041#include "components/invalidation/impl/invalidation_switches.h"
noyau4cfb1332016-10-25 17:05:4242#include "components/ntp_tiles/switches.h"
Justin Donnelly33d712e2017-08-23 21:32:5143#include "components/omnibox/browser/omnibox_field_trial.h"
Tomasz Wiszkowskid938a1112019-03-06 18:01:5744#include "components/omnibox/common/omnibox_features.h"
Raj T3898f032021-08-19 23:51:2745#include "components/optimization_guide/core/optimization_guide_features.h"
Ioana Pandeled14ce9e2017-11-28 14:41:4646#include "components/password_manager/core/common/password_manager_features.h"
mathp9b4c11d2017-07-06 20:24:1347#include "components/payments/core/features.h"
Igor Ruvinova43a66dc2022-06-09 21:57:4548#include "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4049#import "components/policy/core/common/policy_loader_ios_constants.h"
50#include "components/policy/policy_constants.h"
Joemer Ramos34175732022-02-14 18:59:1651#include "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2552#import "components/send_tab_to_self/features.h"
Tommy Martino0caf3362021-01-13 20:29:5853#include "components/shared_highlighting/core/common/shared_highlighting_features.h"
Valeriya Sinevicha79dc612018-09-25 14:49:0954#include "components/signin/core/browser/account_reconcilor.h"
Jérôme Lebelc374fdd2019-09-27 10:36:4855#include "components/signin/ios/browser/features.h"
Colin Blundell3517170e2019-07-11 08:16:3456#include "components/signin/public/base/signin_switches.h"
sdefresne36579782016-02-05 11:08:2557#include "components/strings/grit/components_strings.h"
Victor Hugo Vianna Silvaa48aa01c2022-02-09 20:38:2358#include "components/sync/base/command_line_switches.h"
59#include "components/sync/base/features.h"
Ewann570a6302021-08-17 07:22:4260#include "components/sync/base/pref_names.h"
Moe Ahmadie4cce1f2018-12-18 23:48:0161#include "components/translate/core/browser/translate_prefs.h"
Olivier Robinffe767c2022-04-21 13:13:2362#include "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3463#import "ios/chrome/app/background_mode_buildflags.h"
Sylvain Defresneae6987e2018-03-01 13:21:4064#include "ios/chrome/browser/browsing_data/browsing_data_features.h"
sdefresne14900ee2015-11-27 14:43:2165#include "ios/chrome/browser/chrome_switches.h"
Eugene But2823dc7e2020-07-21 18:10:3766#include "ios/chrome/browser/crash_report/features.h"
Nazerke21bdc45a2019-07-11 09:02:0567#include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Ed Chin100660bf2022-04-26 16:59:1368#import "ios/chrome/browser/ntp/features.h"
Vincent Boissellead6cbe22022-07-04 19:32:3969#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Vincent Boisselle19200bc2021-09-01 17:58:2570#include "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2071#import "ios/chrome/browser/promos_manager/features.h"
Sylvain Defresne9c107082020-10-27 16:39:1372#include "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3473#import "ios/chrome/browser/sessions/session_features.h"
Gauthier Ambard33e03302019-02-21 13:28:5874#include "ios/chrome/browser/system_flags.h"
Zhixiang Teoh40027a22022-07-28 03:24:3475#import "ios/chrome/browser/text_selection/text_selection_util.h"
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:3676#include "ios/chrome/browser/ui/autofill/features.h"
Louis Romeroac04f786a2022-04-19 09:39:3077#include "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2178#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5079#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2480#import "ios/chrome/browser/ui/download/features.h"
Aliona DANGLAebfd7d022021-10-08 14:15:4581#include "ios/chrome/browser/ui/first_run/fre_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3582#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
adamta273568472020-12-04 23:53:5783#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0184#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Robbie Gibson686c56732021-10-04 17:11:4585#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Gauthier Ambard30ad9ca2022-06-09 14:15:2686#import "ios/chrome/browser/ui/popup_menu/public/features.h"
gogerald0ff29e52021-02-03 18:56:1987#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2888#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Justin Cohen2d81c582018-01-22 14:46:4489#include "ios/chrome/browser/ui/ui_feature_flags.h"
Yi Su392b3032018-06-05 07:26:4790#include "ios/chrome/browser/web/features.h"
sdefresne14900ee2015-11-27 14:43:2191#include "ios/chrome/grit/ios_strings.h"
Mustafa Emre Acer4de8863a2022-05-03 22:17:0192#include "ios/components/security_interstitials/https_only_mode/feature.h"
Sylvain Defresne559ce5f2022-01-13 17:14:5893#include "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
Eugene But61818bc2019-04-15 21:04:0794#include "ios/web/common/features.h"
Eugene Bute79f2742019-07-26 17:07:2295#include "ios/web/common/user_agent.h"
Eugene Butb1416232019-07-22 17:31:5896#include "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:2197
Sylvain Defresne9c107082020-10-27 16:39:1398#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
99#include "ios/chrome/browser/screen_time/features.h"
100#endif
101
sdefresne14900ee2015-11-27 14:43:21102#if !defined(OFFICIAL_BUILD)
103#include "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22104#endif
stkhapuginc1be1792016-12-13 14:30:53105
106#if !defined(__has_feature) || !__has_feature(objc_arc)
107#error "This file requires ARC support."
108#endif
sdefresne14900ee2015-11-27 14:43:21109
elawrence816f6790e2017-06-16 18:19:28110using flags_ui::FeatureEntry;
111
sdefresne14900ee2015-11-27 14:43:21112namespace {
Emily Starkbafa9062017-12-27 15:22:46113
Olivier Robin3d60411622018-02-23 10:03:22114const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
115 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
116 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
117 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
118 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
119 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
120 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
121 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
122 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
123 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
124};
125
Nohemi Fernandez222d6d42020-09-30 20:35:57126const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"},
129 {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"},
130 {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"},
131};
132
Nohemi Fernandezc00842a2021-07-26 11:47:34133const FeatureEntry::Choice
134 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
135 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
136 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
137 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
138 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
139};
140
Stepan Khapugincc4e9842019-01-23 13:38:13141const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
142 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
143const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
144 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
155
156const FeatureEntry::FeatureVariation
157 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
158 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53159 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13160 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53161 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13162 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13172
Stepan Khapuginbac467e2022-05-06 21:11:54173const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
174 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
175const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
176 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
179
180const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
181 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
182 nullptr},
183 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
184 nullptr},
185 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
186 nullptr},
187};
188
Christian Xucf26d562022-07-06 09:28:36189const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
190 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
191const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
192 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
195
196const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
197 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
198 nullptr},
199 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
200 nullptr},
201 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
202 nullptr},
203};
204
Caitlin Fischer37e01232019-05-24 13:05:45205const FeatureEntry::FeatureParam
206 kAutofillUseMobileLabelDisambiguationShowAll[] = {
207 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
208 autofill::features::
209 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
210const FeatureEntry::FeatureParam
211 kAutofillUseMobileLabelDisambiguationShowOne[] = {
212 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
213 autofill::features::
214 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
215
216const FeatureEntry::FeatureVariation
217 kAutofillUseMobileLabelDisambiguationVariations[] = {
218 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53219 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45220 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53221 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45222
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10223const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59224 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
225 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
226const FeatureEntry::FeatureVariation
227 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
228 {"Remind me later",
229 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53230 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59231 nullptr}};
232
gogeralddb0d8ae2020-11-13 03:56:58233const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
234 {kDiscoverFeedIsNativeUIEnabled, "true"}};
235const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
236 {"Native UI", kDiscoverFeedInNtpEnableNativeUI,
Daniel Cheng1f047a82022-02-26 10:04:53237 std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
gogeralddb0d8ae2020-11-13 03:56:58238
Sergio Collazos9fcc6ed2021-10-06 00:58:03239const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = {
240 {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}};
241const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = {
242 {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}};
243const FeatureEntry::FeatureVariation
244 kEnableDiscoverFeedStaticResourceServingVariations[] = {
245 {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53246 std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03247 {"Preload Templates", kDiscoverFeedSRSPreloadTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53248 std::size(kDiscoverFeedSRSPreloadTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03249};
250
Mohammad Refaatab6bee62022-05-16 16:31:15251const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47252 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
253 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15254const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47255 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
256 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
257
Mohammad Refaatab6bee62022-05-16 16:31:15258const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
259 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
260 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
261 {"Compact", kDiscoverFeedTopSyncPromoCompact,
262 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
263
Robbie Gibson46351032022-03-31 19:46:23264const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
265 {kIOSOmniboxUpdatedPopupUIVariationName,
266 kIOSOmniboxUpdatedPopupUIVariation1}};
267const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
268 {kIOSOmniboxUpdatedPopupUIVariationName,
269 kIOSOmniboxUpdatedPopupUIVariation2}};
270const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
271 {"Version 1", kiOSOmniboxUpdatedPopupUIVersion1,
272 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
273 {"Version 2", kiOSOmniboxUpdatedPopupUIVersion2,
274 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}};
275
gogerald53c6e7a2021-04-15 22:07:35276const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08277 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35278 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
279const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08280 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35281 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
282const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08283 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35284 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
285const FeatureEntry::FeatureParam
286 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
287 {kStartSurfaceShrinkLogoParam, "true"},
288 {kStartSurfaceReturnToRecentTabParam, "true"},
289 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
290const FeatureEntry::FeatureParam
291 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
292 {kStartSurfaceHideShortcutsParam, "true"},
293 {kStartSurfaceReturnToRecentTabParam, "true"},
294 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
295const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08296 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35297 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
298const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
299 {kStartSurfaceHideShortcutsParam, "true"},
300 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
301const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08302 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35303 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
304const FeatureEntry::FeatureParam
305 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
306 {kStartSurfaceShrinkLogoParam, "true"},
307 {kStartSurfaceReturnToRecentTabParam, "true"},
308 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
309const FeatureEntry::FeatureParam
310 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
311 {kStartSurfaceHideShortcutsParam, "true"},
312 {kStartSurfaceReturnToRecentTabParam, "true"},
313 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08314
gogerald0e39e3aa2021-02-10 18:41:23315const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35316 {"10s:Show Return to Recent Tab tile",
317 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53318 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35319 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53320 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35321 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53322 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35323 {"10s:Shrink Logo and show Return to Recent Tab tile",
324 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53325 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35326 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
327 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53328 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35329 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53330 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35331 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53332 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35333 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53334 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35335 {"1h:Shrink Logo and show Return to Recent Tab tile",
336 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53337 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35338 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
339 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53340 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08341};
gogerald0e39e3aa2021-02-10 18:41:23342
Ed Chin91e44992022-07-27 13:42:34343#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04344// Feed Background Refresh Feature Params
Ed Chin59f617b2022-07-19 22:12:04345const FeatureEntry::FeatureParam kOneHourIntervalOnce[] = {
346 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
347 {kEnableRecurringBackgroundRefreshSchedule, "false"},
348 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
349const FeatureEntry::FeatureParam kFourHourIntervalOnce[] = {
350 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
351 {kEnableRecurringBackgroundRefreshSchedule, "false"},
352 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
353const FeatureEntry::FeatureParam kOneHourIntervalRecurring[] = {
354 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
355 {kEnableRecurringBackgroundRefreshSchedule, "true"},
356 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
357const FeatureEntry::FeatureParam kFourHourIntervalRecurring[] = {
358 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
359 {kEnableRecurringBackgroundRefreshSchedule, "true"},
360 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
361const FeatureEntry::FeatureParam kServerDrivenOnce[] = {
362 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
363 {kEnableRecurringBackgroundRefreshSchedule, "false"},
364 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
365const FeatureEntry::FeatureParam kServerDrivenRecurring[] = {
366 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
367 {kEnableRecurringBackgroundRefreshSchedule, "true"},
368 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
369
370// Feed Background Refresh Feature Variations
Ed Chin59f617b2022-07-19 22:12:04371const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
372 {"1hr Interval Once", kOneHourIntervalOnce, std::size(kOneHourIntervalOnce),
373 nullptr},
374 {"4hr Interval Once", kFourHourIntervalOnce,
375 std::size(kFourHourIntervalOnce), nullptr},
376 {"1hr Interval Recurring", kOneHourIntervalRecurring,
377 std::size(kOneHourIntervalRecurring), nullptr},
378 {"4hr Interval Recurring", kFourHourIntervalRecurring,
379 std::size(kFourHourIntervalRecurring), nullptr},
380 {"Server Driven Once", kServerDrivenOnce, std::size(kServerDrivenOnce),
381 nullptr},
382 {"Server Driven Recurring", kServerDrivenRecurring,
383 std::size(kServerDrivenRecurring), nullptr},
384};
Ed Chin91e44992022-07-27 13:42:34385#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04386
ginnnnnnny46435132022-06-01 16:06:04387const FeatureEntry::FeatureParam kFREDefaultBrowserPromoDefaultDelay[] = {
388 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoDefaultDelayParam}};
389const FeatureEntry::FeatureParam kFREDefaultBrowserPromoFirstRunOnly[] = {
390 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoFirstRunOnlyParam}};
391const FeatureEntry::FeatureParam kFREDefaultBrowserPromoShortDelay[] = {
392 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoShortDelayParam}};
393const FeatureEntry::FeatureVariation kFREDefaultBrowserPromoVariations[] = {
Aliona DANGLA8fae66f02021-10-06 15:47:11394 {"Wait 14 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04395 kFREDefaultBrowserPromoDefaultDelay,
396 std::size(kFREDefaultBrowserPromoDefaultDelay), nullptr},
397 {"FRE default browser promo only", kFREDefaultBrowserPromoFirstRunOnly,
398 std::size(kFREDefaultBrowserPromoFirstRunOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11399 {"Wait 3 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04400 kFREDefaultBrowserPromoShortDelay,
401 std::size(kFREDefaultBrowserPromoShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11402};
403
Chris Luc9a5cb12022-07-20 16:11:39404const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
405 {kTrendingQueriesHideShortcutsParam, "false"},
406 {kTrendingQueriesDisabledFeedParam, "false"},
407 {kTrendingQueriesSignedOutParam, "false"}};
408const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
409 {{kTrendingQueriesHideShortcutsParam, "true"},
410 {kTrendingQueriesDisabledFeedParam, "false"},
411 {kTrendingQueriesSignedOutParam, "false"}};
412const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
413 {kTrendingQueriesHideShortcutsParam, "false"},
414 {kTrendingQueriesDisabledFeedParam, "true"},
415 {kTrendingQueriesSignedOutParam, "false"}};
416const FeatureEntry::FeatureParam kTrendingQueriesEnableSignedOut[] = {
417 {kTrendingQueriesHideShortcutsParam, "true"},
418 {kTrendingQueriesDisabledFeedParam, "false"},
419 {kTrendingQueriesSignedOutParam, "true"}};
Chris Luecd575f2022-08-05 23:23:06420const FeatureEntry::FeatureParam
421 kTrendingQueriesEnableNeverShowHideShortcuts[] = {
422 {kTrendingQueriesHideShortcutsParam, "true"},
423 {kTrendingQueriesDisabledFeedParam, "false"},
424 {kTrendingQueriesSignedOutParam, "false"},
425 {kTrendingQueriesNeverShowModuleParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39426
427const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
428 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
429 std::size(kTrendingQueriesEnableAllUsers), nullptr},
430 {"Enabled All Users Hide Shortcuts",
431 kTrendingQueriesEnableAllUsersHideShortcuts,
432 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
433 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
434 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
435 {"Enabled Signed Out", kTrendingQueriesEnableSignedOut,
436 std::size(kTrendingQueriesEnableSignedOut), nullptr},
Chris Luecd575f2022-08-05 23:23:06437 {"Enabled Never Show and Hide Shortcuts",
438 kTrendingQueriesEnableNeverShowHideShortcuts,
439 std::size(kTrendingQueriesEnableNeverShowHideShortcuts), nullptr},
440
Chris Luc9a5cb12022-07-20 16:11:39441};
442
jlebel041fc1c2022-03-04 12:53:30443const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = {
444 {kNewMobileIdentityConsistencyFREParam,
445 kNewMobileIdentityConsistencyFREParamUMADialog}};
446const FeatureEntry::FeatureParam kNewMICEFREWithThreeSteps[] = {
447 {kNewMobileIdentityConsistencyFREParam,
448 kNewMobileIdentityConsistencyFREParamThreeSteps}};
449const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
450 {kNewMobileIdentityConsistencyFREParam,
451 kNewMobileIdentityConsistencyFREParamTwoSteps}};
452const FeatureEntry::FeatureVariation
453 kNewMobileIdentityConsistencyFREVariations[] = {
454 {"New FRE with UMA dialog", kNewMICEFREWithUMADialog,
455 std::size(kNewMICEFREWithUMADialog), nullptr},
456 {"new FRE with 3 steps", kNewMICEFREWithThreeSteps,
457 std::size(kNewMICEFREWithThreeSteps), nullptr},
458 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
459 std::size(kNewMICEFREWithTwoSteps), nullptr}};
460
Louis Romero023cc5052022-04-08 23:29:39461const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
462 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01463const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
464 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
465const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
466 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
467const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
468 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
469const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39470 {"Target Highlight", kBubbleRichIPHTargetHighlight,
471 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01472 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
473 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
474 {"Dismissal and rich content", kBubbleRichIPHRich,
475 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39476 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01477 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
478};
479
Christian Xubdedabec2022-07-04 10:00:13480const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueIconCapsule[] = {
481 {kOmniboxPasteButtonParameterName,
482 kOmniboxPasteButtonParameterBlueIconCapsule}};
483const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueFullCapsule[] = {
484 {kOmniboxPasteButtonParameterName,
485 kOmniboxPasteButtonParameterBlueFullCapsule}};
486const FeatureEntry::FeatureVariation kOmniboxPasteButtonVariations[] = {
487 {"Icon only", kOmniboxPasteButtonBlueIconCapsule,
488 std::size(kOmniboxPasteButtonBlueIconCapsule), nullptr},
489 {"Icon and text", kOmniboxPasteButtonBlueFullCapsule,
490 std::size(kOmniboxPasteButtonBlueFullCapsule), nullptr},
491};
492
Gauthier Ambard30ad9ca2022-06-09 14:15:26493const FeatureEntry::FeatureParam kPopupMenuBookmarkStringAddABookmark[] = {
494 {kPopupMenuBookmarkStringParamName,
495 kPopupMenuBookmarkStringParamAddABookmark}};
496const FeatureEntry::FeatureParam kPopupMenuBookmarkStringAddToBookmarks[] = {
497 {kPopupMenuBookmarkStringParamName,
498 kPopupMenuBookmarkStringParamAddToBookmarks}};
499const FeatureEntry::FeatureParam kPopupMenuBookmarkStringBookmarkThisPage[] = {
500 {kPopupMenuBookmarkStringParamName,
501 kPopupMenuBookmarkStringParamBookmarkThisPage}};
502
503const FeatureEntry::FeatureVariation kPopupMenuBookmarkStringVarations[] = {
504 {"(Add A Bookmark)", kPopupMenuBookmarkStringAddABookmark,
505 std::size(kPopupMenuBookmarkStringAddABookmark), nullptr},
506 {"(Add To Bookmarks)", kPopupMenuBookmarkStringAddToBookmarks,
507 std::size(kPopupMenuBookmarkStringAddToBookmarks), nullptr},
508 {"(Bookmark This Page)", kPopupMenuBookmarkStringBookmarkThisPage,
509 std::size(kPopupMenuBookmarkStringBookmarkThisPage), nullptr}};
510
Igor Ruvinov44fed9f2022-06-10 22:51:42511const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
512const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
513 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
514 nullptr}};
515
Cooper Knaak1e026562017-07-26 05:22:28516// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21517// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28518// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
519// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21520// macro for this type supplying the command line to the macro.
521// . MULTI_VALUE: a list of choices, the first of which should correspond to a
522// deactivated state for this lab (i.e. no command line option). To specify
523// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
524// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28525// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
526// either enabled, disabled, or uses the default value of the associated
527// base::Feature instance. To specify this type of entry use the macro
528// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
529// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
530// base::Feature instance. Choices corresponding to the default state, a
531// universally enabled state, and a universally disabled state are
532// automatically included. To specify this type of entry use the macro
533// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
534// the array of choices.
535//
sdefresne14900ee2015-11-27 14:43:21536// See the documentation of FeatureEntry for details on the fields.
537//
538// When adding a new choice, add it to the end of the list.
539const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28540 {"in-product-help-demo-mode-choice",
541 flag_descriptions::kInProductHelpDemoModeName,
542 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
543 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23544 feature_engagement::kIPHDemoMode,
545 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09546 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22547 {"enable-autofill-credit-card-upload",
548 flag_descriptions::kAutofillCreditCardUploadName,
549 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24550 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Tina Wang41d431c2021-06-21 21:04:13551 {"enable-discover-feed-preview",
552 flag_descriptions::kEnableDiscoverFeedPreviewName,
553 flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos,
554 FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)},
Moe Ahmadid6d5d172018-06-20 17:20:23555 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
556 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
557 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51558 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23559 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
560 {"wallet-service-use-sandbox",
561 flag_descriptions::kWalletServiceUseSandboxName,
562 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
563 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
564 autofill::switches::kWalletServiceUseSandbox,
565 "1",
566 autofill::switches::kWalletServiceUseSandbox,
567 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59568 {"show-autofill-type-predictions",
569 flag_descriptions::kShowAutofillTypePredictionsName,
570 flag_descriptions::kShowAutofillTypePredictionsDescription,
571 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46572 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22573 {"autofill-ios-delay-between-fields",
574 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
575 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
576 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20577 {"fullscreen-promos-manager",
578 flag_descriptions::kFullscreenPromosManagerName,
579 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
580 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Kurt Horimotodc33af32018-05-01 01:39:14581 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53582 flag_descriptions::kFullscreenSmoothScrollingName,
583 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
584 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06585 {"webpage-default-zoom-from-dynamic-type",
586 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
587 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
588 flags_ui::kOsIos,
589 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56590 {"webpage-alternative-text-zoom",
591 flag_descriptions::kWebPageAlternativeTextZoomName,
592 flag_descriptions::kWebPageAlternativeTextZoomDescription,
593 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34594 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
595 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
596 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28597 {"toolbar-container", flag_descriptions::kToolbarContainerName,
598 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
599 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13600 {"omnibox-ui-max-autocomplete-matches",
601 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
602 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
603 flags_ui::kOsIos,
604 FEATURE_WITH_PARAMS_VALUE_TYPE(
605 omnibox::kUIExperimentMaxAutocompleteMatches,
606 kOmniboxUIMaxAutocompleteMatchesVariations,
607 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35608 {"omnibox-local-history-zero-suggest-beyond-ntp",
609 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
610 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
611 flags_ui::kOsIos,
612 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54613 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
614 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
615 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
616 kOmniboxMaxZPSMatchesVariations,
617 "OmniboxMaxZPSVariations")},
Peter Boström3f798572022-07-26 23:44:36618#if BUILDFLAG(DCHECK_IS_CONFIGURABLE)
Justin Cohen20b6f072019-01-16 01:38:50619 {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName,
620 flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos,
621 FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)},
Peter Boström3f798572022-07-26 23:44:36622#endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE)
Caitlin Fischer43edd90a2019-05-01 13:24:30623 {"autofill-use-mobile-label-disambiguation",
624 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
625 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
626 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45627 FEATURE_WITH_PARAMS_VALUE_TYPE(
628 autofill::features::kAutofillUseMobileLabelDisambiguation,
629 kAutofillUseMobileLabelDisambiguationVariations,
630 "AutofillUseMobileLabelDisambiguation")},
Olivier Robin43814bb2021-06-22 15:25:45631 {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName,
632 flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos,
633 FEATURE_VALUE_TYPE(kMetrickitCrashReport)},
Mike Doughertyb6c770d2019-09-13 22:56:46634 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
635 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30636 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Eugene But2823dc7e2020-07-21 18:10:37637 {"ios-synthetic-crash-reports",
638 flag_descriptions::kSyntheticCrashReportsForUteName,
639 flag_descriptions::kSyntheticCrashReportsForUteDescription,
640 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)},
Jérôme Lebelc374fdd2019-09-27 10:36:48641 {"force-startup-signin-promo",
642 flag_descriptions::kForceStartupSigninPromoName,
643 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29644 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22645 {"restore-session-from-cache",
646 flag_descriptions::kRestoreSessionFromCacheName,
647 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49648 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59649 {"autofill-save-card-dismiss-on-navigation",
650 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
651 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
652 flags_ui::kOsIos,
653 FEATURE_VALUE_TYPE(
654 autofill::features::kAutofillSaveCardDismissOnNavigation)},
sczs37d9c132020-07-18 06:06:33655 {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
adamta22a4d502020-05-21 03:12:21656 flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
gogeralddb0d8ae2020-11-13 03:56:58657 FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
658 kDiscoverFeedInNtpVariations,
659 "IOSDiscoverFeed")},
Roberto Mourab87b9722020-06-17 17:12:09660 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
661 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
662 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41663 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
664 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
665 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Veronique Nguyen6593c762021-11-30 17:28:56666 {"enable-fre-ui-module-ios-with-options",
667 flag_descriptions::kEnableFREUIModuleIOSName,
Tina Wanga252ca42021-04-01 17:14:23668 flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos,
ginnnnnnny429b5522022-05-05 03:50:06669 FEATURE_VALUE_TYPE(kEnableFREUIModuleIOS)},
jlebel041fc1c2022-03-04 12:53:30670 {"new-mobile-identity-consistency-fre",
671 flag_descriptions::kNewMobileIdentityConsistencyFREName,
672 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
673 flags_ui::kOsIos,
674 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
675 kNewMobileIdentityConsistencyFREVariations,
ginnnnnnny46435132022-06-01 16:06:04676 kIOSMICeAndDefaultBrowserTrialName)},
Sylvain Defresne9c107082020-10-27 16:39:13677#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45678 {"screen-time-integration-ios",
679 flag_descriptions::kScreenTimeIntegrationName,
680 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
681 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13682#endif
Nazerke3e993f72020-09-21 13:00:06683 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
684 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
685 FEATURE_VALUE_TYPE(kModernTabStrip)},
Nohemi Fernandez222d6d42020-09-30 20:35:57686 {"minutes-delay-to-restore-gaia-cookies-if-deleted",
687 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName,
688 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription,
689 flags_ui::kOsIos,
690 MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)},
Eugene Butf869bff2020-12-10 01:16:55691 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
692 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
693 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14694 {"default-browser-fullscreen-promo-experiment",
695 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
696 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
697 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59698 FEATURE_WITH_PARAMS_VALUE_TYPE(
699 kDefaultBrowserFullscreenPromoExperiment,
700 kDefaultBrowserFullscreenPromoExperimentVariations,
701 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11702 {"ios-shared-highlighting-color-change",
703 flag_descriptions::kIOSSharedHighlightingColorChangeName,
704 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07705 flags_ui::kOsIos,
706 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34707 {"ios-shared-highlighting-v2",
708 flag_descriptions::kIOSSharedHighlightingV2Name,
709 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
710 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45711 {"omnibox-new-textfield-implementation",
712 flag_descriptions::kOmniboxNewImplementationName,
713 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
714 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin422f08d2022-02-18 16:19:44715 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
716 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23717 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
718 kiOSOmniboxUpdatedPopupUIVariations,
Stepan Khapugina45baed2022-05-13 19:15:43719 "IOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19720 {"start-surface", flag_descriptions::kStartSurfaceName,
721 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23722 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
723 kStartSurfaceVariations,
724 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28725 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
726 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
727 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42728 {"autofill-address-verification-in-save-prompt",
729 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
730 flag_descriptions::
731 kEnableAutofillAddressSavePromptAddressVerificationDescription,
732 flags_ui::kOsIos,
733 FEATURE_VALUE_TYPE(
734 autofill::features::
735 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Vidhan Jaina65741552021-03-09 17:18:27736 {"autofill-address-save-prompt",
737 flag_descriptions::kEnableAutofillAddressSavePromptName,
738 flag_descriptions::kEnableAutofillAddressSavePromptDescription,
739 flags_ui::kOsIos,
740 FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)},
Viktor Semeniuk68e794a2021-03-24 10:23:25741 {"filling-across-affiliated-websites",
742 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
743 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
744 flags_ui::kOsIos,
745 FEATURE_VALUE_TYPE(
746 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Jared Sauld47c2b72021-03-25 22:47:31747 {"autofill-parse-merchant-promo-code-fields",
748 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName,
749 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription,
750 flags_ui::kOsIos,
751 FEATURE_VALUE_TYPE(
752 autofill::features::kAutofillParseMerchantPromoCodeFields)},
edchin257cea2f2021-04-07 13:07:13753 {"interest-feed-v2-clicks-and-views-cond-upload",
754 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
755 flag_descriptions::
756 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
757 flags_ui::kOsIos,
758 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Side Yilmaz0e6c15a2021-04-26 12:55:09759 {"incognito-brand-consistency-for-ios",
760 flag_descriptions::kIncognitoBrandConsistencyForIOSName,
761 flag_descriptions::kIncognitoBrandConsistencyForIOSDescription,
762 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIncognitoBrandConsistencyForIOS)},
Side Yilmaz6c53f7102021-09-07 13:26:19763 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
764 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
765 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33766 {"update-history-entry-points-in-incognito",
767 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
768 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
769 flags_ui::kOsIos,
770 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
jlebeld95434d652021-06-22 10:32:48771 {"sync-trusted-vault-passphrase-ios-rpc",
772 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName,
773 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription,
774 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51775 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)},
Mikel Astiz850b0fe2021-06-16 09:47:27776 {"sync-trusted-vault-passphrase-promo",
777 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
778 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
779 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51780 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27781 {"sync-trusted-vault-passphrase-recovery",
782 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
783 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
784 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51785 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34786 {"wait-threshold-seconds-for-capabilities-api",
787 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
788 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
789 flags_ui::kOsIos,
790 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23791 {"autofill-fill-merchant-promo-code-fields",
792 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
793 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
794 flags_ui::kOsIos,
795 FEATURE_VALUE_TYPE(
796 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Gauthier Ambard14d3a262021-08-09 18:09:23797 {"default-wkwebview-context-menu",
798 flag_descriptions::kDefaultWebViewContextMenuName,
799 flag_descriptions::kDefaultWebViewContextMenuDescription, flags_ui::kOsIos,
800 FEATURE_VALUE_TYPE(web::features::kDefaultWebViewContextMenu)},
Sylvain Defresnedff67e42021-09-24 09:43:03801 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
802 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
803 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsonfe748e52022-05-09 18:20:46804 {"new-overflow-menu-settings-action",
805 flag_descriptions::kNewOverflowMenuSettingsActionName,
Robbie Gibsone2ad5632022-05-16 20:46:10806 flag_descriptions::kNewOverflowMenuSettingsActionDescription,
807 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuSettingsAction)},
808 {"new-overflow-menu-simple-destination-icons",
809 flag_descriptions::kNewOverflowMenuSimpleDestinationIconsName,
810 flag_descriptions::kNewOverflowMenuSimpleDestinationIconsDescription,
811 flags_ui::kOsIos,
812 FEATURE_VALUE_TYPE(kNewOverflowMenuSimpleDestinationIcons)},
Robbie Gibson640bccb32022-05-10 18:43:35813 {"new-overflow-menu-cbd-action",
814 flag_descriptions::kNewOverflowMenuCBDActionName,
815 flag_descriptions::kNewOverflowMenuCBDActionDescription, flags_ui::kOsIos,
816 FEATURE_VALUE_TYPE(kNewOverflowMenuCBDAction)},
Evan Bernstein0a85f332021-09-29 19:07:24817 {"use-lens-to-search-for-image",
818 flag_descriptions::kUseLensToSearchForImageName,
819 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44820 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40821 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23822 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
823 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40824 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23825 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03826 {"enable-discover-feed-static-resource-serving",
827 flag_descriptions::kEnableDiscoverFeedStaticResourceServingName,
828 flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription,
829 flags_ui::kOsIos,
830 FEATURE_WITH_PARAMS_VALUE_TYPE(
831 kEnableDiscoverFeedStaticResourceServing,
832 kEnableDiscoverFeedStaticResourceServingVariations,
833 "IOSDiscoverFeedStaticResourceServing")},
834 {"enable-disco-feed-endpoint",
835 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
836 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
837 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11838 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15839 {"enable-discover-feed-top-sync-promo",
840 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
841 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
842 flags_ui::kOsIos,
843 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
844 kDiscoverFeedTopSyncPromoVariations,
845 "EnableDiscoverFeedTopSyncPromo")},
Aliona DANGLA8fae66f02021-10-06 15:47:11846 {"enable-fre-default-browser-screen-testing",
ginnnnnnny46435132022-06-01 16:06:04847 flag_descriptions::kEnableFREDefaultBrowserPromoScreenName,
848 flag_descriptions::kEnableFREDefaultBrowserPromoScreenDescription,
Aliona DANGLA8fae66f02021-10-06 15:47:11849 flags_ui::kOsIos,
ginnnnnnny46435132022-06-01 16:06:04850 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserPromoScreen,
851 kFREDefaultBrowserPromoVariations,
852 kIOSMICeAndDefaultBrowserTrialName)},
edchin1313f2b2021-10-11 08:08:47853 {"enable-discover-feed-shorter-cache",
854 flag_descriptions::kEnableDiscoverFeedShorterCacheName,
855 flag_descriptions::kEnableDiscoverFeedShorterCacheDescription,
856 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedShorterCache)},
Tommy Martino7393d762021-10-12 17:59:28857 {"shared-highlighting-amp",
858 flag_descriptions::kIOSSharedHighlightingAmpName,
859 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
860 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28861 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42862 commerce::flag_descriptions::kCommercePriceTrackingName,
863 commerce::flag_descriptions::kCommercePriceTrackingDescription,
864 flags_ui::kOsIos,
865 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
866 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15867 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06868 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
869 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
870 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54871 {"ntp-view-hierarchy-repair",
872 flag_descriptions::kNTPViewHierarchyRepairName,
873 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
874 FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26875 {"synthesized-restore-session",
876 flag_descriptions::kSynthesizedRestoreSessionName,
877 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Chris Lu4723b822021-11-05 21:47:44879 {"remove-extra-ntps", flag_descriptions::kRemoveExcessNTPsExperimentName,
880 flag_descriptions::kRemoveExcessNTPsExperimentDescription,
Sylvain Defresne1619dd002021-11-06 10:09:48881 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kRemoveExcessNTPs)},
ginny huang1f1755c2021-11-11 23:38:23882 {"enable-shortened-password-auto-fill-instruction",
883 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionName,
884 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionDescription,
885 flags_ui::kOsIos,
886 FEATURE_VALUE_TYPE(kEnableShortenedPasswordAutoFillInstruction)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41887 {"enable-password-manager-branding-update",
888 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
889 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
890 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19891 FEATURE_VALUE_TYPE(
892 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
Gauthier Ambard1d326e22021-12-16 10:57:53893 {"default-mode-ua", flag_descriptions::kAddSettingForDefaultPageModeName,
894 flag_descriptions::kAddSettingForDefaultPageModeDescription,
895 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAddSettingForDefaultPageMode)},
Olivier Robin3a957df2021-12-21 18:04:34896 {"enable-save-session-tabs-in-separate-files",
897 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
898 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
899 flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Ewann8c7aadc2022-05-19 15:41:05901 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
902 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
903 FEATURE_VALUE_TYPE(kUseSFSymbols)},
Nohemi Fernandez76f54802022-01-10 18:23:32904 {"enable-unicorn-account-support",
905 flag_descriptions::kEnableUnicornAccountSupportName,
906 flag_descriptions::kEnableUnicornAccountSupportDescription,
907 flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
David Jeanc2b88ab602022-08-08 14:52:51909 {"ios-webpage-intent-annotations",
910 flag_descriptions::kEnableWebPageAnnotationsName,
911 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
912 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
rgod90cca8b2022-02-04 12:38:27913 {"leak-detection-unauthenticated",
914 flag_descriptions::kLeakDetectionUnauthenticatedName,
915 flag_descriptions::kLeakDetectionUnauthenticatedDescription,
916 flags_ui::kOsIos,
917 FEATURE_VALUE_TYPE(
918 password_manager::features::kLeakDetectionUnauthenticated)},
Veronique Nguyen00ba26ea2022-02-25 14:57:17919 {"enable-favicon-passwords",
920 flag_descriptions::kEnableFaviconForPasswordsName,
921 flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos,
922 FEATURE_VALUE_TYPE(
923 password_manager::features::kEnableFaviconForPasswords)},
Shivani Chauhanbf97b0d2022-02-08 22:21:28924 {"autofill-enable-sending-bcn-in-get-upload-details",
925 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
926 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
927 flags_ui::kOsIos,
928 FEATURE_VALUE_TYPE(
929 autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
Ali Juma1429cf8a2022-02-09 15:31:01930 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
931 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
932 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramos34175732022-02-14 18:59:16933 {"enable-enhanced-safe-browsing",
934 flag_descriptions::kEnhancedProtectionName,
935 flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos,
936 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)},
Joemer Ramos26e2b512022-05-24 17:26:41937 {"enable-enhanced-safe-browsing-phase-2",
938 flag_descriptions::kEnhancedProtectionPhase2Name,
939 flag_descriptions::kEnhancedProtectionPhase2Description, flags_ui::kOsIos,
940 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtectionPhase2IOS)},
Shivani Chauhanaf1eb74d2022-02-11 21:13:19941 {"autofill-enable-unmask-card-request-set-instrument-id",
942 flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName,
943 flag_descriptions::
944 kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription,
945 flags_ui::kOsIos,
946 FEATURE_VALUE_TYPE(
947 autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)},
Vishwas Uppoor89303a92022-08-03 00:56:26948 {"autofill-enable-card-product-name",
949 flag_descriptions::kAutofillEnableCardProductNameName,
950 flag_descriptions::kAutofillEnableCardProductNameDescription,
951 flags_ui::kOsIos,
952 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00953 {"send-tab-to-self-signin-promo",
954 flag_descriptions::kSendTabToSelfSigninPromoName,
955 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
956 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Christian Xubd60c4b72022-03-22 15:25:01957 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
958 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
959 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
960 kBubbleRichIPHVariations,
961 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22962 {"autofill-enforce-delays-in-strike-database",
963 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
964 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
965 flags_ui::kOsIos,
966 FEATURE_VALUE_TYPE(
967 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Ewann4f260562022-04-11 13:37:19968 {"download-calendar", flag_descriptions::kDownloadCalendarName,
969 flag_descriptions::kDownloadCalendarDescription, flags_ui::kOsIos,
970 FEATURE_VALUE_TYPE(kDownloadCalendar)},
Jared Saulb0473bd2022-04-20 00:03:41971 {"autofill-upstream-allow-additional-email-domains",
972 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
973 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
974 flags_ui::kOsIos,
975 FEATURE_VALUE_TYPE(
976 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
977 {"autofill-upstream-allow-all-email-domains",
978 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
979 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
980 flags_ui::kOsIos,
981 FEATURE_VALUE_TYPE(
982 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Olivier Robinffe767c2022-04-21 13:13:23983 {"enable-tflite-language-detection",
984 flag_descriptions::kTFLiteLanguageDetectionName,
985 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
986 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
987 {"optimization-guide-model-downloading",
988 flag_descriptions::kOptimizationGuideModelDownloadingName,
989 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
990 flags_ui::kOsIos,
991 FEATURE_VALUE_TYPE(
992 optimization_guide::features::kOptimizationGuideModelDownloading)},
993 {"optimization-target-prediction",
994 flag_descriptions::kOptimizationTargetPredictionName,
995 flag_descriptions::kOptimizationTargetPredictionDescription,
996 flags_ui::kOsIos,
997 FEATURE_VALUE_TYPE(
998 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54999 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1000 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1001 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1002 {"sync-standalone-invalidations-wallet-and-offer",
1003 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1004 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1005 flags_ui::kOsIos,
1006 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011007 {"suggestions-scrolling-ipad",
1008 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1009 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1010 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
David Jean7a8fa702022-05-02 15:21:221011 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
1012 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
1013 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Zhixiang Teoh82d17bb2022-06-16 21:00:391014 {"enable-expkit-calendar-text-classifier",
1015 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1016 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1017 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181018 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1019 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
1020 FEATURE_VALUE_TYPE(kMapsExperienceKit)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011021 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1022 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1023 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251024 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1025 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1026 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221027 {"smart-sorting-new-overflow-menu",
1028 flag_descriptions::kSmartSortingNewOverflowMenuName,
1029 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1030 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Scott Yoder10493562022-06-28 17:37:441031 {"new-overflow-menu-share-chrome-action",
1032 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1033 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1034 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekled46a36982022-05-09 20:32:421035 {"autofill-enable-ranking-formula",
1036 flag_descriptions::kAutofillEnableRankingFormulaName,
1037 flag_descriptions::kAutofillEnableRankingFormulaDescription,
1038 flags_ui::kOsIos,
1039 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)},
Siyu An4f658a92022-05-13 22:59:021040 {"autofill-remove-card-expiry-from-downstream-suggestion",
1041 flag_descriptions::kAutofillRemoveCardExpiryFromDownstreamSuggestionName,
1042 flag_descriptions::
1043 kAutofillRemoveCardExpiryFromDownstreamSuggestionDescription,
1044 flags_ui::kOsIos,
1045 FEATURE_VALUE_TYPE(autofill::features::
1046 kAutofillRemoveCardExpiryFromDownstreamSuggestion)},
Sergio Collazos58558712022-05-18 17:24:021047 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1048 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1049 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Lu7f024ed2c2022-05-27 23:11:271050 {"content-suggestions-ui-module-refresh",
1051 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1052 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
1053 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContentSuggestionsUIModuleRefresh)},
Quentin Pubertd7546ae2022-05-30 14:28:571054 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1055 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1056 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061057 {"default-browser-intents-show-settings",
1058 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1059 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1060 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Ed Chin76b1b35e2022-06-08 23:01:171061 {"enable-discover-feed-ghost-cards",
1062 flag_descriptions::kEnableDiscoverFeedGhostCardsName,
1063 flag_descriptions::kEnableDiscoverFeedGhostCardsDescription,
1064 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDiscoverFeedGhostCardsEnabled)},
Gauthier Ambard30ad9ca2022-06-09 14:15:261065 {"bookmark-string-menu", flag_descriptions::kBookmarkStringName,
1066 flag_descriptions::kBookmarkStringDescription, flags_ui::kOsIos,
1067 FEATURE_WITH_PARAMS_VALUE_TYPE(kBookmarkString,
1068 kPopupMenuBookmarkStringVarations,
1069 "BookmarkString")},
Igor Ruvinova43a66dc2022-06-09 21:57:451070 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1071 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421072 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1073 kDmTokenDeletionVariation,
1074 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191075 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1076 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1077 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291078 {"ios-password-manager-cross-origin-iframe-support",
1079 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1080 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1081 flags_ui::kOsIos,
1082 FEATURE_VALUE_TYPE(password_manager::features::
1083 kIOSPasswordManagerCrossOriginIframeSupport)},
Christian Xud105a1352022-06-17 19:54:141084 {"omnibox-adaptive-suggestions-count",
1085 flag_descriptions::kAdaptiveSuggestionsCountName,
1086 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1087 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201088 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1089 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Luc9a5cb12022-07-20 16:11:391090 FEATURE_WITH_PARAMS_VALUE_TYPE(kTrendingQueriesModule,
1091 kTrendingQueriesModuleVariations,
1092 "TrendingQueriesModule")},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321093 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191094 flag_descriptions::kAutofillParseIBANFieldsName,
1095 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1096 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361097 {"autofill-enable-new-card-unmask-prompt-view",
1098 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1099 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1100 flags_ui::kOsIos,
1101 FEATURE_VALUE_TYPE(kAutofillEnableNewCardUnmaskPromptView)},
Christian Xubdedabec2022-07-04 10:00:131102 {"omnibox-paste-button", flag_descriptions::kOmniboxPasteButtonName,
1103 flag_descriptions::kOmniboxPasteButtonDescription, flags_ui::kOsIos,
1104 FEATURE_WITH_PARAMS_VALUE_TYPE(kOmniboxPasteButton,
1105 kOmniboxPasteButtonVariations,
1106 "OmniboxPasteButton")},
Moe Ahmadi098519d82022-07-27 18:34:241107 {"omnibox-zero-suggest-prefetching",
1108 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1109 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1110 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Vincent Boissellead6cbe22022-07-04 19:32:391111 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1112 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
1113 SINGLE_VALUE_TYPE(policy::kEnableUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491114 {"enable-sync-history-datatype",
1115 flag_descriptions::kSyncEnableHistoryDataTypeName,
1116 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1117 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361118 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1119 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1120 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1121 kOmniboxMaxURLMatchesVariations,
1122 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061123 {"metrickit-non-crash-reports",
1124 flag_descriptions::kMetrickitNonCrashReportName,
1125 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1126 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371127 {"autofill-enable-remade-downstream-metrics",
1128 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1129 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1130 flags_ui::kOsIos,
1131 FEATURE_VALUE_TYPE(
1132 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551133 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1134 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1135 flag_descriptions::
1136 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1137 flags_ui::kOsIos,
1138 FEATURE_VALUE_TYPE(
1139 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341140#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1141 {"feed-background-refresh-ios",
1142 flag_descriptions::kFeedBackgroundRefreshName,
1143 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1144 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1145 kFeedBackgroundRefreshVariations,
1146 "FeedBackgroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191147 {"omnibox-keyboard-paste-button",
1148 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1149 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1150 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin91e44992022-07-27 13:42:341151#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Arthur Milchiorcf4877e2022-07-29 14:23:411152 {"enable-cbd-sign-out", flag_descriptions::kEnableCBDSignOutName,
1153 flag_descriptions::kEnableCBDSignOutDescription, flags_ui::kOsIos,
1154 FEATURE_VALUE_TYPE(kEnableCBDSignOut)},
Sylvain Defresne1619dd002021-11-06 10:09:481155};
sdefresne14900ee2015-11-27 14:43:211156
Rohit Raobed794c2020-04-27 15:27:451157bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1158 return false;
1159}
1160
1161flags_ui::FlagsState& GetGlobalFlagsState() {
1162 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1163 nullptr);
1164 return *flags_state;
1165}
David Jean5ca263c2021-08-18 09:19:301166// Creates the experimental test policies map, used by AsyncPolicyLoader and
1167// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341168NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211169 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1170
Guillaume Jenkins25e9bd72020-08-27 17:39:061171 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551172 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061173 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551174
Guillaume Jenkins25e9bd72020-08-27 17:39:061175 // Set some sample policy values for testing if EnableSamplePolicies is set to
1176 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401177 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551178 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011179 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1180
Guillaume Jenkinseeb7007c2020-06-25 22:55:401181 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1182
1183 // 2 = Disable all variations
1184 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1185
1186 // 2 = Do not allow any site to show popups
1187 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1188
Tina Wang5abee802020-07-29 23:09:521189 // Set default search engine.
1190 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1191 @YES,
1192 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1193 @"http://www.google.com/search?q={searchTerms}",
1194 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021195 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521196
Tina Wang89068c82020-10-29 15:51:501197 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1198
Gauthier Ambard21b23702021-04-16 16:11:271199 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1200
Guillaume Jenkinseeb7007c2020-06-25 22:55:401201 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011202
1203 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531204
1205 // 2 = Enhanced safe browsing protection
1206 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1207
1208 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:551209 }];
1210 }
1211
Ewann227a3c02021-04-19 12:04:541212 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041213 NSString* sync_policy_key =
1214 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301215 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541216 }
Ewann227a3c02021-04-19 12:04:541217
Ewann570a6302021-08-17 07:22:421218 // SyncTypesListDisabled policy.
1219 NSString* Sync_types_list_disabled_key =
1220 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1221 NSMutableArray* Sync_types_list_disabled_values =
1222 [[NSMutableArray alloc] init];
1223 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1224 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1225 }
1226 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1227 [Sync_types_list_disabled_values addObject:@"readingList"];
1228 }
1229 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1230 [Sync_types_list_disabled_values addObject:@"preferences"];
1231 }
1232 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1233 [Sync_types_list_disabled_values addObject:@"passwords"];
1234 }
1235 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1236 [Sync_types_list_disabled_values addObject:@"autofill"];
1237 }
1238 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1239 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1240 }
1241 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1242 [Sync_types_list_disabled_values addObject:@"tabs"];
1243 }
1244 if ([Sync_types_list_disabled_values count]) {
1245 [testing_policies addEntriesFromDictionary:@{
1246 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1247 }];
Ewann570a6302021-08-17 07:22:421248 }
1249
Gauthier Ambard073eaa92021-11-22 15:24:131250 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521251 NSString* incognito_policy_key =
1252 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1253 NSInteger incognito_mode_availability =
1254 [defaults integerForKey:incognito_policy_key];
1255 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521256 [testing_policies addEntriesFromDictionary:@{
1257 incognito_policy_key : @(incognito_mode_availability),
1258 }];
1259 }
1260
Ewann40a8f8a2021-07-29 10:01:201261 NSString* restriction_pattern =
1262 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1263 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291264 NSString* restrict_key =
1265 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201266 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291267 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201268 }];
1269 }
1270
Vincent Boisselle19200bc2021-09-01 17:58:251271 // If the sign-in policy is set (not "None"), add the policy key to the list
1272 // of enabled experimental policies, and set the value.
1273 NSString* const kSigninPolicyKey = @"BrowserSignin";
1274 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1275 if (signin_policy_mode) {
1276 // Remove the mode offset that was used to represent the unset policy.
1277 --signin_policy_mode;
1278 DCHECK(signin_policy_mode >= 0);
1279
Vincent Boisselle19200bc2021-09-01 17:58:251280 [testing_policies addEntriesFromDictionary:@{
1281 kSigninPolicyKey : @(signin_policy_mode),
1282 }];
1283 }
1284
Veronique Nguyen9b1044f2022-01-11 14:41:131285 // If the New Tab Page URL is set (not empty) add the value to the list of
1286 // test policies.
1287 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1288 if ([ntp_location length] > 0) {
1289 NSString* ntp_location_key =
1290 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1291 [testing_policies
1292 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571293 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131294 }
1295
Ali Juma9ec36d22022-03-28 14:53:121296 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1297 NSString* allow_backups_key =
1298 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1299 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1300 [allowed_experimental_policies addObject:allow_backups_key];
1301 }
1302
Guillaume Jenkins25e9bd72020-08-27 17:39:061303 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1304 // policy.
1305 if ([allowed_experimental_policies count] > 0) {
1306 [testing_policies setValue:allowed_experimental_policies
1307 forKey:base::SysUTF8ToNSString(
1308 policy::key::kEnableExperimentalPolicies)];
1309 }
1310
jlebel2eb40222022-05-06 11:15:421311 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1312 switch ([defaults integerForKey:metrics_reporting_key]) {
1313 case 1:
1314 // Metrics reporting forced.
1315 [testing_policies setValue:@(YES) forKey:metrics_reporting_key];
1316 break;
1317 case 2:
1318 // Metrics reporting disabled.
1319 [testing_policies setValue:@(NO) forKey:metrics_reporting_key];
1320 break;
1321 default:
1322 // Metrics reporting not managed.
1323 break;
1324 }
1325
David Jean6f85d44f2021-08-19 08:08:451326 // Warning: Add new flags to TestingPoliciesHash() below.
1327
David Jean5ca263c2021-08-18 09:19:301328 return testing_policies;
1329}
David Jean6f85d44f2021-08-19 08:08:451330
1331// Generates a unique NSString based on currently monitored policies from
1332// NSUserDefaults standardUserDefaults.
1333NSString* TestingPoliciesHash() {
1334 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1335 return [NSString
jlebel2eb40222022-05-06 11:15:421336 stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d|%d|%@|%d",
Ali Juma9ec36d22022-03-28 14:53:121337 [defaults boolForKey:@"DisallowChromeDataInBackups"],
David Jean6f85d44f2021-08-19 08:08:451338 [defaults boolForKey:@"EnableSyncDisabledPolicy"],
1339 [defaults boolForKey:@"EnableSamplePolicies"],
jlebel2eb40222022-05-06 11:15:421340 static_cast<int>([defaults
1341 integerForKey:@"IncognitoModeAvailability"]),
David Jean6f85d44f2021-08-19 08:08:451342 [defaults stringForKey:@"RestrictAccountsToPatterns"],
1343 [defaults boolForKey:@"SyncTypesListBookmarks"],
1344 [defaults boolForKey:@"SyncTypesListReadingList"],
1345 [defaults boolForKey:@"SyncTypesListPreferences"],
1346 [defaults boolForKey:@"SyncTypesListPasswords"],
1347 [defaults boolForKey:@"SyncTypesListAutofill"],
1348 [defaults boolForKey:@"SyncTypesListTypedUrls"],
jlebel2eb40222022-05-06 11:15:421349 [defaults boolForKey:@"SyncTypesListTabs"],
1350 static_cast<int>(
1351 [defaults integerForKey:@"BrowserSignin"]),
1352 [defaults stringForKey:@"NTPLocation"],
1353 static_cast<int>([defaults
1354 integerForKey:@"MetricsReportingEnabled"])];
David Jean6f85d44f2021-08-19 08:08:451355}
David Jean5ca263c2021-08-18 09:19:301356} // namespace
1357
1358// Add all switches from experimental flags to |command_line|.
1359void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1360 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1361
1362 // Set the UA flag if UseMobileSafariUA is enabled.
1363 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1364 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1365 // Chrome puts its product token.
1366 int32_t major = 0;
1367 int32_t minor = 0;
1368 int32_t bugfix = 0;
1369 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1370 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1371
1372 command_line->AppendSwitchASCII(switches::kUserAgent,
1373 web::BuildMobileUserAgent(product));
1374 }
1375
1376 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341377 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301378
1379 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1380 // Management to enabled and add the token to the list of policies.
1381 NSString* token_key =
1382 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1383 NSString* token = [defaults stringForKey:token_key];
1384
1385 if ([token length] > 0) {
1386 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1387 [testing_policies setValue:token forKey:token_key];
1388 }
1389
Vincent Boisselled042d552022-04-09 01:22:591390 if ([defaults boolForKey:@"EnableUserPolicy"]) {
1391 policy::EnableUserPolicy();
1392 }
1393
Guillaume Jenkins57606d72020-08-13 17:32:551394 // If some policies were set, commit them to the app's registration defaults.
1395 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401396 NSDictionary* registration_defaults =
1397 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1398 [defaults registerDefaults:registration_defaults];
1399 }
1400
sdefresne14900ee2015-11-27 14:43:211401 // Freeform commandline flags. These are added last, so that any flags added
1402 // earlier in this function take precedence.
1403 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1404 base::CommandLine::StringVector flags;
1405 // Append an empty "program" argument.
1406 flags.push_back("");
1407
1408 // The number of flags corresponds to the number of text fields in
1409 // Experimental.plist.
1410 const int kNumFreeformFlags = 5;
1411 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1412 NSString* key =
1413 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1414 NSString* flag = [defaults stringForKey:key];
1415 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331416 // iOS keyboard replaces -- with —, so undo that.
1417 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1418 withString:@"--"
1419 options:0
1420 range:NSMakeRange(0, 1)];
1421 // To make things easier, allow flags with no dashes by prepending them
1422 // here. This also allows for flags that just have one dash if they
1423 // exist.
1424 if (![flag hasPrefix:@"-"]) {
1425 flag = [@"--" stringByAppendingString:flag];
1426 }
sdefresne14900ee2015-11-27 14:43:211427 flags.push_back(base::SysNSStringToUTF8(flag));
1428 }
1429 }
1430
1431 base::CommandLine temp_command_line(flags);
1432 command_line->AppendArguments(temp_command_line, false);
1433 }
msardafc76f662017-02-24 12:46:281434
justincohendacc85d2017-06-28 23:34:101435 // Populate command line flag for 3rd party keyboard omnibox workaround.
1436 NSString* enableThirdPartyKeyboardWorkaround =
1437 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1438 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1439 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1440 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1441 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1442 }
1443
Sylvain Defresned3cd8d92022-01-18 13:35:081444 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211445}
1446
David Jean5ca263c2021-08-18 09:19:301447void MonitorExperimentalSettingsChanges() {
David Jean5ca263c2021-08-18 09:19:301448 // Startup values for settings to be observed.
David Jean6f85d44f2021-08-19 08:08:451449 __block NSString* hash = TestingPoliciesHash();
David Jeane83ed652021-08-25 14:52:481450 static std::atomic_bool pending_check(false);
David Jean5ca263c2021-08-18 09:19:301451
1452 auto monitor = ^(NSNotification* notification) {
David Jeane83ed652021-08-25 14:52:481453 bool has_pending_check = pending_check.exchange(true);
1454 if (has_pending_check)
1455 return;
1456
David Jeanbc0fae32021-08-25 10:31:391457 // Can be called from any thread from where the notification was sent,
1458 // but since it may change standardUserDefaults, and that has to be on main
1459 // thread, dispatch to main thread.
1460 dispatch_async(dispatch_get_main_queue(), ^{
1461 // Check if observed settings have changed. Since source and destination
1462 // are both user defaults, this is required to avoid cycling back here.
1463 NSString* newHash = TestingPoliciesHash();
1464 if (![newHash isEqualToString:hash]) {
1465 hash = newHash;
David Jean5ca263c2021-08-18 09:19:301466
David Jeanbc0fae32021-08-25 10:31:391467 // Publish update.
1468 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1469 NSMutableDictionary* testing_policies =
Vincent Boisselleed0e6f1a2021-11-09 06:47:341470 CreateExperimentalTestingPolicies();
David Jeanbc0fae32021-08-25 10:31:391471 NSDictionary* registration_defaults =
1472 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1473 [defaults registerDefaults:registration_defaults];
1474 }
David Jeane83ed652021-08-25 14:52:481475
1476 pending_check.store(false);
David Jeanbc0fae32021-08-25 10:31:391477 });
David Jean5ca263c2021-08-18 09:19:301478 };
1479
1480 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1481 [center addObserverForName:NSUserDefaultsDidChangeNotification
1482 object:nil
David Jeanbc0fae32021-08-25 10:31:391483 queue:nil
David Jean5ca263c2021-08-18 09:19:301484 usingBlock:monitor];
1485}
1486
sdefresne14900ee2015-11-27 14:43:211487void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1488 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181489 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111490 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531491 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211492}
1493
jkrcalbf073372016-07-29 07:21:311494std::vector<std::string> RegisterAllFeatureVariationParameters(
1495 flags_ui::FlagsStorage* flags_storage,
1496 base::FeatureList* feature_list) {
Justin Cohen2e2adb52019-10-25 17:00:021497 // Occasionally DCHECK crashes on canary can be very distuptive. An
1498 // experimental flag was added to aid in temporarily disabling this for
1499 // canary testers.
Peter Boström3f798572022-07-26 23:44:361500#if BUILDFLAG(DCHECK_IS_CONFIGURABLE)
Justin Cohen2e2adb52019-10-25 17:00:021501 if (experimental_flags::AreDCHECKCrashesDisabled()) {
1502 std::vector<base::FeatureList::FeatureOverrideInfo> overrides;
1503 overrides.push_back(
1504 {std::cref(base::kDCheckIsFatalFeature),
1505 base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE});
1506 feature_list->RegisterExtraFeatureOverrides(std::move(overrides));
1507 }
Peter Boström3f798572022-07-26 23:44:361508#endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE)
Justin Cohen2e2adb52019-10-25 17:00:021509
Sylvain Defresne8327a2f2019-01-17 14:19:181510 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1511 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311512}
1513
sdefresne14900ee2015-11-27 14:43:211514void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1515 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501516 base::Value::List& supported_entries,
1517 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181518 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211519 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511520 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211521}
1522
1523void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1524 const std::string& internal_name,
1525 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181526 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1527 enable);
sdefresne14900ee2015-11-27 14:43:211528}
1529
1530void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181531 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211532}
1533
1534namespace testing {
1535
Elly Fong-Jones323ab1092021-08-23 22:36:311536base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1537 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531538 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211539}
1540
1541} // namespace testing