blob: b5827b91331600853dd2fa8d6f4837db37bdef64 [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"
15#import "base/bind.h"
16#import "base/callback_helpers.h"
17#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3618#import "base/debug/debugging_buildflags.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
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"
28#import "components/breadcrumbs/core/features.h"
29#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
35#import "components/feature_engagement/public/feature_constants.h"
36#import "components/feature_engagement/public/feature_list.h"
37#import "components/feed/feed_feature_list.h"
38#import "components/flags_ui/feature_entry.h"
39#import "components/flags_ui/feature_entry_macros.h"
40#import "components/flags_ui/flags_storage.h"
41#import "components/flags_ui/flags_ui_switches.h"
42#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0343#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/ntp_tiles/switches.h"
45#import "components/omnibox/browser/omnibox_field_trial.h"
46#import "components/omnibox/common/omnibox_features.h"
47#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2048#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5749#import "components/password_manager/core/common/password_manager_features.h"
50#import "components/payments/core/features.h"
51#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4052#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5753#import "components/policy/policy_constants.h"
54#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2555#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
57#import "components/signin/core/browser/account_reconcilor.h"
58#import "components/signin/ios/browser/features.h"
59#import "components/signin/public/base/signin_switches.h"
60#import "components/strings/grit/components_strings.h"
61#import "components/sync/base/command_line_switches.h"
62#import "components/sync/base/features.h"
63#import "components/sync/base/pref_names.h"
64#import "components/translate/core/browser/translate_prefs.h"
65#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3466#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
68#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5469#import "ios/chrome/browser/credential_provider_promo/features.h"
Gauthier Ambard92605132022-08-26 13:25:1770#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5771#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1772#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1373#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5074#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3975#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5776#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2077#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5778#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3479#import "ios/chrome/browser/sessions/session_features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3480#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0581#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5782#import "ios/chrome/browser/ui/autofill/features.h"
83#import "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2184#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5085#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2486#import "ios/chrome/browser/ui/download/features.h"
Rohit Rao5aa791a2022-08-19 17:34:5387#import "ios/chrome/browser/ui/first_run/field_trial_constants.h"
Chris Lu438e1c052022-08-17 02:57:0088#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3589#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1490#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0391#import "ios/chrome/browser/ui/ntp/field_trial_constants.h"
adamta273568472020-12-04 23:53:5792#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0193#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4994#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4595#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2696#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1997#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Ewann Pelle155595a2022-12-27 08:46:1798#import "ios/chrome/browser/ui/tab_switcher/tab_grid/pinned_tabs/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2899#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:57100#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17101#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57102#import "ios/chrome/browser/web/features.h"
103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57111#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
118#if !defined(__has_feature) || !__has_feature(objc_arc)
119#error "This file requires ARC support."
120#endif
sdefresne14900ee2015-11-27 14:43:21121
elawrence816f6790e2017-06-16 18:19:28122using flags_ui::FeatureEntry;
123
sdefresne14900ee2015-11-27 14:43:21124namespace {
Emily Starkbafa9062017-12-27 15:22:46125
Olivier Robin3d60411622018-02-23 10:03:22126const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
129 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
130 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
131 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
132 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
133 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
134 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
135 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
136};
137
Nohemi Fernandezc00842a2021-07-26 11:47:34138const FeatureEntry::Choice
139 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
140 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
141 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
142 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
143 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
144};
145
Stepan Khapugincc4e9842019-01-23 13:38:13146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
160
161const FeatureEntry::FeatureVariation
162 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
163 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13177
Stepan Khapuginbac467e2022-05-06 21:11:54178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
184
185const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
186 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
187 nullptr},
188 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
189 nullptr},
190 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
191 nullptr},
192};
193
Christian Xucf26d562022-07-06 09:28:36194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
200
201const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
202 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
203 nullptr},
204 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
205 nullptr},
206 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
207 nullptr},
208};
209
Cheick Cissef37087902022-10-07 19:01:41210const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
211 {kWhatsNewModuleBasedLayoutParam, "true"}};
212
213const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
214 {"Display module layout", kWhatsNewModuleLayout,
215 std::size(kWhatsNewModuleLayout), nullptr},
216};
217
Caitlin Fischer37e01232019-05-24 13:05:45218const FeatureEntry::FeatureParam
219 kAutofillUseMobileLabelDisambiguationShowAll[] = {
220 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
221 autofill::features::
222 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
223const FeatureEntry::FeatureParam
224 kAutofillUseMobileLabelDisambiguationShowOne[] = {
225 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
226 autofill::features::
227 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
228
229const FeatureEntry::FeatureVariation
230 kAutofillUseMobileLabelDisambiguationVariations[] = {
231 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53232 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45233 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53234 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45235
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10236const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59237 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
238 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
239const FeatureEntry::FeatureVariation
240 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
241 {"Remind me later",
242 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53243 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59244 nullptr}};
245
Mohammad Refaatab6bee62022-05-16 16:31:15246const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47247 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
248 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15249const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47250 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
251 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
252
Mohammad Refaatab6bee62022-05-16 16:31:15253const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
254 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
255 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
256 {"Compact", kDiscoverFeedTopSyncPromoCompact,
257 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
258
gogerald53c6e7a2021-04-15 22:07:35259const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08260 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35261 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
262const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08263 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35264 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
265const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08266 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35267 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
268const FeatureEntry::FeatureParam
269 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
270 {kStartSurfaceShrinkLogoParam, "true"},
271 {kStartSurfaceReturnToRecentTabParam, "true"},
272 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
273const FeatureEntry::FeatureParam
274 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
275 {kStartSurfaceHideShortcutsParam, "true"},
276 {kStartSurfaceReturnToRecentTabParam, "true"},
277 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
278const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08279 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35280 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
281const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
282 {kStartSurfaceHideShortcutsParam, "true"},
283 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
284const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08285 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35286 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
287const FeatureEntry::FeatureParam
288 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
289 {kStartSurfaceShrinkLogoParam, "true"},
290 {kStartSurfaceReturnToRecentTabParam, "true"},
291 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
292const FeatureEntry::FeatureParam
293 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
294 {kStartSurfaceHideShortcutsParam, "true"},
295 {kStartSurfaceReturnToRecentTabParam, "true"},
296 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08297
gogerald0e39e3aa2021-02-10 18:41:23298const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35299 {"10s:Show Return to Recent Tab tile",
300 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53301 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35302 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53303 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35304 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53305 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35306 {"10s:Shrink Logo and show Return to Recent Tab tile",
307 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53308 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35309 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
310 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53311 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35312 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53313 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35314 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53315 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35316 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53317 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35318 {"1h:Shrink Logo and show Return to Recent Tab tile",
319 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53320 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35321 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
322 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53323 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08324};
gogerald0e39e3aa2021-02-10 18:41:23325
Chris Lu8e308dc2022-09-06 16:59:40326const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
327 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
328const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57329 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40330 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
331
332const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
333 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
334 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57335 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40336 std::size(kModuleRefreshNoHeaders), nullptr},
337};
338
Ed Chin91e44992022-07-27 13:42:34339#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04340// Feed Background Refresh Feature Params
Ed Chin321b8fe2022-08-16 07:02:01341const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04342 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
343 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01344 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04345 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01346const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04347 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
348 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01349 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04350 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01351const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04352 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
353 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01354 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04355 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01356const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04357 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
358 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01359 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04360 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01361const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04362 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
363 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01364 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
365 {kBackgroundRefreshIntervalInSeconds, "0"}};
366const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
368 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
370 {kBackgroundRefreshIntervalInSeconds, "0"}};
371const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
372 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
373 {kEnableRecurringBackgroundRefreshSchedule, "false"},
374 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
375 {kBackgroundRefreshIntervalInSeconds, "0"}};
376const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
377 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
378 {kEnableRecurringBackgroundRefreshSchedule, "true"},
379 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
380 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04381
382// Feed Background Refresh Feature Variations
Ed Chin59f617b2022-07-19 22:12:04383const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01384 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
385 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
386 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
387 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
388 {"1hr Interval 1hr Max Age Recurring",
389 kOneHourIntervalOneHourMaxAgeRecurring,
390 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
391 {"4hr Interval 6hr Max Age Recurring",
392 kFourHourIntervalSixHourMaxAgeRecurring,
393 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
394 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
395 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
396 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
397 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
398 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
399 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
400 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
401 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04402};
Ed Chin91e44992022-07-27 13:42:34403#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04404
Chris Luc9a5cb12022-07-20 16:11:39405const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58406 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39407const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58408 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39409const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
410 {kTrendingQueriesHideShortcutsParam, "false"},
411 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58412};
Chris Luc9a5cb12022-07-20 16:11:39413
414const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
415 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
416 std::size(kTrendingQueriesEnableAllUsers), nullptr},
417 {"Enabled All Users Hide Shortcuts",
418 kTrendingQueriesEnableAllUsersHideShortcuts,
419 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
420 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
421 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39422};
423
Jérôme Lebelc46af972022-10-04 15:16:32424const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncA[] = {
jlebel041fc1c2022-03-04 12:53:30425 {kNewMobileIdentityConsistencyFREParam,
Jérôme Lebelc46af972022-10-04 15:16:32426 kNewMobileIdentityConsistencyFREParamTangibleSyncA}};
427const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncB[] = {
428 {kNewMobileIdentityConsistencyFREParam,
429 kNewMobileIdentityConsistencyFREParamTangibleSyncB}};
430const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncC[] = {
431 {kNewMobileIdentityConsistencyFREParam,
432 kNewMobileIdentityConsistencyFREParamTangibleSyncC}};
jlebel041fc1c2022-03-04 12:53:30433const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
434 {kNewMobileIdentityConsistencyFREParam,
435 kNewMobileIdentityConsistencyFREParamTwoSteps}};
Jérôme Lebelce6f7162022-11-07 19:07:32436const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncD[] = {
437 {kNewMobileIdentityConsistencyFREParam,
438 kNewMobileIdentityConsistencyFREParamTangibleSyncD}};
439const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncE[] = {
440 {kNewMobileIdentityConsistencyFREParam,
441 kNewMobileIdentityConsistencyFREParamTangibleSyncE}};
442const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncF[] = {
443 {kNewMobileIdentityConsistencyFREParam,
444 kNewMobileIdentityConsistencyFREParamTangibleSyncF}};
jlebel041fc1c2022-03-04 12:53:30445const FeatureEntry::FeatureVariation
446 kNewMobileIdentityConsistencyFREVariations[] = {
Jérôme Lebelc46af972022-10-04 15:16:32447 {"new FRE with tangible sync A", kNewMICEFREWithTangibleSyncA,
448 std::size(kNewMICEFREWithTangibleSyncA), nullptr},
449 {"new FRE with tangible sync B", kNewMICEFREWithTangibleSyncB,
450 std::size(kNewMICEFREWithTangibleSyncB), nullptr},
451 {"new FRE with tangible sync C", kNewMICEFREWithTangibleSyncC,
452 std::size(kNewMICEFREWithTangibleSyncC), nullptr},
Jérôme Lebelce6f7162022-11-07 19:07:32453 {"new FRE with tangible sync D", kNewMICEFREWithTangibleSyncD,
454 std::size(kNewMICEFREWithTangibleSyncD), nullptr},
455 {"new FRE with tangible sync E", kNewMICEFREWithTangibleSyncE,
456 std::size(kNewMICEFREWithTangibleSyncE), nullptr},
457 {"new FRE with tangible sync F", kNewMICEFREWithTangibleSyncF,
458 std::size(kNewMICEFREWithTangibleSyncF), nullptr},
jlebel041fc1c2022-03-04 12:53:30459 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
460 std::size(kNewMICEFREWithTwoSteps), nullptr}};
461
Louis Romero023cc5052022-04-08 23:29:39462const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
463 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01464const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
465 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
466const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
467 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
468const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
469 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
470const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39471 {"Target Highlight", kBubbleRichIPHTargetHighlight,
472 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01473 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
474 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
475 {"Dismissal and rich content", kBubbleRichIPHRich,
476 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39477 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01478 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
479};
480
Igor Ruvinov44fed9f2022-06-10 22:51:42481const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
482const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
483 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
484 nullptr}};
485
Aliona DANGLA00ae7db2022-10-04 16:58:50486const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58487 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49488const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58489 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49490const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58491 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
492
Aliona DANGLAa5257ccc2022-08-29 14:01:49493const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50494 {"With legacy download", kOpenInDownloadInShareButton,
495 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49496 {"With WKDownload", kOpenInDownloadWithWKDownload,
497 std::size(kOpenInDownloadWithWKDownload), nullptr},
498 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
499 nullptr},
500};
501
Ewann Pelle3774cac532022-11-15 10:12:37502const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
503 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
Ewann Pelleca00bab2022-12-16 14:49:39504const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowBottomPosition[] = {
505 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowBottomParam}};
506const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowTopPosition[] = {
507 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowTopParam}};
Ewann Pelle3774cac532022-11-15 10:12:37508
509const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
510 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
511 std::size(kEnablePinnedTabsBottomPosition), nullptr},
Ewann Pelleca00bab2022-12-16 14:49:39512 {"overflow + bottom pinned tabs", kEnablePinnedTabsOverflowBottomPosition,
513 std::size(kEnablePinnedTabsOverflowBottomPosition), nullptr},
514 {"overflow + top pinned tabs", kEnablePinnedTabsOverflowTopPosition,
515 std::size(kEnablePinnedTabsOverflowTopPosition), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37516};
517
ginnnnnnny591a4972022-09-01 16:10:27518const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
519 {autofill::features::kAutofillBrandingIOSParam, "true"}};
520const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
521 {"(Monotone)", kAutofillBrandingIOSMonotone,
522 std::size(kAutofillBrandingIOSMonotone), nullptr}};
523
Scott Yodercb2fe632022-09-12 15:28:35524const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26525 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35526const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
527 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
528 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
529
Benjamin Williamsaa8da8142022-11-14 19:51:03530const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
531 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
532const FeatureEntry::FeatureVariation
533 kIOSPopularSitesImprovedSuggestionsVariations[] = {
534 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
535 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
536
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28537const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
538 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
539const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
540 {"with search result page", kEnableExperienceKitMapsWithSrp,
541 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
542
adamta3811f9182022-10-24 17:49:33543const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
544 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
545 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
546const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
547 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
548 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
549
550const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
551 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
552 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
553 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
554 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
555
Cooper Knaak1e026562017-07-26 05:22:28556// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21557// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28558// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
559// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21560// macro for this type supplying the command line to the macro.
561// . MULTI_VALUE: a list of choices, the first of which should correspond to a
562// deactivated state for this lab (i.e. no command line option). To specify
563// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
564// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28565// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
566// either enabled, disabled, or uses the default value of the associated
567// base::Feature instance. To specify this type of entry use the macro
568// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
569// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
570// base::Feature instance. Choices corresponding to the default state, a
571// universally enabled state, and a universally disabled state are
572// automatically included. To specify this type of entry use the macro
573// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
574// the array of choices.
575//
sdefresne14900ee2015-11-27 14:43:21576// See the documentation of FeatureEntry for details on the fields.
577//
578// When adding a new choice, add it to the end of the list.
579const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28580 {"in-product-help-demo-mode-choice",
581 flag_descriptions::kInProductHelpDemoModeName,
582 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
583 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23584 feature_engagement::kIPHDemoMode,
585 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09586 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22587 {"enable-autofill-credit-card-upload",
588 flag_descriptions::kAutofillCreditCardUploadName,
589 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24590 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23591 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
592 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
593 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51594 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23595 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
596 {"wallet-service-use-sandbox",
597 flag_descriptions::kWalletServiceUseSandboxName,
598 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
599 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
600 autofill::switches::kWalletServiceUseSandbox,
601 "1",
602 autofill::switches::kWalletServiceUseSandbox,
603 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59604 {"show-autofill-type-predictions",
605 flag_descriptions::kShowAutofillTypePredictionsName,
606 flag_descriptions::kShowAutofillTypePredictionsDescription,
607 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46608 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22609 {"autofill-ios-delay-between-fields",
610 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
611 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
612 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20613 {"fullscreen-promos-manager",
614 flag_descriptions::kFullscreenPromosManagerName,
615 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
616 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05617 {"fullscreen-promos-manager-skip-internal-limits",
618 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
619 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
620 flags_ui::kOsIos,
621 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14622 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53623 flag_descriptions::kFullscreenSmoothScrollingName,
624 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
625 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06626 {"webpage-default-zoom-from-dynamic-type",
627 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
628 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
629 flags_ui::kOsIos,
630 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56631 {"webpage-alternative-text-zoom",
632 flag_descriptions::kWebPageAlternativeTextZoomName,
633 flag_descriptions::kWebPageAlternativeTextZoomDescription,
634 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34635 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
636 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
637 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28638 {"toolbar-container", flag_descriptions::kToolbarContainerName,
639 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
640 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13641 {"omnibox-ui-max-autocomplete-matches",
642 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
643 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
644 flags_ui::kOsIos,
645 FEATURE_WITH_PARAMS_VALUE_TYPE(
646 omnibox::kUIExperimentMaxAutocompleteMatches,
647 kOmniboxUIMaxAutocompleteMatchesVariations,
648 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35649 {"omnibox-local-history-zero-suggest-beyond-ntp",
650 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
651 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
652 flags_ui::kOsIos,
653 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54654 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
655 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
656 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
657 kOmniboxMaxZPSMatchesVariations,
658 "OmniboxMaxZPSVariations")},
Caitlin Fischer43edd90a2019-05-01 13:24:30659 {"autofill-use-mobile-label-disambiguation",
660 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
661 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
662 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45663 FEATURE_WITH_PARAMS_VALUE_TYPE(
664 autofill::features::kAutofillUseMobileLabelDisambiguation,
665 kAutofillUseMobileLabelDisambiguationVariations,
666 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46667 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
668 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30669 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48670 {"force-startup-signin-promo",
671 flag_descriptions::kForceStartupSigninPromoName,
672 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29673 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06674 {"identity-status-consistency",
675 flag_descriptions::kIdentityStatusConsistencyName,
676 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
677 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22678 {"restore-session-from-cache",
679 flag_descriptions::kRestoreSessionFromCacheName,
680 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49681 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59682 {"autofill-save-card-dismiss-on-navigation",
683 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
684 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
685 flags_ui::kOsIos,
686 FEATURE_VALUE_TYPE(
687 autofill::features::kAutofillSaveCardDismissOnNavigation)},
Roberto Mourab87b9722020-06-17 17:12:09688 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
689 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
690 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41691 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
692 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
693 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
jlebel041fc1c2022-03-04 12:53:30694 {"new-mobile-identity-consistency-fre",
695 flag_descriptions::kNewMobileIdentityConsistencyFREName,
696 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
697 flags_ui::kOsIos,
698 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
699 kNewMobileIdentityConsistencyFREVariations,
ginnnnnnny46435132022-06-01 16:06:04700 kIOSMICeAndDefaultBrowserTrialName)},
Sylvain Defresne9c107082020-10-27 16:39:13701#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45702 {"screen-time-integration-ios",
703 flag_descriptions::kScreenTimeIntegrationName,
704 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
705 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13706#endif
Nazerke3e993f72020-09-21 13:00:06707 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
708 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
709 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55710 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
711 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
712 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14713 {"default-browser-fullscreen-promo-experiment",
714 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
715 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
716 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59717 FEATURE_WITH_PARAMS_VALUE_TYPE(
718 kDefaultBrowserFullscreenPromoExperiment,
719 kDefaultBrowserFullscreenPromoExperimentVariations,
720 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11721 {"ios-shared-highlighting-color-change",
722 flag_descriptions::kIOSSharedHighlightingColorChangeName,
723 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07724 flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34726 {"ios-shared-highlighting-v2",
727 flag_descriptions::kIOSSharedHighlightingV2Name,
728 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
729 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45730 {"omnibox-new-textfield-implementation",
731 flag_descriptions::kOmniboxNewImplementationName,
732 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
733 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26734 {"omnibox-on-focus-suggestions-contextual-web",
735 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
736 flag_descriptions::
737 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
738 flags_ui::kOsIos,
739 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
740 {"omnibox-on-focus-suggestions-srp",
741 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
742 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
743 flags_ui::kOsIos,
744 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapuginecf128a92022-08-30 11:23:15745 {"omnibox-fuzzy-url-suggestions",
746 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
747 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
748 flags_ui::kOsIos,
749 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19750 {"start-surface", flag_descriptions::kStartSurfaceName,
751 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23752 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
753 kStartSurfaceVariations,
754 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28755 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
756 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
757 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42758 {"autofill-address-verification-in-save-prompt",
759 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
760 flag_descriptions::
761 kEnableAutofillAddressSavePromptAddressVerificationDescription,
762 flags_ui::kOsIos,
763 FEATURE_VALUE_TYPE(
764 autofill::features::
765 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25766 {"filling-across-affiliated-websites",
767 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
768 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
769 flags_ui::kOsIos,
770 FEATURE_VALUE_TYPE(
771 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19772 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
773 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
774 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33775 {"update-history-entry-points-in-incognito",
776 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
777 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
778 flags_ui::kOsIos,
779 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
Mikel Astiz850b0fe2021-06-16 09:47:27780 {"sync-trusted-vault-passphrase-promo",
781 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
782 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
783 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51784 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Nohemi Fernandezc00842a2021-07-26 11:47:34785 {"wait-threshold-seconds-for-capabilities-api",
786 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
787 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
788 flags_ui::kOsIos,
789 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23790 {"autofill-fill-merchant-promo-code-fields",
791 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
792 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
793 flags_ui::kOsIos,
794 FEATURE_VALUE_TYPE(
795 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03796 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
797 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
798 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18799 {"new-overflow-menu-alternate-iph",
800 flag_descriptions::kNewOverflowMenuAlternateIPHName,
801 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
802 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24803 {"use-lens-to-search-for-image",
804 flag_descriptions::kUseLensToSearchForImageName,
805 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44806 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22807 {"enable-lens-in-home-screen-widget",
808 flag_descriptions::kEnableLensInHomeScreenWidgetName,
809 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
810 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
811 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
812 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
813 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
814 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
815 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
816 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Jason Hu67cfb0f2022-11-14 20:21:44817 {"enable-lens-in-omnibox-copied-image",
818 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
819 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
820 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40821 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23822 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
823 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40824 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23825 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03826 {"enable-disco-feed-endpoint",
827 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
828 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
829 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11830 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15831 {"enable-discover-feed-top-sync-promo",
832 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
833 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
834 flags_ui::kOsIos,
835 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
836 kDiscoverFeedTopSyncPromoVariations,
837 "EnableDiscoverFeedTopSyncPromo")},
Tommy Martino7393d762021-10-12 17:59:28838 {"shared-highlighting-amp",
839 flag_descriptions::kIOSSharedHighlightingAmpName,
840 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28842 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42843 commerce::flag_descriptions::kCommercePriceTrackingName,
844 commerce::flag_descriptions::kCommercePriceTrackingDescription,
845 flags_ui::kOsIos,
846 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
847 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15848 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06849 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
850 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
851 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54852 {"ntp-view-hierarchy-repair",
853 flag_descriptions::kNTPViewHierarchyRepairName,
854 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20855 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26856 {"synthesized-restore-session",
857 flag_descriptions::kSynthesizedRestoreSessionName,
858 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
859 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18860 {"ios-media-permissions-control",
861 flag_descriptions::kMediaPermissionsControlName,
862 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
863 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34864 {"enable-save-session-tabs-in-separate-files",
865 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
866 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
867 flags_ui::kOsIos,
868 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Ewann8c7aadc2022-05-19 15:41:05869 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
870 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
871 FEATURE_VALUE_TYPE(kUseSFSymbols)},
David Jeanc2b88ab602022-08-08 14:52:51872 {"ios-webpage-intent-annotations",
873 flag_descriptions::kEnableWebPageAnnotationsName,
874 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26876 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
877 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01879 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
880 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43882 {"enable-tailored-security-integration",
883 flag_descriptions::kTailoredSecurityIntegrationName,
884 flag_descriptions::kTailoredSecurityIntegrationDescription,
885 flags_ui::kOsIos,
886 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26887 {"autofill-enable-card-product-name",
888 flag_descriptions::kAutofillEnableCardProductNameName,
889 flag_descriptions::kAutofillEnableCardProductNameDescription,
890 flags_ui::kOsIos,
891 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00892 {"send-tab-to-self-signin-promo",
893 flag_descriptions::kSendTabToSelfSigninPromoName,
894 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
895 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Christian Xubd60c4b72022-03-22 15:25:01896 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
897 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
898 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
899 kBubbleRichIPHVariations,
900 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22901 {"autofill-enforce-delays-in-strike-database",
902 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
903 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
904 flags_ui::kOsIos,
905 FEATURE_VALUE_TYPE(
906 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41907 {"autofill-upstream-allow-additional-email-domains",
908 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
909 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
910 flags_ui::kOsIos,
911 FEATURE_VALUE_TYPE(
912 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
913 {"autofill-upstream-allow-all-email-domains",
914 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
915 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
916 flags_ui::kOsIos,
917 FEATURE_VALUE_TYPE(
918 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52919 {"enable-download-service-foreground-session",
920 flag_descriptions::kDownloadServiceForegroundSessionName,
921 flag_descriptions::kDownloadServiceForegroundSessionDescription,
922 flags_ui::kOsIos,
923 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23924 {"enable-tflite-language-detection",
925 flag_descriptions::kTFLiteLanguageDetectionName,
926 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
927 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20928 {"optimization-guide-debug-logs",
929 flag_descriptions::kOptimizationGuideDebugLogsName,
930 flag_descriptions::kOptimizationGuideDebugLogsDescription,
931 flags_ui::kOsIos,
932 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Olivier Robinffe767c2022-04-21 13:13:23933 {"optimization-guide-model-downloading",
934 flag_descriptions::kOptimizationGuideModelDownloadingName,
935 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
936 flags_ui::kOsIos,
937 FEATURE_VALUE_TYPE(
938 optimization_guide::features::kOptimizationGuideModelDownloading)},
939 {"optimization-target-prediction",
940 flag_descriptions::kOptimizationTargetPredictionName,
941 flag_descriptions::kOptimizationTargetPredictionDescription,
942 flags_ui::kOsIos,
943 FEATURE_VALUE_TYPE(
944 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54945 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
946 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
947 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
948 {"sync-standalone-invalidations-wallet-and-offer",
949 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
950 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
951 flags_ui::kOsIos,
952 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01953 {"suggestions-scrolling-ipad",
954 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
955 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
956 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00957 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
958 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
959 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:22960 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
961 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
962 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25963 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
964 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:55966 {"experience-kit-apple-calendar",
967 flag_descriptions::kAppleCalendarExperienceKitName,
968 flag_descriptions::kAppleCalendarExperienceKitDescription,
969 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:39970 {"enable-expkit-calendar-text-classifier",
971 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
972 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
973 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:08974 {"enable-expkit-text-classifier",
975 flag_descriptions::kEnableExpKitTextClassifierName,
976 flag_descriptions::kEnableExpKitTextClassifierDescription,
977 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:18978 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
979 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28980 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
981 kEnableExperienceKitMapsVariations,
982 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:05983 {"enable-long-press-surrounding-text",
984 flag_descriptions::kLongPressSurroundingTextName,
985 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
986 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:01987 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
988 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
989 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:25990 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
991 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
992 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:22993 {"smart-sorting-new-overflow-menu",
994 flag_descriptions::kSmartSortingNewOverflowMenuName,
995 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
996 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Scott Yoder10493562022-06-28 17:37:44997 {"new-overflow-menu-share-chrome-action",
998 flag_descriptions::kNewOverflowMenuShareChromeActionName,
999 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1000 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekled46a36982022-05-09 20:32:421001 {"autofill-enable-ranking-formula",
1002 flag_descriptions::kAutofillEnableRankingFormulaName,
1003 flag_descriptions::kAutofillEnableRankingFormulaDescription,
1004 flags_ui::kOsIos,
1005 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)},
Alexander Tekleb4643812023-01-06 23:12:301006 {"autofill-enable-ranking-formula-address-profiles",
1007 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1008 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1009 flags_ui::kOsIos,
1010 FEATURE_VALUE_TYPE(
1011 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Sergio Collazos58558712022-05-18 17:24:021012 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1013 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1014 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021015 {"enable-feed-bottom-sign-in-promo",
1016 flag_descriptions::kEnableFeedBottomSignInPromoName,
1017 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1018 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1019 {"enable-feed-card-menu-sign-in-promo",
1020 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1021 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1022 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271023 {"content-suggestions-ui-module-refresh",
1024 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1025 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401026 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581027 FEATURE_WITH_PARAMS_VALUE_TYPE(
1028 kContentSuggestionsUIModuleRefresh,
1029 kModuleRefreshVariations,
1030 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571031 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1032 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061034 {"default-browser-intents-show-settings",
1035 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1036 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1037 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451038 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1039 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421040 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1041 kDmTokenDeletionVariation,
1042 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191043 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1044 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1045 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291046 {"ios-password-manager-cross-origin-iframe-support",
1047 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1048 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1049 flags_ui::kOsIos,
1050 FEATURE_VALUE_TYPE(password_manager::features::
1051 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031052 {"ios-popular-sites-improved-suggestions",
1053 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1054 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1055 flags_ui::kOsIos,
1056 FEATURE_WITH_PARAMS_VALUE_TYPE(
1057 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1058 kIOSPopularSitesImprovedSuggestionsVariations,
1059 field_trial_constants::
1060 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141061 {"omnibox-adaptive-suggestions-count",
1062 flag_descriptions::kAdaptiveSuggestionsCountName,
1063 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1064 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201065 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1066 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581067 FEATURE_WITH_PARAMS_VALUE_TYPE(
1068 kTrendingQueriesModule,
1069 kTrendingQueriesModuleVariations,
1070 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321071 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191072 flag_descriptions::kAutofillParseIBANFieldsName,
1073 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1074 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361075 {"autofill-enable-new-card-unmask-prompt-view",
1076 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1077 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1078 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271079 FEATURE_VALUE_TYPE(
1080 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241081 {"omnibox-zero-suggest-prefetching",
1082 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1083 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1084 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451085 {"omnibox-zero-suggest-prefetching-on-srp",
1086 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1087 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1088 flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1090 {"omnibox-zero-suggest-prefetching-on-web",
1091 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1092 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1093 flags_ui::kOsIos,
1094 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471095 {"omnibox-zero-suggest-in-memory-caching",
1096 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1097 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1098 flags_ui::kOsIos,
1099 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351100 {"omnibox-on-device-tail-suggestions",
1101 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1102 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1103 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391104 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1105 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501106 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491107 {"enable-sync-history-datatype",
1108 flag_descriptions::kSyncEnableHistoryDataTypeName,
1109 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1110 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361111 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1112 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1113 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1114 kOmniboxMaxURLMatchesVariations,
1115 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061116 {"metrickit-non-crash-reports",
1117 flag_descriptions::kMetrickitNonCrashReportName,
1118 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1119 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371120 {"autofill-enable-remade-downstream-metrics",
1121 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1122 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1123 flags_ui::kOsIos,
1124 FEATURE_VALUE_TYPE(
1125 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551126 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1127 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1128 flag_descriptions::
1129 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1130 flags_ui::kOsIos,
1131 FEATURE_VALUE_TYPE(
1132 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341133#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1134 {"feed-background-refresh-ios",
1135 flag_descriptions::kFeedBackgroundRefreshName,
1136 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1137 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1138 kFeedBackgroundRefreshVariations,
1139 "FeedBackgroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191140 {"omnibox-keyboard-paste-button",
1141 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1142 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1143 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin91e44992022-07-27 13:42:341144#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Aliona DANGLAa5257ccc2022-08-29 14:01:491145 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1146 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1147 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1148 kOpenInDownloadVariations,
1149 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171150 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1151 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411152 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1153 kWhatsNewLayoutVariations,
1154 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271155 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1156 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1157 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1158 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051159 "AutofillBrandingIOS")},
1160 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1161 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1162 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351163 {"ios-new-post-restore-experience",
1164 flag_descriptions::kIOSNewPostRestoreExperienceName,
1165 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1166 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261167 FEATURE_WITH_PARAMS_VALUE_TYPE(
1168 post_restore_signin::features::kIOSNewPostRestoreExperience,
1169 kIOSNewPostRestoreExperienceVariations,
1170 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021171 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1172 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1173 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501174 {"enable-tflite-language-detection-ignore",
1175 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1176 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1177 flags_ui::kOsIos,
1178 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141179 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1180 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1181 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471182 {"enable-check-visibility-on-attention-log-start",
1183 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1184 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1185 flags_ui::kOsIos,
1186 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1187 {"enable-refine-data-source-reload-reporting",
1188 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1189 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1190 flags_ui::kOsIos,
1191 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Noémie St-Ongeac7a84b2022-10-14 22:32:521192 {"enable-compromised-passwords-muting",
1193 flag_descriptions::kEnableCompromisedPasswordsMutingName,
1194 flag_descriptions::kEnableCompromisedPasswordsMutingDescription,
1195 flags_ui::kOsIos,
1196 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041197 {"enable-passwords-account-storage",
1198 flag_descriptions::kEnablePasswordsAccountStorageName,
1199 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1200 flags_ui::kOsIos,
1201 FEATURE_VALUE_TYPE(
1202 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331203 {"enable-default-following-feed-sort-type",
1204 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1205 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1206 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201207 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331208 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201209 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131210 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1211 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1212 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Gauthier Ambardc0410632022-11-16 08:45:351213 {"tab-grid-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011214 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1215 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371216 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1217 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1218 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1219 kEnablePinnedTabsVariations,
1220 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031221 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1222 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411224 {"credential-provider-extension-promo",
1225 flag_descriptions::kCredentialProviderExtensionPromoName,
1226 flag_descriptions::kCredentialProviderExtensionPromoDescription,
1227 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kCredentialProviderExtensionPromo)},
Nicolas MacBethfb43e152022-11-28 19:31:521228 {"default-browser-blue-dot-promo",
1229 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1230 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1231 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271232 {"ios-force-translate-enabled",
1233 flag_descriptions::kIOSForceTranslateEnabledName,
1234 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1235 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251236 {"iph-price-notifications-while-browsing",
1237 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1238 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1239 flags_ui::kOsIos,
1240 FEATURE_VALUE_TYPE(
1241 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411242 {"autofill-offer-to-save-card-with-same-last-four",
1243 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1244 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1245 flags_ui::kOsIos,
1246 FEATURE_VALUE_TYPE(
1247 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Jérôme Lebel7b4ef022022-12-23 12:15:141248 {"enable-new-bookmarks-implementation",
1249 flag_descriptions::kEnableNewBookmarksImplementationName,
1250 flag_descriptions::kEnableNewBookmarksImplementationDescription,
1251 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableNewBookmarksImplementation)},
Christian Xu588330f32023-01-05 10:51:041252 {"omnibox-multiline-search-suggest",
1253 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1254 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1255 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501256 {"autofill-suggest-server-card-instead-of-local-card",
1257 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1258 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1259 flags_ui::kOsIos,
1260 FEATURE_VALUE_TYPE(
1261 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
1262
Hira Mahmoodb0e5f412022-09-01 19:41:051263};
sdefresne14900ee2015-11-27 14:43:211264
Rohit Raobed794c2020-04-27 15:27:451265bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1266 return false;
1267}
1268
1269flags_ui::FlagsState& GetGlobalFlagsState() {
1270 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1271 nullptr);
1272 return *flags_state;
1273}
David Jean5ca263c2021-08-18 09:19:301274// Creates the experimental test policies map, used by AsyncPolicyLoader and
1275// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341276NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211277 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1278
Guillaume Jenkins25e9bd72020-08-27 17:39:061279 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551280 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061281 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551282
Guillaume Jenkins25e9bd72020-08-27 17:39:061283 // Set some sample policy values for testing if EnableSamplePolicies is set to
1284 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401285 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551286 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011287 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1288
Guillaume Jenkinseeb7007c2020-06-25 22:55:401289 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1290
1291 // 2 = Disable all variations
1292 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1293
1294 // 2 = Do not allow any site to show popups
1295 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1296
Tina Wang5abee802020-07-29 23:09:521297 // Set default search engine.
1298 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1299 @YES,
1300 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1301 @"http://www.google.com/search?q={searchTerms}",
1302 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021303 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521304
Tina Wang89068c82020-10-29 15:51:501305 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1306
Gauthier Ambard21b23702021-04-16 16:11:271307 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1308
Guillaume Jenkinseeb7007c2020-06-25 22:55:401309 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011310
1311 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531312
1313 // 2 = Enhanced safe browsing protection
1314 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1315
1316 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291317
1318 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551319 }];
1320 }
1321
Ewann227a3c02021-04-19 12:04:541322 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041323 NSString* sync_policy_key =
1324 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301325 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541326 }
Ewann227a3c02021-04-19 12:04:541327
Ewann570a6302021-08-17 07:22:421328 // SyncTypesListDisabled policy.
1329 NSString* Sync_types_list_disabled_key =
1330 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1331 NSMutableArray* Sync_types_list_disabled_values =
1332 [[NSMutableArray alloc] init];
1333 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1334 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1335 }
1336 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1337 [Sync_types_list_disabled_values addObject:@"readingList"];
1338 }
1339 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1340 [Sync_types_list_disabled_values addObject:@"preferences"];
1341 }
1342 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1343 [Sync_types_list_disabled_values addObject:@"passwords"];
1344 }
1345 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1346 [Sync_types_list_disabled_values addObject:@"autofill"];
1347 }
1348 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1349 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1350 }
1351 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1352 [Sync_types_list_disabled_values addObject:@"tabs"];
1353 }
1354 if ([Sync_types_list_disabled_values count]) {
1355 [testing_policies addEntriesFromDictionary:@{
1356 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1357 }];
Ewann570a6302021-08-17 07:22:421358 }
1359
Gauthier Ambard073eaa92021-11-22 15:24:131360 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521361 NSString* incognito_policy_key =
1362 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1363 NSInteger incognito_mode_availability =
1364 [defaults integerForKey:incognito_policy_key];
1365 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521366 [testing_policies addEntriesFromDictionary:@{
1367 incognito_policy_key : @(incognito_mode_availability),
1368 }];
1369 }
1370
Ewann40a8f8a2021-07-29 10:01:201371 NSString* restriction_pattern =
1372 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1373 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291374 NSString* restrict_key =
1375 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201376 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291377 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201378 }];
1379 }
1380
Vincent Boisselle19200bc2021-09-01 17:58:251381 // If the sign-in policy is set (not "None"), add the policy key to the list
1382 // of enabled experimental policies, and set the value.
1383 NSString* const kSigninPolicyKey = @"BrowserSignin";
1384 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1385 if (signin_policy_mode) {
1386 // Remove the mode offset that was used to represent the unset policy.
1387 --signin_policy_mode;
1388 DCHECK(signin_policy_mode >= 0);
1389
Vincent Boisselle19200bc2021-09-01 17:58:251390 [testing_policies addEntriesFromDictionary:@{
1391 kSigninPolicyKey : @(signin_policy_mode),
1392 }];
1393 }
1394
Veronique Nguyen9b1044f2022-01-11 14:41:131395 // If the New Tab Page URL is set (not empty) add the value to the list of
1396 // test policies.
1397 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1398 if ([ntp_location length] > 0) {
1399 NSString* ntp_location_key =
1400 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1401 [testing_policies
1402 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571403 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131404 }
1405
Ali Juma9ec36d2b2022-03-28 14:53:121406 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1407 NSString* allow_backups_key =
1408 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1409 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1410 [allowed_experimental_policies addObject:allow_backups_key];
1411 }
1412
Guillaume Jenkins25e9bd72020-08-27 17:39:061413 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1414 // policy.
1415 if ([allowed_experimental_policies count] > 0) {
1416 [testing_policies setValue:allowed_experimental_policies
1417 forKey:base::SysUTF8ToNSString(
1418 policy::key::kEnableExperimentalPolicies)];
1419 }
1420
jlebel2eb40222022-05-06 11:15:421421 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1422 switch ([defaults integerForKey:metrics_reporting_key]) {
1423 case 1:
1424 // Metrics reporting forced.
1425 [testing_policies setValue:@(YES) forKey:metrics_reporting_key];
1426 break;
1427 case 2:
1428 // Metrics reporting disabled.
1429 [testing_policies setValue:@(NO) forKey:metrics_reporting_key];
1430 break;
1431 default:
1432 // Metrics reporting not managed.
1433 break;
1434 }
1435
David Jean6f85d44f2021-08-19 08:08:451436 // Warning: Add new flags to TestingPoliciesHash() below.
1437
David Jean5ca263c2021-08-18 09:19:301438 return testing_policies;
1439}
David Jean6f85d44f2021-08-19 08:08:451440
David Jean5ca263c2021-08-18 09:19:301441} // namespace
1442
Gauthier Ambard02dbf022022-08-23 08:28:471443// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301444void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1445 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1446
1447 // Set the UA flag if UseMobileSafariUA is enabled.
1448 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1449 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1450 // Chrome puts its product token.
1451 int32_t major = 0;
1452 int32_t minor = 0;
1453 int32_t bugfix = 0;
1454 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1455 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1456
1457 command_line->AppendSwitchASCII(switches::kUserAgent,
1458 web::BuildMobileUserAgent(product));
1459 }
1460
1461 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341462 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301463
1464 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1465 // Management to enabled and add the token to the list of policies.
1466 NSString* token_key =
1467 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1468 NSString* token = [defaults stringForKey:token_key];
1469
1470 if ([token length] > 0) {
1471 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1472 [testing_policies setValue:token forKey:token_key];
1473 }
1474
Guillaume Jenkins57606d72020-08-13 17:32:551475 // If some policies were set, commit them to the app's registration defaults.
1476 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401477 NSDictionary* registration_defaults =
1478 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1479 [defaults registerDefaults:registration_defaults];
1480 }
1481
sdefresne14900ee2015-11-27 14:43:211482 // Freeform commandline flags. These are added last, so that any flags added
1483 // earlier in this function take precedence.
1484 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1485 base::CommandLine::StringVector flags;
1486 // Append an empty "program" argument.
1487 flags.push_back("");
1488
1489 // The number of flags corresponds to the number of text fields in
1490 // Experimental.plist.
1491 const int kNumFreeformFlags = 5;
1492 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1493 NSString* key =
1494 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1495 NSString* flag = [defaults stringForKey:key];
1496 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331497 // iOS keyboard replaces -- with —, so undo that.
1498 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1499 withString:@"--"
1500 options:0
1501 range:NSMakeRange(0, 1)];
1502 // To make things easier, allow flags with no dashes by prepending them
1503 // here. This also allows for flags that just have one dash if they
1504 // exist.
1505 if (![flag hasPrefix:@"-"]) {
1506 flag = [@"--" stringByAppendingString:flag];
1507 }
sdefresne14900ee2015-11-27 14:43:211508 flags.push_back(base::SysNSStringToUTF8(flag));
1509 }
1510 }
1511
1512 base::CommandLine temp_command_line(flags);
1513 command_line->AppendArguments(temp_command_line, false);
1514 }
msardafc76f662017-02-24 12:46:281515
justincohendacc85d2017-06-28 23:34:101516 // Populate command line flag for 3rd party keyboard omnibox workaround.
1517 NSString* enableThirdPartyKeyboardWorkaround =
1518 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1519 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1520 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1521 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1522 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1523 }
1524
Sylvain Defresned3cd8d92022-01-18 13:35:081525 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211526}
1527
sdefresne14900ee2015-11-27 14:43:211528void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1529 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181530 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111531 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531532 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211533}
1534
jkrcalbf073372016-07-29 07:21:311535std::vector<std::string> RegisterAllFeatureVariationParameters(
1536 flags_ui::FlagsStorage* flags_storage,
1537 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181538 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1539 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311540}
1541
sdefresne14900ee2015-11-27 14:43:211542void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1543 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501544 base::Value::List& supported_entries,
1545 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181546 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211547 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511548 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211549}
1550
1551void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1552 const std::string& internal_name,
1553 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181554 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1555 enable);
sdefresne14900ee2015-11-27 14:43:211556}
1557
1558void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181559 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211560}
1561
1562namespace testing {
1563
Elly Fong-Jones323ab1092021-08-23 22:36:311564base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1565 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531566 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211567}
1568
1569} // namespace testing