blob: f18d84f1d68cc15a41df0084ed1048566cdcf466 [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// 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
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
Menghan YANGf3fe2de52023-02-27 16:38:5028#import "components/bookmarks/common/bookmark_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/breadcrumbs/core/features.h"
30#import "components/commerce/core/commerce_feature_list.h"
31#import "components/commerce/core/flag_descriptions.h"
32#import "components/content_settings/core/common/features.h"
33#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5234#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5735#import "components/enterprise/browser/enterprise_switches.h"
36#import "components/feature_engagement/public/feature_constants.h"
37#import "components/feature_engagement/public/feature_list.h"
38#import "components/feed/feed_feature_list.h"
39#import "components/flags_ui/feature_entry.h"
40#import "components/flags_ui/feature_entry_macros.h"
41#import "components/flags_ui/flags_storage.h"
42#import "components/flags_ui/flags_ui_switches.h"
43#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0344#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5745#import "components/ntp_tiles/switches.h"
46#import "components/omnibox/browser/omnibox_field_trial.h"
47#import "components/omnibox/common/omnibox_features.h"
48#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2049#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5750#import "components/password_manager/core/common/password_manager_features.h"
51#import "components/payments/core/features.h"
52#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4053#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5754#import "components/policy/policy_constants.h"
Menghan YANG5b3a78a2023-03-24 17:38:2655#import "components/reading_list/features/reading_list_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2557#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5758#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
59#import "components/signin/core/browser/account_reconcilor.h"
60#import "components/signin/ios/browser/features.h"
61#import "components/signin/public/base/signin_switches.h"
62#import "components/strings/grit/components_strings.h"
63#import "components/sync/base/command_line_switches.h"
64#import "components/sync/base/features.h"
65#import "components/sync/base/pref_names.h"
66#import "components/translate/core/browser/translate_prefs.h"
67#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3468#import "ios/chrome/app/background_mode_buildflags.h"
ginnnnnnnya81c7192023-03-24 18:05:2069#import "ios/chrome/browser/bring_android_tabs/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5770#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
71#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5472#import "ios/chrome/browser/credential_provider_promo/features.h"
Scott Yoder663a2262023-03-29 14:27:0473#import "ios/chrome/browser/default_browser/utils.h"
Quentin Pubert154fc6a2023-01-09 15:58:5874#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1775#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5776#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1777#import "ios/chrome/browser/flags/system_flags.h"
Tina Wangd3f6f192023-04-05 05:22:4378#import "ios/chrome/browser/follow/follow_features.h"
Ed Chin100660bf2022-04-26 16:59:1379#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5080#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3981#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5782#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2083#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5784#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4685#import "ios/chrome/browser/shared/public/features/features.h"
Asami Doi2f2d6dc2023-03-30 12:31:1986#import "ios/chrome/browser/snapshots/features.h"
Ewann Pelle903a05e62023-02-01 17:51:0687#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3088#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3489#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0590#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5791#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2192#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Ewann1a9d33d2021-06-14 11:12:2493#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0094#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
adamta273568472020-12-04 23:53:5795#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
adamta8886def42023-03-07 19:45:2396#import "ios/chrome/browser/ui/ntp/new_tab_page_retention_field_trial_constants.h"
Christian Xub8c06cd2022-04-29 20:55:0197#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4998#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4599#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:26100#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:19101#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Kurt Horimoto79d590b2018-09-12 19:09:28102#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Cheick Cisse87a51cb2022-09-08 21:29:17103#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57104#import "ios/chrome/browser/web/features.h"
105#import "ios/chrome/grit/ios_strings.h"
106#import "ios/components/security_interstitials/https_only_mode/feature.h"
107#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
108#import "ios/web/common/features.h"
109#import "ios/web/common/user_agent.h"
110#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21111
Sylvain Defresne9c107082020-10-27 16:39:13112#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57113#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13114#endif
115
sdefresne14900ee2015-11-27 14:43:21116#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57117#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22118#endif
stkhapuginc1be1792016-12-13 14:30:53119
120#if !defined(__has_feature) || !__has_feature(objc_arc)
121#error "This file requires ARC support."
122#endif
sdefresne14900ee2015-11-27 14:43:21123
elawrence816f6790e2017-06-16 18:19:28124using flags_ui::FeatureEntry;
125
sdefresne14900ee2015-11-27 14:43:21126namespace {
Emily Starkbafa9062017-12-27 15:22:46127
Olivier Robin3d60411622018-02-23 10:03:22128const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
129 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
130 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
131 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
132 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
133 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
134 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
135 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
136 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
137 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
138};
139
Nohemi Fernandezc00842a2021-07-26 11:47:34140const FeatureEntry::Choice
141 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
142 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
143 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
144 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
145 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
146};
147
Stepan Khapugincc4e9842019-01-23 13:38:13148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
160const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
161 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
162
163const FeatureEntry::FeatureVariation
164 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
165 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13177 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53178 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13179
Stepan Khapuginbac467e2022-05-06 21:11:54180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
184const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
185 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
186
187const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
188 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
189 nullptr},
190 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
191 nullptr},
192 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
193 nullptr},
194};
195
Christian Xucf26d562022-07-06 09:28:36196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
200const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
201 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
202
203const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
204 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
205 nullptr},
206 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
207 nullptr},
208 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
209 nullptr},
210};
211
Cheick Cissef37087902022-10-07 19:01:41212const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
213 {kWhatsNewModuleBasedLayoutParam, "true"}};
214
215const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
216 {"Display module layout", kWhatsNewModuleLayout,
217 std::size(kWhatsNewModuleLayout), nullptr},
218};
219
Caitlin Fischer37e01232019-05-24 13:05:45220const FeatureEntry::FeatureParam
221 kAutofillUseMobileLabelDisambiguationShowAll[] = {
222 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
223 autofill::features::
224 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
225const FeatureEntry::FeatureParam
226 kAutofillUseMobileLabelDisambiguationShowOne[] = {
227 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
228 autofill::features::
229 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
230
231const FeatureEntry::FeatureVariation
232 kAutofillUseMobileLabelDisambiguationVariations[] = {
233 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53234 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45235 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53236 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45237
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10238const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59239 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
240 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
241const FeatureEntry::FeatureVariation
242 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
243 {"Remind me later",
244 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53245 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59246 nullptr}};
247
adamta37c6b832023-03-10 20:04:09248// Uses int values from SigninPromoViewStyle enum.
249const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
250 {kDiscoverFeedTopSyncPromoStyle, "0"}};
251const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactTitled[] = {
252 {kDiscoverFeedTopSyncPromoStyle, "1"}};
253const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
254 {{kDiscoverFeedTopSyncPromoStyle, "2"}};
255const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
256 {kDiscoverFeedTopSyncPromoStyle, "3"}};
adamtadb0bfc62022-08-01 17:37:47257
Mohammad Refaatab6bee62022-05-16 16:31:15258const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09259 {"Standard", kDiscoverFeedTopSyncPromoStandard,
260 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
261 {"Compact Titled (Unpersonalized)", kDiscoverFeedTopSyncPromoCompactTitled,
262 std::size(kDiscoverFeedTopSyncPromoCompactTitled), nullptr},
263 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
264 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
265 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
266 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15267
adamta4a6f2fd22023-02-13 17:37:14268const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
269 {kDisableStickyHeaderForFollowingFeed, "true"}};
270const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18271 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14272const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
273 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18274 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14275
276const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
277 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
278 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
279 {"Reduced header height", kFeedHeaderSettingReducedHeight,
280 std::size(kFeedHeaderSettingReducedHeight), nullptr},
281 {"All improvements", kFeedHeaderSettingAllImprovements,
282 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
283
gogerald53c6e7a2021-04-15 22:07:35284const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08285 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35286 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
287const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08288 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35289 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
290const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08291 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35292 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
293const FeatureEntry::FeatureParam
294 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
295 {kStartSurfaceShrinkLogoParam, "true"},
296 {kStartSurfaceReturnToRecentTabParam, "true"},
297 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
298const FeatureEntry::FeatureParam
299 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
300 {kStartSurfaceHideShortcutsParam, "true"},
301 {kStartSurfaceReturnToRecentTabParam, "true"},
302 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
303const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08304 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35305 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
306const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
307 {kStartSurfaceHideShortcutsParam, "true"},
308 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
309const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08310 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35311 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
312const FeatureEntry::FeatureParam
313 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
314 {kStartSurfaceShrinkLogoParam, "true"},
315 {kStartSurfaceReturnToRecentTabParam, "true"},
316 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
317const FeatureEntry::FeatureParam
318 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
319 {kStartSurfaceHideShortcutsParam, "true"},
320 {kStartSurfaceReturnToRecentTabParam, "true"},
321 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08322
gogerald0e39e3aa2021-02-10 18:41:23323const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35324 {"10s:Show Return to Recent Tab tile",
325 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53326 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35327 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53328 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35329 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53330 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35331 {"10s:Shrink Logo and show Return to Recent Tab tile",
332 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53333 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35334 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
335 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53336 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35337 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53338 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35339 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53340 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35341 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53342 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35343 {"1h:Shrink Logo and show Return to Recent Tab tile",
344 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53345 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35346 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
347 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53348 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08349};
gogerald0e39e3aa2021-02-10 18:41:23350
Chris Lu8e308dc2022-09-06 16:59:40351const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
352 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
353const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57354 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40355 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
356
357const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
358 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
359 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57360 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40361 std::size(kModuleRefreshNoHeaders), nullptr},
362};
363
Ed Chin91e44992022-07-27 13:42:34364#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26365// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01366const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
368 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04370 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01371const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04372 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
373 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01374 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04375 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01376const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04377 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
378 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01379 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04380 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01381const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04382 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
383 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01384 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04385 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01386const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04387 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
388 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01389 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
390 {kBackgroundRefreshIntervalInSeconds, "0"}};
391const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04392 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
393 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01394 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
395 {kBackgroundRefreshIntervalInSeconds, "0"}};
396const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
397 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
398 {kEnableRecurringBackgroundRefreshSchedule, "false"},
399 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
400 {kBackgroundRefreshIntervalInSeconds, "0"}};
401const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
402 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
403 {kEnableRecurringBackgroundRefreshSchedule, "true"},
404 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
405 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04406
Ed Chin178ec2a2023-02-10 22:21:26407// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04408const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01409 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
410 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
411 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
412 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
413 {"1hr Interval 1hr Max Age Recurring",
414 kOneHourIntervalOneHourMaxAgeRecurring,
415 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
416 {"4hr Interval 6hr Max Age Recurring",
417 kFourHourIntervalSixHourMaxAgeRecurring,
418 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
419 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
420 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
421 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
422 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
423 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
424 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
425 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
426 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04427};
Ed Chin91e44992022-07-27 13:42:34428#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04429
Ed Chin178ec2a2023-02-10 22:21:26430// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29431const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
432 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54433 {kEnableFeedAppCloseForegroundRefresh, "false"},
434 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29435const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
436 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54437 {kEnableFeedAppCloseForegroundRefresh, "true"},
438 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
439const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
440 {kEnableFeedSessionCloseForegroundRefresh, "false"},
441 {kEnableFeedAppCloseForegroundRefresh, "false"},
442 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26443
Ed Chin5c1fd532023-03-20 17:43:29444// Feed Invisible Foreground Refresh Feature Variations.
445const FeatureEntry::FeatureVariation
446 kFeedInvisibleForegroundRefreshVariations[] = {
447 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
448 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
449 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
450 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54451 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
452 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26453};
454
Chris Luc9a5cb12022-07-20 16:11:39455const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58456 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39457const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58458 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39459const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
460 {kTrendingQueriesHideShortcutsParam, "false"},
461 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58462};
Chris Luc9a5cb12022-07-20 16:11:39463
464const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
465 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
466 std::size(kTrendingQueriesEnableAllUsers), nullptr},
467 {"Enabled All Users Hide Shortcuts",
468 kTrendingQueriesEnableAllUsersHideShortcuts,
469 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
470 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
471 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39472};
473
Igor Ruvinov44fed9f2022-06-10 22:51:42474const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
475const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
476 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
477 nullptr}};
478
Aliona DANGLA00ae7db2022-10-04 16:58:50479const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58480 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49481const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58482 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49483const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58484 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
485
Aliona DANGLAa5257ccc2022-08-29 14:01:49486const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50487 {"With legacy download", kOpenInDownloadInShareButton,
488 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49489 {"With WKDownload", kOpenInDownloadWithWKDownload,
490 std::size(kOpenInDownloadWithWKDownload), nullptr},
491 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
492 nullptr},
493};
494
Ewann Pelle87019cdf2023-02-17 14:28:16495const FeatureEntry::FeatureParam kEnablePinnedTabsOverflow[] = {
496 {kEnablePinnedTabsOverflowParam, "true"}};
Ewann Pelle3774cac532022-11-15 10:12:37497
498const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
Ewann Pelle87019cdf2023-02-17 14:28:16499 {"+ overflow entry", kEnablePinnedTabsOverflow,
500 std::size(kEnablePinnedTabsOverflow), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37501};
502
ginnnnnnny591a4972022-09-01 16:10:27503const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
504 {autofill::features::kAutofillBrandingIOSParam, "true"}};
505const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
506 {"(Monotone)", kAutofillBrandingIOSMonotone,
507 std::size(kAutofillBrandingIOSMonotone), nullptr}};
508
Scott Yodercb2fe632022-09-12 15:28:35509const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26510 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35511const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
512 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
513 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
514
adamta8886def42023-03-07 19:45:23515const FeatureEntry::FeatureParam
516 kNewTabPageRetentionPopularSitesIncludePopularApps[] = {
517 {ntp_tiles::kNewTabPageRetentionParam, "1"}};
518const FeatureEntry::FeatureParam
519 kNewTabPageRetentionPopularSitesExcludePopularApps[] = {
520 {ntp_tiles::kNewTabPageRetentionParam, "2"}};
521const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideAll[] = {
522 {ntp_tiles::kNewTabPageRetentionParam, "4"}};
523const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideMVTOnly[] =
524 {{ntp_tiles::kNewTabPageRetentionParam, "5"}};
525const FeatureEntry::FeatureVariation kNewTabPageRetentionVariations[] = {
526 {"- Improved popular sites, Include popular apps",
527 kNewTabPageRetentionPopularSitesIncludePopularApps,
528 std::size(kNewTabPageRetentionPopularSitesIncludePopularApps), nullptr},
529 {"- Improved popular sites, Exclude popular apps",
530 kNewTabPageRetentionPopularSitesExcludePopularApps,
531 std::size(kNewTabPageRetentionPopularSitesExcludePopularApps), nullptr},
532 {"- Tile ablation, Hide all", kNewTabPageRetentionTileAblationHideAll,
533 std::size(kNewTabPageRetentionTileAblationHideAll), nullptr},
534 {"- Tile ablation, Hide MVT only",
535 kNewTabPageRetentionTileAblationHideMVTOnly,
536 std::size(kNewTabPageRetentionTileAblationHideMVTOnly), nullptr}};
Benjamin Williamsaa8da8142022-11-14 19:51:03537
Raj T18a2c8c2023-03-15 17:20:15538const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
539 {"date", "true"}};
540const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
541 {"address", "true"}};
542const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
543 {"phonenumber", "true"}};
544const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
545 {"email", "true"}};
546const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
547 {"date", "true"},
548 {"address", "true"},
549 {"phonenumber", "true"},
550 {"email", "true"}};
551const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
552 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
553 std::size(kEnableExpKitTextClassifierAll), nullptr},
554 {"Enabled for date", kEnableExpKitTextClassifierDate,
555 std::size(kEnableExpKitTextClassifierDate), nullptr},
556 {"Enabled for address", kEnableExpKitTextClassifierAddress,
557 std::size(kEnableExpKitTextClassifierAddress), nullptr},
558 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
559 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
560 {"Enabled for email", kEnableExpKitTextClassifierEmail,
561 std::size(kEnableExpKitTextClassifierEmail), nullptr}};
562
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28563const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
564 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
565const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
566 {"with search result page", kEnableExperienceKitMapsWithSrp,
567 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
568
adamta3811f9182022-10-24 17:49:33569const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
570 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
571 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
572const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
573 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
574 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
575
576const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
577 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
578 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
579 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
580 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
581
Quentin Pubert154fc6a2023-01-09 15:58:58582const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
583 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
584const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
585 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
586 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
587
Louis Romero93e9b50a2023-01-26 01:46:12588const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
589 {kTabInactivityThresholdParameterName,
590 kTabInactivityThresholdOneWeekParam}};
591const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
592 {kTabInactivityThresholdParameterName,
593 kTabInactivityThresholdTwoWeeksParam}};
594const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
595 {kTabInactivityThresholdParameterName,
596 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58597const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
598 {kTabInactivityThresholdParameterName,
599 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12600
601const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
602 {"One week", kTabInactivityThresholdOneWeek,
603 std::size(kTabInactivityThresholdOneWeek), nullptr},
604 {"Two weeks", kTabInactivityThresholdTwoWeeks,
605 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
606 {"Three weeks", kTabInactivityThresholdThreeWeeks,
607 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58608 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
609 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12610};
611
Huiting Yud7d2a5322023-02-09 21:14:22612const FeatureEntry::FeatureParam
613 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
614 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
615const FeatureEntry::FeatureParam
616 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
617 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
618const FeatureEntry::FeatureParam
619 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
620 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
621
622const FeatureEntry::FeatureVariation
623 kCredentialProviderExtensionPromoVariations[] = {
624 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
625 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
626 {"On password copied",
627 kCredentialProviderExtensionPromoOnPasswordCopied,
628 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
629 {"On successful login with autofill",
630 kCredentialProviderExtensionPromoOnLoginWithAutofill,
631 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
632 nullptr},
633};
634
Olivier ROBINfd3887b72023-02-23 14:45:42635const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
636 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
637const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
638 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
639 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr}};
640
Olivier ROBIN2ca64952023-02-23 17:11:48641const FeatureEntry::FeatureParam kAddToHomeScreenDisableIncognito[] = {
642 {kAddToHomeScreenDisableIncognitoParam, "true"}};
643const FeatureEntry::FeatureVariation kAddToHomeScreenVariations[] = {
644 {"Disable on incognito", kAddToHomeScreenDisableIncognito,
645 std::size(kAddToHomeScreenDisableIncognito), nullptr}};
646
ginnnnnnny75903622023-03-01 18:00:00647const FeatureEntry::FeatureParam kBringYourOwnTabsIOSBottomMessage[] = {
648 {kBringYourOwnTabsIOSParam, "true"}};
649const FeatureEntry::FeatureVariation kBringYourOwnTabsIOSVariations[] = {
650 {"with bottom message on tab grid", kBringYourOwnTabsIOSBottomMessage,
651 std::size(kBringYourOwnTabsIOSBottomMessage), nullptr}};
652
Cooper Knaak1e026562017-07-26 05:22:28653// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21654// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28655// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
656// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21657// macro for this type supplying the command line to the macro.
658// . MULTI_VALUE: a list of choices, the first of which should correspond to a
659// deactivated state for this lab (i.e. no command line option). To specify
660// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
661// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28662// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
663// either enabled, disabled, or uses the default value of the associated
664// base::Feature instance. To specify this type of entry use the macro
665// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
666// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
667// base::Feature instance. Choices corresponding to the default state, a
668// universally enabled state, and a universally disabled state are
669// automatically included. To specify this type of entry use the macro
670// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
671// the array of choices.
672//
sdefresne14900ee2015-11-27 14:43:21673// See the documentation of FeatureEntry for details on the fields.
674//
675// When adding a new choice, add it to the end of the list.
676const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28677 {"in-product-help-demo-mode-choice",
678 flag_descriptions::kInProductHelpDemoModeName,
679 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
680 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23681 feature_engagement::kIPHDemoMode,
682 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09683 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22684 {"enable-autofill-credit-card-upload",
685 flag_descriptions::kAutofillCreditCardUploadName,
686 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24687 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23688 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
689 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
690 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51691 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23692 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
693 {"wallet-service-use-sandbox",
694 flag_descriptions::kWalletServiceUseSandboxName,
695 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
696 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
697 autofill::switches::kWalletServiceUseSandbox,
698 "1",
699 autofill::switches::kWalletServiceUseSandbox,
700 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59701 {"show-autofill-type-predictions",
702 flag_descriptions::kShowAutofillTypePredictionsName,
703 flag_descriptions::kShowAutofillTypePredictionsDescription,
704 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50705 FEATURE_VALUE_TYPE(
706 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jainb86c94b2023-04-06 14:13:57707 {"autofill-account-profiles-storage",
708 flag_descriptions::kAutofillAccountProfilesStorageName,
709 flag_descriptions::kAutofillAccountProfilesStorageDescription,
710 flags_ui::kOsIos,
711 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfileStorage)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26712 {"autofill-account-profiles-union-view",
713 flag_descriptions::kAutofillAccountProfilesUnionViewName,
714 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
715 flags_ui::kOsIos,
716 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22717 {"autofill-ios-delay-between-fields",
718 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
719 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
720 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05721 {"fullscreen-promos-manager-skip-internal-limits",
722 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
723 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
724 flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14726 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53727 flag_descriptions::kFullscreenSmoothScrollingName,
728 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19729 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06730 {"webpage-default-zoom-from-dynamic-type",
731 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
732 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
733 flags_ui::kOsIos,
734 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56735 {"webpage-alternative-text-zoom",
736 flag_descriptions::kWebPageAlternativeTextZoomName,
737 flag_descriptions::kWebPageAlternativeTextZoomDescription,
738 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34739 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
740 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
741 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28742 {"toolbar-container", flag_descriptions::kToolbarContainerName,
743 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
744 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13745 {"omnibox-ui-max-autocomplete-matches",
746 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
747 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
748 flags_ui::kOsIos,
749 FEATURE_WITH_PARAMS_VALUE_TYPE(
750 omnibox::kUIExperimentMaxAutocompleteMatches,
751 kOmniboxUIMaxAutocompleteMatchesVariations,
752 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35753 {"omnibox-local-history-zero-suggest-beyond-ntp",
754 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
755 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
756 flags_ui::kOsIos,
757 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54758 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
759 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
760 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
761 kOmniboxMaxZPSMatchesVariations,
762 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45763
764 {"omnibox-most-visited-tiles-on-srp",
765 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
766 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
767 flags_ui::kOsIos,
768 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30769 {"autofill-use-mobile-label-disambiguation",
770 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
771 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
772 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45773 FEATURE_WITH_PARAMS_VALUE_TYPE(
774 autofill::features::kAutofillUseMobileLabelDisambiguation,
775 kAutofillUseMobileLabelDisambiguationVariations,
776 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46777 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
778 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30779 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48780 {"force-startup-signin-promo",
781 flag_descriptions::kForceStartupSigninPromoName,
782 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29783 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06784 {"identity-status-consistency",
785 flag_descriptions::kIdentityStatusConsistencyName,
786 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
787 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22788 {"restore-session-from-cache",
789 flag_descriptions::kRestoreSessionFromCacheName,
790 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49791 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09792 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
793 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
794 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41795 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
796 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
797 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13798#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45799 {"screen-time-integration-ios",
800 flag_descriptions::kScreenTimeIntegrationName,
801 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
802 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13803#endif
Nazerke3e993f72020-09-21 13:00:06804 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
805 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
806 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55807 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
808 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
809 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14810 {"default-browser-fullscreen-promo-experiment",
811 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
812 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
813 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59814 FEATURE_WITH_PARAMS_VALUE_TYPE(
815 kDefaultBrowserFullscreenPromoExperiment,
816 kDefaultBrowserFullscreenPromoExperimentVariations,
817 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11818 {"ios-shared-highlighting-color-change",
819 flag_descriptions::kIOSSharedHighlightingColorChangeName,
820 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07821 flags_ui::kOsIos,
822 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34823 {"ios-shared-highlighting-v2",
824 flag_descriptions::kIOSSharedHighlightingV2Name,
825 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
826 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45827 {"omnibox-new-textfield-implementation",
828 flag_descriptions::kOmniboxNewImplementationName,
829 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
830 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26831 {"omnibox-on-focus-suggestions-contextual-web",
832 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
833 flag_descriptions::
834 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
835 flags_ui::kOsIos,
836 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
837 {"omnibox-on-focus-suggestions-srp",
838 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
839 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
840 flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12842 {"omnibox-report-assisted-query-stats",
843 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
844 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
845 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
846 {"omnibox-report-searchbox-stats",
847 flag_descriptions::kOmniboxReportSearchboxStatsName,
848 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
849 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15850 {"omnibox-fuzzy-url-suggestions",
851 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
852 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
853 flags_ui::kOsIos,
854 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19855 {"start-surface", flag_descriptions::kStartSurfaceName,
856 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23857 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
858 kStartSurfaceVariations,
859 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42860 {"autofill-address-verification-in-save-prompt",
861 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
862 flag_descriptions::
863 kEnableAutofillAddressSavePromptAddressVerificationDescription,
864 flags_ui::kOsIos,
865 FEATURE_VALUE_TYPE(
866 autofill::features::
867 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25868 {"filling-across-affiliated-websites",
869 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
870 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
871 flags_ui::kOsIos,
872 FEATURE_VALUE_TYPE(
873 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19874 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
875 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
876 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34877 {"wait-threshold-seconds-for-capabilities-api",
878 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
879 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
880 flags_ui::kOsIos,
881 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23882 {"autofill-fill-merchant-promo-code-fields",
883 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
884 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
885 flags_ui::kOsIos,
886 FEATURE_VALUE_TYPE(
887 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03888 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
889 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
890 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18891 {"new-overflow-menu-alternate-iph",
892 flag_descriptions::kNewOverflowMenuAlternateIPHName,
893 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
894 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24895 {"use-lens-to-search-for-image",
896 flag_descriptions::kUseLensToSearchForImageName,
897 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44898 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22899 {"enable-lens-in-home-screen-widget",
900 flag_descriptions::kEnableLensInHomeScreenWidgetName,
901 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
902 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
903 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
904 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
905 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
906 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
907 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03909 {"enable-lens-context-menu-alt-text",
910 flag_descriptions::kEnableLensContextMenuAltTextName,
911 flag_descriptions::kEnableLensContextMenuAltTextDescription,
912 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44913 {"enable-lens-in-omnibox-copied-image",
914 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
915 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
916 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40917 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23918 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
919 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40920 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23921 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03922 {"enable-disco-feed-endpoint",
923 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
924 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
925 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11926 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15927 {"enable-discover-feed-top-sync-promo",
928 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
929 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
930 flags_ui::kOsIos,
931 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
932 kDiscoverFeedTopSyncPromoVariations,
933 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14934 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
935 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
936 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
937 kFeedHeaderSettingsVariations,
938 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28939 {"shared-highlighting-amp",
940 flag_descriptions::kIOSSharedHighlightingAmpName,
941 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
942 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28943 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42944 commerce::flag_descriptions::kCommercePriceTrackingName,
945 commerce::flag_descriptions::kCommercePriceTrackingDescription,
946 flags_ui::kOsIos,
947 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
948 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15949 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06950 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
951 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
952 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54953 {"ntp-view-hierarchy-repair",
954 flag_descriptions::kNTPViewHierarchyRepairName,
955 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20956 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26957 {"synthesized-restore-session",
958 flag_descriptions::kSynthesizedRestoreSessionName,
959 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
960 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18961 {"ios-media-permissions-control",
962 flag_descriptions::kMediaPermissionsControlName,
963 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
964 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26965 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
966 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
967 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01968 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
969 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
970 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43971 {"enable-tailored-security-integration",
972 flag_descriptions::kTailoredSecurityIntegrationName,
973 flag_descriptions::kTailoredSecurityIntegrationDescription,
974 flags_ui::kOsIos,
975 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26976 {"autofill-enable-card-product-name",
977 flag_descriptions::kAutofillEnableCardProductNameName,
978 flag_descriptions::kAutofillEnableCardProductNameDescription,
979 flags_ui::kOsIos,
980 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00981 {"send-tab-to-self-signin-promo",
982 flag_descriptions::kSendTabToSelfSigninPromoName,
983 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
984 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22985 {"autofill-enforce-delays-in-strike-database",
986 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
987 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
988 flags_ui::kOsIos,
989 FEATURE_VALUE_TYPE(
990 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41991 {"autofill-upstream-allow-additional-email-domains",
992 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
993 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
994 flags_ui::kOsIos,
995 FEATURE_VALUE_TYPE(
996 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
997 {"autofill-upstream-allow-all-email-domains",
998 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
999 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
1000 flags_ui::kOsIos,
1001 FEATURE_VALUE_TYPE(
1002 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521003 {"enable-download-service-foreground-session",
1004 flag_descriptions::kDownloadServiceForegroundSessionName,
1005 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1006 flags_ui::kOsIos,
1007 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231008 {"enable-tflite-language-detection",
1009 flag_descriptions::kTFLiteLanguageDetectionName,
1010 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1011 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201012 {"optimization-guide-debug-logs",
1013 flag_descriptions::kOptimizationGuideDebugLogsName,
1014 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1015 flags_ui::kOsIos,
1016 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:551017 {"optimization-guide-push-notifications",
1018 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1019 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1020 flags_ui::kOsIos,
1021 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Olivier Robinffe767c2022-04-21 13:13:231022 {"optimization-guide-model-downloading",
1023 flag_descriptions::kOptimizationGuideModelDownloadingName,
1024 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
1025 flags_ui::kOsIos,
1026 FEATURE_VALUE_TYPE(
1027 optimization_guide::features::kOptimizationGuideModelDownloading)},
1028 {"optimization-target-prediction",
1029 flag_descriptions::kOptimizationTargetPredictionName,
1030 flag_descriptions::kOptimizationTargetPredictionDescription,
1031 flags_ui::kOsIos,
1032 FEATURE_VALUE_TYPE(
1033 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:541034 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1035 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1036 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1037 {"sync-standalone-invalidations-wallet-and-offer",
1038 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1039 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1040 flags_ui::kOsIos,
1041 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011042 {"suggestions-scrolling-ipad",
1043 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1044 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1045 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001046 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1047 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1048 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251049 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1050 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331051 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551052 {"experience-kit-apple-calendar",
1053 flag_descriptions::kAppleCalendarExperienceKitName,
1054 flag_descriptions::kAppleCalendarExperienceKitDescription,
1055 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081056 {"enable-expkit-text-classifier",
1057 flag_descriptions::kEnableExpKitTextClassifierName,
1058 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151059 flags_ui::kOsIos,
1060 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1061 kEnableExpKitTextClassifierVariations,
1062 "ExpKitTextClassifier")},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181063 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1064 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281065 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1066 kEnableExperienceKitMapsVariations,
1067 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051068 {"enable-long-press-surrounding-text",
1069 flag_descriptions::kLongPressSurroundingTextName,
1070 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1071 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331072 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1073 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1074 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011075 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1076 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1077 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251078 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1079 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1080 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221081 {"smart-sorting-new-overflow-menu",
1082 flag_descriptions::kSmartSortingNewOverflowMenuName,
1083 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1084 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251085 {"smart-sorting-price-tracking-destination",
1086 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1087 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1088 flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441090 {"new-overflow-menu-share-chrome-action",
1091 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1092 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1093 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301094 {"autofill-enable-ranking-formula-address-profiles",
1095 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1096 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1097 flags_ui::kOsIos,
1098 FEATURE_VALUE_TYPE(
1099 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391100 {"autofill-enable-ranking-formula-credit-cards",
1101 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1102 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1103 flags_ui::kOsIos,
1104 FEATURE_VALUE_TYPE(
1105 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021106 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1107 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1108 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021109 {"enable-feed-bottom-sign-in-promo",
1110 flag_descriptions::kEnableFeedBottomSignInPromoName,
1111 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1112 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1113 {"enable-feed-card-menu-sign-in-promo",
1114 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1115 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1116 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Luc36e3962023-04-11 21:50:521117 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1118 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
1119 FEATURE_VALUE_TYPE(kMagicStack)},
Chris Lu7f024ed2c2022-05-27 23:11:271120 {"content-suggestions-ui-module-refresh",
1121 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1122 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401123 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581124 FEATURE_WITH_PARAMS_VALUE_TYPE(
1125 kContentSuggestionsUIModuleRefresh,
1126 kModuleRefreshVariations,
1127 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Olivier Robin058c1fad2022-05-31 18:24:061128 {"default-browser-intents-show-settings",
1129 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1130 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1131 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451132 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1133 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421134 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1135 kDmTokenDeletionVariation,
1136 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191137 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1138 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1139 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Scott Yoder16bff3c2023-03-24 16:00:551140 {"ios-set-up-list", flag_descriptions::kIOSSetUpListName,
1141 flag_descriptions::kIOSSetUpListDescription, flags_ui::kOsIos,
1142 FEATURE_VALUE_TYPE(kIOSSetUpList)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291143 {"ios-password-manager-cross-origin-iframe-support",
1144 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1145 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1146 flags_ui::kOsIos,
1147 FEATURE_VALUE_TYPE(password_manager::features::
1148 kIOSPasswordManagerCrossOriginIframeSupport)},
Veronique Nguyenc3d7db52023-03-08 22:52:321149 {"ios-password-bottom-sheet",
1150 flag_descriptions::kIOSPasswordBottomSheetName,
1151 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1152 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
adamta8886def42023-03-07 19:45:231153 {"ios-new-tab-page-retention", flag_descriptions::kNewTabPageRetentionName,
1154 flag_descriptions::kNewTabPageRetentionDescription, flags_ui::kOsIos,
1155 FEATURE_WITH_PARAMS_VALUE_TYPE(ntp_tiles::kNewTabPageRetention,
1156 kNewTabPageRetentionVariations,
1157 ntp_tiles::kNewTabPageRetentionName)},
Christian Xud105a1352022-06-17 19:54:141158 {"omnibox-adaptive-suggestions-count",
1159 flag_descriptions::kAdaptiveSuggestionsCountName,
1160 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1161 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201162 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1163 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581164 FEATURE_WITH_PARAMS_VALUE_TYPE(
1165 kTrendingQueriesModule,
1166 kTrendingQueriesModuleVariations,
1167 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321168 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191169 flag_descriptions::kAutofillParseIBANFieldsName,
1170 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1171 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Moe Ahmadi098519d82022-07-27 18:34:241172 {"omnibox-zero-suggest-prefetching",
1173 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1174 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1175 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451176 {"omnibox-zero-suggest-prefetching-on-srp",
1177 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1178 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1179 flags_ui::kOsIos,
1180 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1181 {"omnibox-zero-suggest-prefetching-on-web",
1182 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1183 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1184 flags_ui::kOsIos,
1185 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471186 {"omnibox-zero-suggest-in-memory-caching",
1187 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1188 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1189 flags_ui::kOsIos,
1190 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351191 {"omnibox-on-device-tail-suggestions",
1192 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1193 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1194 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosbde5d5d2023-03-31 13:18:371195 {"enable-browser-lockdown-mode",
1196 flag_descriptions::kEnableBrowserLockdownModeName,
1197 flag_descriptions::kEnableBrowserLockdownModeDescription, flags_ui::kOsIos,
1198 FEATURE_VALUE_TYPE(web::kEnableBrowserLockdownMode)},
Joemer Ramosada1e852023-03-10 19:14:411199 {"enable-button-configuration-usage",
1200 flag_descriptions::kEnableUIButtonConfigurationName,
1201 flag_descriptions::kEnableUIButtonConfigurationDescription,
1202 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Vincent Boissellead6cbe22022-07-04 19:32:391203 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1204 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501205 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491206 {"enable-sync-history-datatype",
1207 flag_descriptions::kSyncEnableHistoryDataTypeName,
1208 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1209 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361210 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1211 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1212 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1213 kOmniboxMaxURLMatchesVariations,
1214 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061215 {"metrickit-non-crash-reports",
1216 flag_descriptions::kMetrickitNonCrashReportName,
1217 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1218 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371219 {"autofill-enable-remade-downstream-metrics",
1220 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1221 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1222 flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(
1224 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551225 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1226 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1227 flag_descriptions::
1228 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1229 flags_ui::kOsIos,
1230 FEATURE_VALUE_TYPE(
1231 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse1a168ef2023-03-24 10:39:531232 {"default-browser-refactoring-promo-manager",
1233 flag_descriptions::kDefaultBrowserRefactoringPromoManagerName,
1234 flag_descriptions::kDefaultBrowserRefactoringPromoManagerDescription,
1235 flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(kDefaultBrowserRefactoringPromoManager)},
Ed Chin91e44992022-07-27 13:42:341237#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1238 {"feed-background-refresh-ios",
1239 flag_descriptions::kFeedBackgroundRefreshName,
1240 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1241 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1242 kFeedBackgroundRefreshVariations,
1243 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261244#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291245 {"feed-invisible-foreground-refresh-ios",
1246 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1247 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1248 flags_ui::kOsIos,
1249 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1250 kFeedInvisibleForegroundRefreshVariations,
1251 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191252 {"omnibox-keyboard-paste-button",
1253 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1254 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1255 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261256
Aliona DANGLAa5257ccc2022-08-29 14:01:491257 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1258 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1259 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1260 kOpenInDownloadVariations,
1261 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171262 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1263 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411264 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1265 kWhatsNewLayoutVariations,
1266 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271267 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1268 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1269 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1270 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051271 "AutofillBrandingIOS")},
1272 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1273 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351275 {"ios-new-post-restore-experience",
1276 flag_descriptions::kIOSNewPostRestoreExperienceName,
1277 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1278 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261279 FEATURE_WITH_PARAMS_VALUE_TYPE(
1280 post_restore_signin::features::kIOSNewPostRestoreExperience,
1281 kIOSNewPostRestoreExperienceVariations,
1282 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021283 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1284 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1285 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501286 {"enable-tflite-language-detection-ignore",
1287 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1288 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1289 flags_ui::kOsIos,
1290 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Tina Wang89ae4252022-10-14 00:39:471291 {"enable-check-visibility-on-attention-log-start",
1292 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1293 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1294 flags_ui::kOsIos,
1295 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1296 {"enable-refine-data-source-reload-reporting",
1297 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1298 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1299 flags_ui::kOsIos,
1300 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041301 {"enable-passwords-account-storage",
1302 flag_descriptions::kEnablePasswordsAccountStorageName,
1303 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1304 flags_ui::kOsIos,
1305 FEATURE_VALUE_TYPE(
1306 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331307 {"enable-default-following-feed-sort-type",
1308 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1309 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1310 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201311 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331312 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201313 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131314 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1315 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1316 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201317 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011318 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1319 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371320 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1321 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1322 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1323 kEnablePinnedTabsVariations,
1324 "EnablePinnedTabs")},
Hira Mahmoodea109752022-11-17 17:45:411325 {"credential-provider-extension-promo",
1326 flag_descriptions::kCredentialProviderExtensionPromoName,
1327 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221328 flags_ui::kOsIos,
1329 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1330 kCredentialProviderExtensionPromoVariations,
1331 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521332 {"default-browser-blue-dot-promo",
1333 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1334 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1335 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271336 {"ios-force-translate-enabled",
1337 flag_descriptions::kIOSForceTranslateEnabledName,
1338 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1339 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251340 {"iph-price-notifications-while-browsing",
1341 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1342 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1343 flags_ui::kOsIos,
1344 FEATURE_VALUE_TYPE(
1345 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411346 {"autofill-offer-to-save-card-with-same-last-four",
1347 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1348 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1349 flags_ui::kOsIos,
1350 FEATURE_VALUE_TYPE(
1351 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041352 {"omnibox-multiline-search-suggest",
1353 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1354 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1355 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501356 {"autofill-suggest-server-card-instead-of-local-card",
1357 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1358 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1359 flags_ui::kOsIos,
1360 FEATURE_VALUE_TYPE(
1361 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581362 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1363 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1364 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1365 kNativeFindInPageVariations,
1366 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551367 {"intents-on-email", flag_descriptions::kEmailName,
1368 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331369 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341370 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1371 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1372 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351373 {"multiline-fade-truncating-label",
1374 flag_descriptions::kMultilineFadeTruncatingLabelName,
1375 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1376 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301377 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1378 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1379 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391380 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1381 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1382 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Louis Romero93e9b50a2023-01-26 01:46:121383 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1384 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1385 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1386 kTabInactivityThresholdVariations,
1387 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411388 {"enable-feed-image-caching",
1389 flag_descriptions::kEnableFeedImageCachingName,
1390 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1391 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1392 {"enable-feed-synthetic-capabilities",
1393 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1394 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1395 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561396 {"ios-show-password-storage-in-save-infobar",
1397 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1398 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1399 flags_ui::kOsIos,
1400 FEATURE_VALUE_TYPE(
1401 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Louis Romero58f355022023-02-13 19:04:311402 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1403 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1404 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421405 {"ios-edit-menu-partial-translate",
1406 flag_descriptions::kIOSEditMenuPartialTranslateName,
1407 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421408 flags_ui::kOsIos,
1409 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1410 kIOSEditMenuPartialTranslateVariations,
1411 "IOSEditMenuPartialTranslate")},
Olivier Robin7057bd72023-02-16 18:35:201412 {"ios-custom-browser-edit-menu",
1413 flag_descriptions::kIOSCustomBrowserEditMenuName,
1414 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1415 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Ali Juma57849c42023-02-21 22:53:431416 {"notification-settings-menu-item",
1417 flag_descriptions::kNotificationSettingsMenuItemName,
1418 flag_descriptions::kNotificationSettingsMenuItemDescription,
1419 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
rgodba72acf82023-02-20 10:29:351420 {"password-notes", flag_descriptions::kPasswordNotesWithBackupName,
1421 flag_descriptions::kPasswordNotesWithBackupDescription, flags_ui::kOsIos,
1422 FEATURE_VALUE_TYPE(syncer::kPasswordNotesWithBackup)},
Ed Chin97560fc42023-02-20 16:48:321423 {"feed-experiment-tagging-ios",
1424 flag_descriptions::kFeedExperimentTaggingName,
1425 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061427 {"spotlight-reading-list-source",
1428 flag_descriptions::kSpotlightReadingListSourceName,
1429 flag_descriptions::kSpotlightReadingListSourceDescription,
1430 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
kalettuced6ba72cb2023-02-22 00:55:381431 {"consistency-new-account-interface",
1432 flag_descriptions::kConsistencyNewAccountInterfaceName,
1433 flag_descriptions::kConsistencyNewAccountInterfaceDescription,
1434 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kConsistencyNewAccountInterface)},
Olivier ROBINabcb8ce2023-02-22 13:55:201435 {"add-to-home-screen", flag_descriptions::kAddToHomeScreenName,
1436 flag_descriptions::kAddToHomeScreenDescription, flags_ui::kOsIos,
Olivier ROBIN2ca64952023-02-23 17:11:481437 FEATURE_WITH_PARAMS_VALUE_TYPE(kAddToHomeScreen,
1438 kAddToHomeScreenVariations,
1439 "IOSEditMenuPartialTranslate")},
Salma Elmahallawy72c5d34d2023-02-27 23:44:421440 {"policy-logs-page-ios", flag_descriptions::kPolicyLogsPageIOSName,
1441 flag_descriptions::kPolicyLogsPageIOSDescription, flags_ui::kOsIos,
1442 FEATURE_VALUE_TYPE(policy::features::kPolicyLogsPageIOS)},
Vincent Boisselle6e9780c2023-02-25 01:05:341443 {"indicate-account-storage-error-in-account-cell",
1444 flag_descriptions::kIndicateAccountStorageErrorInAccountCellName,
1445 flag_descriptions::kIndicateAccountStorageErrorInAccountCellDescription,
1446 flags_ui::kOsIos,
Mikel Astize597fc82023-03-22 01:39:491447 FEATURE_VALUE_TYPE(syncer::kIndicateAccountStorageErrorInAccountCell)},
Menghan YANGf3fe2de52023-02-27 16:38:501448 {"enable-bookmarks-account-storage",
1449 flag_descriptions::kEnableBookmarksAccountStorageName,
1450 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1451 flags_ui::kOsIos,
1452 FEATURE_VALUE_TYPE(bookmarks::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531453 {"web-feed-feedback-reroute",
1454 flag_descriptions::kWebFeedFeedbackRerouteName,
1455 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1456 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551457 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1458 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1459 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
ginnnnnnny75903622023-03-01 18:00:001460 {"bring-your-own-tabs-ios", flag_descriptions::kBringYourOwnTabsIOSName,
1461 flag_descriptions::kBringYourOwnTabsIOSDescription, flags_ui::kOsIos,
1462 FEATURE_WITH_PARAMS_VALUE_TYPE(kBringYourOwnTabsIOS,
1463 kBringYourOwnTabsIOSVariations,
1464 "BringYourOwnTabsIOS")},
Tina Wangd3f6f192023-04-05 05:22:431465 {"enable-follow-IPH-exp-params",
1466 flag_descriptions::kEnableFollowIPHExpParamsName,
1467 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1468 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031469 {"enable-follow-management-instant-reload",
1470 flag_descriptions::kEnableFollowManagementInstantReloadName,
1471 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1472 flags_ui::kOsIos,
1473 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Mustafa Acerc8c0b152023-03-09 02:41:441474 {"mixed-content-autoupgrade-ios",
1475 flag_descriptions::kMixedContentAutoupgradeName,
1476 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1477 FEATURE_VALUE_TYPE(
1478 security_interstitials::features::kMixedContentAutoupgrade)},
Menghan YANGc4c94ea22023-03-09 12:48:241479 {"enable-email-in-bookmarks-reading-list-snackbar",
1480 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarName,
1481 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarDescription,
1482 flags_ui::kOsIos,
1483 FEATURE_VALUE_TYPE(kEnableEmailInBookmarksReadingListSnackbar)},
Jared Saul5363f3962023-03-10 23:03:511484 {"autofill-upstream-authenticate-preflight-call",
1485 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallName,
1486 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallDescription,
1487 flags_ui::kOsIos,
1488 FEATURE_VALUE_TYPE(
1489 autofill::features::kAutofillUpstreamAuthenticatePreflightCall)},
Marc Treibe9f79ea72023-03-14 10:25:421490 {"enable-preferences-account-storage",
1491 flag_descriptions::kEnablePreferencesAccountStorageName,
1492 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1493 flags_ui::kOsIos,
1494 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Vincent Boisselle92fa8c472023-03-20 21:35:511495 {"indicate-identity-error-overflow-menu",
1496 flag_descriptions::kIndicateIdentityErrorInOverflowMenuName,
1497 flag_descriptions::kIndicateIdentityErrorInOverflowMenuDescription,
1498 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIndicateSyncErrorInOverflowMenu)},
Olivier ROBINa229d2132023-03-21 12:44:201499 {"ios-browser-edit-menu-metrics",
1500 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1501 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1502 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Gauthier Ambardb27b29c2023-03-29 07:43:441503 {"sf-symbols-follow-up", flag_descriptions::kSFSymbolsFollowUpName,
1504 flag_descriptions::kSFSymbolsFollowUpDescription, flags_ui::kOsIos,
1505 FEATURE_VALUE_TYPE(kSFSymbolsFollowUp)},
Menghan YANG5b3a78a2023-03-24 17:38:261506 {"enable-reading-list-account-storage",
1507 flag_descriptions::kEnableReadingListAccountStorageName,
1508 flag_descriptions::kEnableReadingListAccountStorageDescription,
1509 flags_ui::kOsIos,
1510 FEATURE_VALUE_TYPE(
1511 reading_list::switches::kReadingListEnableDualReadingListModel)},
1512 {"enable-reading-list-sign-in-promo",
1513 flag_descriptions::kEnableReadingListSignInPromoName,
1514 flag_descriptions::kEnableReadingListSignInPromoDescription,
1515 flags_ui::kOsIos,
1516 FEATURE_VALUE_TYPE(reading_list::switches::
1517 kReadingListEnableSyncTransportModeUponSignIn)},
Asami Doi2f2d6dc2023-03-30 12:31:191518 {"fix-pdf-snapshot", flag_descriptions::kPDFSnapshotName,
1519 flag_descriptions::kPDFSnapshotDescription, flags_ui::kOsIos,
1520 FEATURE_VALUE_TYPE(kPDFSnapshot)},
Stepan Khapuginb2f49522023-04-03 18:25:241521 {"omnibox-grouping-framework-zps",
1522 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1523 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1524 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1525 {"omnibox-grouping-framework-non-zps",
1526 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1527 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1528 flags_ui::kOsIos,
1529 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471530 {"enable-session-serialization-optimizations",
1531 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1532 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1533 flags_ui::kOsIos,
1534 FEATURE_VALUE_TYPE(
1535 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411536 {"bottom-omnibox-steady-state",
1537 flag_descriptions::kBottomOmniboxSteadyStateName,
1538 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1539 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Jared Saul19f8ba12023-04-11 17:44:531540 {"autofill-upstream-use-alternate-secure-data-type",
1541 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeName,
1542 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeDescription,
1543 flags_ui::kOsIos,
1544 FEATURE_VALUE_TYPE(
1545 autofill::features::kAutofillUpstreamUseAlternateSecureDataType)},
Robbie Gibson0ea280602023-04-12 01:02:391546 {"only-access-clipboard-async",
1547 flag_descriptions::kOnlyAccessClipboardAsyncName,
1548 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1549 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Louis Romero93e9b50a2023-01-26 01:46:121550};
sdefresne14900ee2015-11-27 14:43:211551
Rohit Raobed794c2020-04-27 15:27:451552bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1553 return false;
1554}
1555
1556flags_ui::FlagsState& GetGlobalFlagsState() {
1557 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1558 nullptr);
1559 return *flags_state;
1560}
David Jean5ca263c2021-08-18 09:19:301561// Creates the experimental test policies map, used by AsyncPolicyLoader and
1562// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341563NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211564 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1565
Guillaume Jenkins25e9bd72020-08-27 17:39:061566 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551567 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061568 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551569
Guillaume Jenkins25e9bd72020-08-27 17:39:061570 // Set some sample policy values for testing if EnableSamplePolicies is set to
1571 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401572 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551573 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011574 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1575
Guillaume Jenkinseeb7007c2020-06-25 22:55:401576 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1577
1578 // 2 = Disable all variations
1579 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1580
1581 // 2 = Do not allow any site to show popups
1582 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1583
Tina Wang5abee802020-07-29 23:09:521584 // Set default search engine.
1585 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1586 @YES,
1587 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1588 @"http://www.google.com/search?q={searchTerms}",
1589 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021590 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521591
Tina Wang89068c82020-10-29 15:51:501592 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1593
Gauthier Ambard21b23702021-04-16 16:11:271594 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1595
Tina Wang59d0b7e2020-08-11 04:41:011596 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531597
1598 // 2 = Enhanced safe browsing protection
1599 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1600
1601 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291602
1603 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551604 }];
1605 }
1606
Ewann227a3c02021-04-19 12:04:541607 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041608 NSString* sync_policy_key =
1609 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301610 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541611 }
Ewann227a3c02021-04-19 12:04:541612
Ewann570a6302021-08-17 07:22:421613 // SyncTypesListDisabled policy.
1614 NSString* Sync_types_list_disabled_key =
1615 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1616 NSMutableArray* Sync_types_list_disabled_values =
1617 [[NSMutableArray alloc] init];
1618 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1619 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1620 }
1621 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1622 [Sync_types_list_disabled_values addObject:@"readingList"];
1623 }
1624 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1625 [Sync_types_list_disabled_values addObject:@"preferences"];
1626 }
1627 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1628 [Sync_types_list_disabled_values addObject:@"passwords"];
1629 }
1630 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1631 [Sync_types_list_disabled_values addObject:@"autofill"];
1632 }
1633 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1634 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1635 }
1636 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1637 [Sync_types_list_disabled_values addObject:@"tabs"];
1638 }
1639 if ([Sync_types_list_disabled_values count]) {
1640 [testing_policies addEntriesFromDictionary:@{
1641 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1642 }];
Ewann570a6302021-08-17 07:22:421643 }
1644
Gauthier Ambard073eaa92021-11-22 15:24:131645 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521646 NSString* incognito_policy_key =
1647 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1648 NSInteger incognito_mode_availability =
1649 [defaults integerForKey:incognito_policy_key];
1650 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521651 [testing_policies addEntriesFromDictionary:@{
1652 incognito_policy_key : @(incognito_mode_availability),
1653 }];
1654 }
1655
Ewann40a8f8a2021-07-29 10:01:201656 NSString* restriction_pattern =
1657 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1658 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291659 NSString* restrict_key =
1660 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201661 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291662 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201663 }];
1664 }
1665
Vincent Boisselle19200bc2021-09-01 17:58:251666 // If the sign-in policy is set (not "None"), add the policy key to the list
1667 // of enabled experimental policies, and set the value.
1668 NSString* const kSigninPolicyKey = @"BrowserSignin";
1669 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1670 if (signin_policy_mode) {
1671 // Remove the mode offset that was used to represent the unset policy.
1672 --signin_policy_mode;
1673 DCHECK(signin_policy_mode >= 0);
1674
Vincent Boisselle19200bc2021-09-01 17:58:251675 [testing_policies addEntriesFromDictionary:@{
1676 kSigninPolicyKey : @(signin_policy_mode),
1677 }];
1678 }
1679
Veronique Nguyen9b1044f2022-01-11 14:41:131680 // If the New Tab Page URL is set (not empty) add the value to the list of
1681 // test policies.
1682 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1683 if ([ntp_location length] > 0) {
1684 NSString* ntp_location_key =
1685 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1686 [testing_policies
1687 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571688 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131689 }
1690
Ali Juma9ec36d22022-03-28 14:53:121691 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1692 NSString* allow_backups_key =
1693 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1694 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1695 [allowed_experimental_policies addObject:allow_backups_key];
1696 }
1697
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241698 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1699 NSString* password_manager_key =
1700 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1701 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1702 [allowed_experimental_policies addObject:password_manager_key];
1703 }
Arthur Milchiorbb44f5c82023-03-14 16:14:461704 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1705 NSString* managed_bookmarks_key =
1706 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1707 NSString* managed_bookmarks_value =
1708 base::SysUTF8ToNSString("["
1709 // The following gets filtered out from
1710 // the JSON string when parsed.
1711 " {"
Jérôme Lebelaaf24de2023-03-15 22:00:111712 " \"toplevel_name\": \"Managed Bookmarks\""
Arthur Milchiorbb44f5c82023-03-14 16:14:461713 " },"
1714 " {"
1715 " \"name\": \"Google\","
1716 " \"url\": \"google.com\""
1717 " },"
1718 " {"
1719 " \"name\": \"Empty Folder\","
1720 " \"children\": []"
1721 " },"
1722 " {"
1723 " \"name\": \"Big Folder\","
1724 " \"children\": ["
1725 " {"
1726 " \"name\": \"Youtube\","
1727 " \"url\": \"youtube.com\""
1728 " },"
1729 " {"
1730 " \"name\": \"Chromium\","
1731 " \"url\": \"chromium.org\""
1732 " },"
1733 " {"
1734 " \"name\": \"More Stuff\","
1735 " \"children\": ["
1736 " {"
1737 " \"name\": \"Bugs\","
1738 " \"url\": \"crbug.com\""
1739 " }"
1740 " ]"
1741 " }"
1742 " ]"
1743 " }"
1744 "]");
1745 [testing_policies addEntriesFromDictionary:@{
1746 managed_bookmarks_key : managed_bookmarks_value
1747 }];
1748 [allowed_experimental_policies addObject:managed_bookmarks_key];
1749 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241750
Guillaume Jenkins25e9bd72020-08-27 17:39:061751 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1752 // policy.
1753 if ([allowed_experimental_policies count] > 0) {
1754 [testing_policies setValue:allowed_experimental_policies
1755 forKey:base::SysUTF8ToNSString(
1756 policy::key::kEnableExperimentalPolicies)];
1757 }
1758
jlebel2eb40222022-05-06 11:15:421759 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1760 switch ([defaults integerForKey:metrics_reporting_key]) {
1761 case 1:
1762 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131763 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421764 break;
1765 case 2:
1766 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131767 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421768 break;
1769 default:
1770 // Metrics reporting not managed.
1771 break;
1772 }
1773
David Jean6f85d44f2021-08-19 08:08:451774 // Warning: Add new flags to TestingPoliciesHash() below.
1775
David Jean5ca263c2021-08-18 09:19:301776 return testing_policies;
1777}
David Jean6f85d44f2021-08-19 08:08:451778
David Jean5ca263c2021-08-18 09:19:301779} // namespace
1780
Gauthier Ambard02dbf022022-08-23 08:28:471781// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301782void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1783 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1784
1785 // Set the UA flag if UseMobileSafariUA is enabled.
1786 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1787 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1788 // Chrome puts its product token.
1789 int32_t major = 0;
1790 int32_t minor = 0;
1791 int32_t bugfix = 0;
1792 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1793 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1794
1795 command_line->AppendSwitchASCII(switches::kUserAgent,
1796 web::BuildMobileUserAgent(product));
1797 }
1798
1799 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341800 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301801
1802 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1803 // Management to enabled and add the token to the list of policies.
1804 NSString* token_key =
1805 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1806 NSString* token = [defaults stringForKey:token_key];
1807
1808 if ([token length] > 0) {
1809 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1810 [testing_policies setValue:token forKey:token_key];
1811 }
1812
Guillaume Jenkins57606d72020-08-13 17:32:551813 // If some policies were set, commit them to the app's registration defaults.
1814 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401815 NSDictionary* registration_defaults =
1816 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1817 [defaults registerDefaults:registration_defaults];
1818 }
1819
sdefresne14900ee2015-11-27 14:43:211820 // Freeform commandline flags. These are added last, so that any flags added
1821 // earlier in this function take precedence.
1822 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1823 base::CommandLine::StringVector flags;
1824 // Append an empty "program" argument.
1825 flags.push_back("");
1826
1827 // The number of flags corresponds to the number of text fields in
1828 // Experimental.plist.
1829 const int kNumFreeformFlags = 5;
1830 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1831 NSString* key =
1832 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1833 NSString* flag = [defaults stringForKey:key];
1834 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331835 // iOS keyboard replaces -- with —, so undo that.
1836 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1837 withString:@"--"
1838 options:0
1839 range:NSMakeRange(0, 1)];
1840 // To make things easier, allow flags with no dashes by prepending them
1841 // here. This also allows for flags that just have one dash if they
1842 // exist.
1843 if (![flag hasPrefix:@"-"]) {
1844 flag = [@"--" stringByAppendingString:flag];
1845 }
sdefresne14900ee2015-11-27 14:43:211846 flags.push_back(base::SysNSStringToUTF8(flag));
1847 }
1848 }
1849
1850 base::CommandLine temp_command_line(flags);
1851 command_line->AppendArguments(temp_command_line, false);
1852 }
msardafc76f662017-02-24 12:46:281853
justincohendacc85d2017-06-28 23:34:101854 // Populate command line flag for 3rd party keyboard omnibox workaround.
1855 NSString* enableThirdPartyKeyboardWorkaround =
1856 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1857 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1858 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1859 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1860 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1861 }
1862
Sylvain Defresned3cd8d92022-01-18 13:35:081863 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211864}
1865
sdefresne14900ee2015-11-27 14:43:211866void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1867 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181868 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111869 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531870 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211871}
1872
jkrcalbf073372016-07-29 07:21:311873std::vector<std::string> RegisterAllFeatureVariationParameters(
1874 flags_ui::FlagsStorage* flags_storage,
1875 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181876 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1877 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311878}
1879
sdefresne14900ee2015-11-27 14:43:211880void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1881 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501882 base::Value::List& supported_entries,
1883 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181884 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211885 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511886 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211887}
1888
1889void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1890 const std::string& internal_name,
1891 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181892 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1893 enable);
sdefresne14900ee2015-11-27 14:43:211894}
1895
1896void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181897 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211898}
1899
Nicolas MacBeth972e2592023-02-23 15:22:091900bool IsRestartNeededToCommitChanges() {
1901 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1902}
1903
sdefresne14900ee2015-11-27 14:43:211904namespace testing {
1905
Elly Fong-Jones323ab1092021-08-23 22:36:311906base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1907 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531908 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211909}
1910
1911} // namespace testing