blob: 850fe61b35d1d83ec4c0f025853ed7411c1f8e4f [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
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"
Quentin Pubert154fc6a2023-01-09 15:58:5870#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1771#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5772#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1773#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1374#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5075#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3976#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2078#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3480#import "ios/chrome/browser/sessions/session_features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3481#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0582#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5783#import "ios/chrome/browser/ui/autofill/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"
Louis Romero93e9b50a2023-01-26 01:46:1298#import "ios/chrome/browser/ui/tab_switcher/tab_grid/inactive_tabs/features.h"
Ewann Pelle155595a2022-12-27 08:46:1799#import "ios/chrome/browser/ui/tab_switcher/tab_grid/pinned_tabs/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:28100#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17102#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57103#import "ios/chrome/browser/web/features.h"
104#import "ios/chrome/grit/ios_strings.h"
105#import "ios/components/security_interstitials/https_only_mode/feature.h"
106#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
107#import "ios/web/common/features.h"
108#import "ios/web/common/user_agent.h"
109#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21110
Sylvain Defresne9c107082020-10-27 16:39:13111#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57112#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13113#endif
114
sdefresne14900ee2015-11-27 14:43:21115#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57116#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22117#endif
stkhapuginc1be1792016-12-13 14:30:53118
119#if !defined(__has_feature) || !__has_feature(objc_arc)
120#error "This file requires ARC support."
121#endif
sdefresne14900ee2015-11-27 14:43:21122
elawrence816f6790e2017-06-16 18:19:28123using flags_ui::FeatureEntry;
124
sdefresne14900ee2015-11-27 14:43:21125namespace {
Emily Starkbafa9062017-12-27 15:22:46126
Olivier Robin3d60411622018-02-23 10:03:22127const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
128 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
129 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
130 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
131 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
132 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
133 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
134 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
135 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
136 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
137};
138
Nohemi Fernandezc00842a2021-07-26 11:47:34139const FeatureEntry::Choice
140 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
141 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
142 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
143 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
144 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
145};
146
Stepan Khapugincc4e9842019-01-23 13:38:13147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
157const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
158 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
159const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
160 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
161
162const FeatureEntry::FeatureVariation
163 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
164 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13174 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53175 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13176 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53177 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13178
Stepan Khapuginbac467e2022-05-06 21:11:54179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
181const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
182 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
183const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
184 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
185
186const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
187 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
188 nullptr},
189 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
190 nullptr},
191 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
192 nullptr},
193};
194
Christian Xucf26d562022-07-06 09:28:36195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
197const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
198 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
199const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
200 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
201
202const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
203 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
204 nullptr},
205 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
206 nullptr},
207 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
208 nullptr},
209};
210
Cheick Cissef37087902022-10-07 19:01:41211const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
212 {kWhatsNewModuleBasedLayoutParam, "true"}};
213
214const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
215 {"Display module layout", kWhatsNewModuleLayout,
216 std::size(kWhatsNewModuleLayout), nullptr},
217};
218
Caitlin Fischer37e01232019-05-24 13:05:45219const FeatureEntry::FeatureParam
220 kAutofillUseMobileLabelDisambiguationShowAll[] = {
221 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
222 autofill::features::
223 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
224const FeatureEntry::FeatureParam
225 kAutofillUseMobileLabelDisambiguationShowOne[] = {
226 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
227 autofill::features::
228 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
229
230const FeatureEntry::FeatureVariation
231 kAutofillUseMobileLabelDisambiguationVariations[] = {
232 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53233 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45234 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53235 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45236
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10237const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59238 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
239 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
240const FeatureEntry::FeatureVariation
241 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
242 {"Remind me later",
243 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53244 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59245 nullptr}};
246
Mohammad Refaatab6bee62022-05-16 16:31:15247const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47248 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
249 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15250const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47251 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
252 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
253
Mohammad Refaatab6bee62022-05-16 16:31:15254const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
255 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
256 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
257 {"Compact", kDiscoverFeedTopSyncPromoCompact,
258 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
259
gogerald53c6e7a2021-04-15 22:07:35260const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08261 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35262 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
263const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08264 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35265 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
266const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08267 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35268 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
269const FeatureEntry::FeatureParam
270 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
271 {kStartSurfaceShrinkLogoParam, "true"},
272 {kStartSurfaceReturnToRecentTabParam, "true"},
273 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
274const FeatureEntry::FeatureParam
275 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
276 {kStartSurfaceHideShortcutsParam, "true"},
277 {kStartSurfaceReturnToRecentTabParam, "true"},
278 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
279const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08280 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35281 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
282const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
283 {kStartSurfaceHideShortcutsParam, "true"},
284 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
285const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08286 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35287 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
288const FeatureEntry::FeatureParam
289 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
290 {kStartSurfaceShrinkLogoParam, "true"},
291 {kStartSurfaceReturnToRecentTabParam, "true"},
292 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
293const FeatureEntry::FeatureParam
294 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
295 {kStartSurfaceHideShortcutsParam, "true"},
296 {kStartSurfaceReturnToRecentTabParam, "true"},
297 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08298
gogerald0e39e3aa2021-02-10 18:41:23299const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35300 {"10s:Show Return to Recent Tab tile",
301 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53302 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35303 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53304 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35305 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53306 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35307 {"10s:Shrink Logo and show Return to Recent Tab tile",
308 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53309 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35310 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
311 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53312 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35313 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53314 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35315 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53316 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35317 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53318 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35319 {"1h:Shrink Logo and show Return to Recent Tab tile",
320 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53321 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35322 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
323 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53324 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08325};
gogerald0e39e3aa2021-02-10 18:41:23326
Chris Lu8e308dc2022-09-06 16:59:40327const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
328 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
329const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57330 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40331 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
332
333const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
334 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
335 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57336 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40337 std::size(kModuleRefreshNoHeaders), nullptr},
338};
339
Ed Chin91e44992022-07-27 13:42:34340#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04341// Feed Background Refresh Feature Params
Ed Chin321b8fe2022-08-16 07:02:01342const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04343 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
344 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01345 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04346 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01347const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04348 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
349 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01350 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04351 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01352const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04353 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
354 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01355 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04356 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01357const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04358 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
359 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01360 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04361 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01362const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04363 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
364 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01365 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
366 {kBackgroundRefreshIntervalInSeconds, "0"}};
367const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04368 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
369 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01370 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
371 {kBackgroundRefreshIntervalInSeconds, "0"}};
372const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
373 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
374 {kEnableRecurringBackgroundRefreshSchedule, "false"},
375 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
376 {kBackgroundRefreshIntervalInSeconds, "0"}};
377const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
378 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
379 {kEnableRecurringBackgroundRefreshSchedule, "true"},
380 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
381 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04382
383// Feed Background Refresh Feature Variations
Ed Chin59f617b2022-07-19 22:12:04384const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01385 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
386 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
387 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
388 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
389 {"1hr Interval 1hr Max Age Recurring",
390 kOneHourIntervalOneHourMaxAgeRecurring,
391 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
392 {"4hr Interval 6hr Max Age Recurring",
393 kFourHourIntervalSixHourMaxAgeRecurring,
394 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
395 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
396 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
397 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
398 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
399 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
400 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
401 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
402 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04403};
Ed Chin91e44992022-07-27 13:42:34404#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04405
Chris Luc9a5cb12022-07-20 16:11:39406const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58407 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39408const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58409 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39410const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
411 {kTrendingQueriesHideShortcutsParam, "false"},
412 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58413};
Chris Luc9a5cb12022-07-20 16:11:39414
415const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
416 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
417 std::size(kTrendingQueriesEnableAllUsers), nullptr},
418 {"Enabled All Users Hide Shortcuts",
419 kTrendingQueriesEnableAllUsersHideShortcuts,
420 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
421 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
422 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39423};
424
Igor Ruvinov44fed9f2022-06-10 22:51:42425const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
426const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
427 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
428 nullptr}};
429
Aliona DANGLA00ae7db2022-10-04 16:58:50430const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58431 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49432const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58433 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49434const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58435 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
436
Aliona DANGLAa5257ccc2022-08-29 14:01:49437const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50438 {"With legacy download", kOpenInDownloadInShareButton,
439 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49440 {"With WKDownload", kOpenInDownloadWithWKDownload,
441 std::size(kOpenInDownloadWithWKDownload), nullptr},
442 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
443 nullptr},
444};
445
Ewann Pelle3774cac532022-11-15 10:12:37446const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
447 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
Ewann Pelleca00bab2022-12-16 14:49:39448const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowBottomPosition[] = {
449 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowBottomParam}};
450const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowTopPosition[] = {
451 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowTopParam}};
Ewann Pelle3774cac532022-11-15 10:12:37452
453const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
454 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
455 std::size(kEnablePinnedTabsBottomPosition), nullptr},
Ewann Pelleca00bab2022-12-16 14:49:39456 {"overflow + bottom pinned tabs", kEnablePinnedTabsOverflowBottomPosition,
457 std::size(kEnablePinnedTabsOverflowBottomPosition), nullptr},
458 {"overflow + top pinned tabs", kEnablePinnedTabsOverflowTopPosition,
459 std::size(kEnablePinnedTabsOverflowTopPosition), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37460};
461
ginnnnnnny591a4972022-09-01 16:10:27462const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
463 {autofill::features::kAutofillBrandingIOSParam, "true"}};
464const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
465 {"(Monotone)", kAutofillBrandingIOSMonotone,
466 std::size(kAutofillBrandingIOSMonotone), nullptr}};
467
Scott Yodercb2fe632022-09-12 15:28:35468const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26469 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35470const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
471 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
472 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
473
Benjamin Williamsaa8da8142022-11-14 19:51:03474const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
475 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
476const FeatureEntry::FeatureVariation
477 kIOSPopularSitesImprovedSuggestionsVariations[] = {
478 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
479 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
480
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28481const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
482 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
483const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
484 {"with search result page", kEnableExperienceKitMapsWithSrp,
485 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
486
adamta3811f9182022-10-24 17:49:33487const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
488 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
489 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
490const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
491 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
492 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
493
494const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
495 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
496 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
497 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
498 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
499
Quentin Pubert154fc6a2023-01-09 15:58:58500const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
501 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
502const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
503 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
504 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
505
Louis Romero93e9b50a2023-01-26 01:46:12506const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
507 {kTabInactivityThresholdParameterName,
508 kTabInactivityThresholdOneWeekParam}};
509const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
510 {kTabInactivityThresholdParameterName,
511 kTabInactivityThresholdTwoWeeksParam}};
512const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
513 {kTabInactivityThresholdParameterName,
514 kTabInactivityThresholdThreeWeeksParam}};
515
516const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
517 {"One week", kTabInactivityThresholdOneWeek,
518 std::size(kTabInactivityThresholdOneWeek), nullptr},
519 {"Two weeks", kTabInactivityThresholdTwoWeeks,
520 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
521 {"Three weeks", kTabInactivityThresholdThreeWeeks,
522 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
523};
524
Cooper Knaak1e026562017-07-26 05:22:28525// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21526// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28527// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
528// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21529// macro for this type supplying the command line to the macro.
530// . MULTI_VALUE: a list of choices, the first of which should correspond to a
531// deactivated state for this lab (i.e. no command line option). To specify
532// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
533// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28534// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
535// either enabled, disabled, or uses the default value of the associated
536// base::Feature instance. To specify this type of entry use the macro
537// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
538// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
539// base::Feature instance. Choices corresponding to the default state, a
540// universally enabled state, and a universally disabled state are
541// automatically included. To specify this type of entry use the macro
542// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
543// the array of choices.
544//
sdefresne14900ee2015-11-27 14:43:21545// See the documentation of FeatureEntry for details on the fields.
546//
547// When adding a new choice, add it to the end of the list.
548const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28549 {"in-product-help-demo-mode-choice",
550 flag_descriptions::kInProductHelpDemoModeName,
551 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
552 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23553 feature_engagement::kIPHDemoMode,
554 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09555 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22556 {"enable-autofill-credit-card-upload",
557 flag_descriptions::kAutofillCreditCardUploadName,
558 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24559 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23560 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
561 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
562 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51563 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23564 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
565 {"wallet-service-use-sandbox",
566 flag_descriptions::kWalletServiceUseSandboxName,
567 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
568 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
569 autofill::switches::kWalletServiceUseSandbox,
570 "1",
571 autofill::switches::kWalletServiceUseSandbox,
572 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59573 {"show-autofill-type-predictions",
574 flag_descriptions::kShowAutofillTypePredictionsName,
575 flag_descriptions::kShowAutofillTypePredictionsDescription,
576 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46577 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26578 {"autofill-account-profiles-union-view",
579 flag_descriptions::kAutofillAccountProfilesUnionViewName,
580 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
581 flags_ui::kOsIos,
582 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22583 {"autofill-ios-delay-between-fields",
584 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
585 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
586 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20587 {"fullscreen-promos-manager",
588 flag_descriptions::kFullscreenPromosManagerName,
589 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
590 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05591 {"fullscreen-promos-manager-skip-internal-limits",
592 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
593 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
594 flags_ui::kOsIos,
595 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14596 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53597 flag_descriptions::kFullscreenSmoothScrollingName,
598 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
599 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06600 {"webpage-default-zoom-from-dynamic-type",
601 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
602 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
603 flags_ui::kOsIos,
604 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56605 {"webpage-alternative-text-zoom",
606 flag_descriptions::kWebPageAlternativeTextZoomName,
607 flag_descriptions::kWebPageAlternativeTextZoomDescription,
608 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34609 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
610 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
611 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28612 {"toolbar-container", flag_descriptions::kToolbarContainerName,
613 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
614 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13615 {"omnibox-ui-max-autocomplete-matches",
616 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
617 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
618 flags_ui::kOsIos,
619 FEATURE_WITH_PARAMS_VALUE_TYPE(
620 omnibox::kUIExperimentMaxAutocompleteMatches,
621 kOmniboxUIMaxAutocompleteMatchesVariations,
622 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35623 {"omnibox-local-history-zero-suggest-beyond-ntp",
624 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
625 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
626 flags_ui::kOsIos,
627 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54628 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
629 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
630 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
631 kOmniboxMaxZPSMatchesVariations,
632 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45633
634 {"omnibox-most-visited-tiles-on-srp",
635 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
636 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
637 flags_ui::kOsIos,
638 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30639 {"autofill-use-mobile-label-disambiguation",
640 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
641 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
642 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45643 FEATURE_WITH_PARAMS_VALUE_TYPE(
644 autofill::features::kAutofillUseMobileLabelDisambiguation,
645 kAutofillUseMobileLabelDisambiguationVariations,
646 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46647 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
648 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30649 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48650 {"force-startup-signin-promo",
651 flag_descriptions::kForceStartupSigninPromoName,
652 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29653 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06654 {"identity-status-consistency",
655 flag_descriptions::kIdentityStatusConsistencyName,
656 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
657 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22658 {"restore-session-from-cache",
659 flag_descriptions::kRestoreSessionFromCacheName,
660 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49661 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59662 {"autofill-save-card-dismiss-on-navigation",
663 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
664 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
665 flags_ui::kOsIos,
666 FEATURE_VALUE_TYPE(
667 autofill::features::kAutofillSaveCardDismissOnNavigation)},
Roberto Mourab87b9722020-06-17 17:12:09668 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
669 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
670 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41671 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
672 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
673 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13674#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45675 {"screen-time-integration-ios",
676 flag_descriptions::kScreenTimeIntegrationName,
677 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
678 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13679#endif
Nazerke3e993f72020-09-21 13:00:06680 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
681 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
682 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55683 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
684 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
685 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14686 {"default-browser-fullscreen-promo-experiment",
687 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
688 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
689 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59690 FEATURE_WITH_PARAMS_VALUE_TYPE(
691 kDefaultBrowserFullscreenPromoExperiment,
692 kDefaultBrowserFullscreenPromoExperimentVariations,
693 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11694 {"ios-shared-highlighting-color-change",
695 flag_descriptions::kIOSSharedHighlightingColorChangeName,
696 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07697 flags_ui::kOsIos,
698 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34699 {"ios-shared-highlighting-v2",
700 flag_descriptions::kIOSSharedHighlightingV2Name,
701 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
702 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45703 {"omnibox-new-textfield-implementation",
704 flag_descriptions::kOmniboxNewImplementationName,
705 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
706 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26707 {"omnibox-on-focus-suggestions-contextual-web",
708 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
709 flag_descriptions::
710 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
711 flags_ui::kOsIos,
712 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
713 {"omnibox-on-focus-suggestions-srp",
714 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
715 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
716 flags_ui::kOsIos,
717 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12718 {"omnibox-report-assisted-query-stats",
719 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
720 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
721 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
722 {"omnibox-report-searchbox-stats",
723 flag_descriptions::kOmniboxReportSearchboxStatsName,
724 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
725 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15726 {"omnibox-fuzzy-url-suggestions",
727 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
728 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
729 flags_ui::kOsIos,
730 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19731 {"start-surface", flag_descriptions::kStartSurfaceName,
732 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23733 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
734 kStartSurfaceVariations,
735 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28736 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
737 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
738 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42739 {"autofill-address-verification-in-save-prompt",
740 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
741 flag_descriptions::
742 kEnableAutofillAddressSavePromptAddressVerificationDescription,
743 flags_ui::kOsIos,
744 FEATURE_VALUE_TYPE(
745 autofill::features::
746 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25747 {"filling-across-affiliated-websites",
748 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
749 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
750 flags_ui::kOsIos,
751 FEATURE_VALUE_TYPE(
752 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19753 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
754 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
755 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33756 {"update-history-entry-points-in-incognito",
757 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
758 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
759 flags_ui::kOsIos,
760 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
Felipe Andrade52d0a2722023-01-25 12:49:09761 {"sync-trusted-vault-passphrase-promo",
762 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
763 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
764 flags_ui::kOsIos,
765 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Nohemi Fernandezc00842a2021-07-26 11:47:34766 {"wait-threshold-seconds-for-capabilities-api",
767 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
768 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
769 flags_ui::kOsIos,
770 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23771 {"autofill-fill-merchant-promo-code-fields",
772 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
773 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
774 flags_ui::kOsIos,
775 FEATURE_VALUE_TYPE(
776 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03777 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
778 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
779 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18780 {"new-overflow-menu-alternate-iph",
781 flag_descriptions::kNewOverflowMenuAlternateIPHName,
782 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
783 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24784 {"use-lens-to-search-for-image",
785 flag_descriptions::kUseLensToSearchForImageName,
786 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44787 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22788 {"enable-lens-in-home-screen-widget",
789 flag_descriptions::kEnableLensInHomeScreenWidgetName,
790 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
791 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
792 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
793 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
794 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
795 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
796 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
797 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03798 {"enable-lens-context-menu-alt-text",
799 flag_descriptions::kEnableLensContextMenuAltTextName,
800 flag_descriptions::kEnableLensContextMenuAltTextDescription,
801 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44802 {"enable-lens-in-omnibox-copied-image",
803 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
804 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
805 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40806 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23807 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
808 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40809 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23810 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03811 {"enable-disco-feed-endpoint",
812 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
813 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
814 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11815 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15816 {"enable-discover-feed-top-sync-promo",
817 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
818 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
819 flags_ui::kOsIos,
820 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
821 kDiscoverFeedTopSyncPromoVariations,
822 "EnableDiscoverFeedTopSyncPromo")},
Guillem Perezc49aeebd2023-01-25 00:00:41823 {"enable-hiding-mvt-shortcuts",
824 flag_descriptions::kHideMVTAndShortcutsForNewUsersName,
825 flag_descriptions::kHideMVTAndShortcutsForNewUsersDescription,
826 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kHideMVTAndShortcutsForNewUsers)},
827
Tommy Martino7393d762021-10-12 17:59:28828 {"shared-highlighting-amp",
829 flag_descriptions::kIOSSharedHighlightingAmpName,
830 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28832 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42833 commerce::flag_descriptions::kCommercePriceTrackingName,
834 commerce::flag_descriptions::kCommercePriceTrackingDescription,
835 flags_ui::kOsIos,
836 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
837 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15838 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06839 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
840 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54842 {"ntp-view-hierarchy-repair",
843 flag_descriptions::kNTPViewHierarchyRepairName,
844 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20845 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26846 {"synthesized-restore-session",
847 flag_descriptions::kSynthesizedRestoreSessionName,
848 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
849 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18850 {"ios-media-permissions-control",
851 flag_descriptions::kMediaPermissionsControlName,
852 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
853 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34854 {"enable-save-session-tabs-in-separate-files",
855 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
856 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
857 flags_ui::kOsIos,
858 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Ewann8c7aadc2022-05-19 15:41:05859 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
860 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
861 FEATURE_VALUE_TYPE(kUseSFSymbols)},
David Jeanc2b88ab602022-08-08 14:52:51862 {"ios-webpage-intent-annotations",
863 flag_descriptions::kEnableWebPageAnnotationsName,
864 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
865 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26866 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
867 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
868 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01869 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
870 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
871 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43872 {"enable-tailored-security-integration",
873 flag_descriptions::kTailoredSecurityIntegrationName,
874 flag_descriptions::kTailoredSecurityIntegrationDescription,
875 flags_ui::kOsIos,
876 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26877 {"autofill-enable-card-product-name",
878 flag_descriptions::kAutofillEnableCardProductNameName,
879 flag_descriptions::kAutofillEnableCardProductNameDescription,
880 flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00882 {"send-tab-to-self-signin-promo",
883 flag_descriptions::kSendTabToSelfSigninPromoName,
884 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22886 {"autofill-enforce-delays-in-strike-database",
887 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
888 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
889 flags_ui::kOsIos,
890 FEATURE_VALUE_TYPE(
891 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41892 {"autofill-upstream-allow-additional-email-domains",
893 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
894 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
895 flags_ui::kOsIos,
896 FEATURE_VALUE_TYPE(
897 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
898 {"autofill-upstream-allow-all-email-domains",
899 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
900 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
901 flags_ui::kOsIos,
902 FEATURE_VALUE_TYPE(
903 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52904 {"enable-download-service-foreground-session",
905 flag_descriptions::kDownloadServiceForegroundSessionName,
906 flag_descriptions::kDownloadServiceForegroundSessionDescription,
907 flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23909 {"enable-tflite-language-detection",
910 flag_descriptions::kTFLiteLanguageDetectionName,
911 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
912 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20913 {"optimization-guide-debug-logs",
914 flag_descriptions::kOptimizationGuideDebugLogsName,
915 flag_descriptions::kOptimizationGuideDebugLogsDescription,
916 flags_ui::kOsIos,
917 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Olivier Robinffe767c2022-04-21 13:13:23918 {"optimization-guide-model-downloading",
919 flag_descriptions::kOptimizationGuideModelDownloadingName,
920 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
921 flags_ui::kOsIos,
922 FEATURE_VALUE_TYPE(
923 optimization_guide::features::kOptimizationGuideModelDownloading)},
924 {"optimization-target-prediction",
925 flag_descriptions::kOptimizationTargetPredictionName,
926 flag_descriptions::kOptimizationTargetPredictionDescription,
927 flags_ui::kOsIos,
928 FEATURE_VALUE_TYPE(
929 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54930 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
931 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
932 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
933 {"sync-standalone-invalidations-wallet-and-offer",
934 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
935 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
936 flags_ui::kOsIos,
937 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01938 {"suggestions-scrolling-ipad",
939 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
940 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
941 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00942 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
943 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
944 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:22945 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
946 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
947 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25948 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
949 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
950 FEATURE_VALUE_TYPE(kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:55951 {"experience-kit-apple-calendar",
952 flag_descriptions::kAppleCalendarExperienceKitName,
953 flag_descriptions::kAppleCalendarExperienceKitDescription,
954 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:39955 {"enable-expkit-calendar-text-classifier",
956 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
957 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
958 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:08959 {"enable-expkit-text-classifier",
960 flag_descriptions::kEnableExpKitTextClassifierName,
961 flag_descriptions::kEnableExpKitTextClassifierDescription,
962 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:18963 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
964 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28965 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
966 kEnableExperienceKitMapsVariations,
967 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:05968 {"enable-long-press-surrounding-text",
969 flag_descriptions::kLongPressSurroundingTextName,
970 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
971 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:01972 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
973 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
974 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:25975 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
976 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
977 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:22978 {"smart-sorting-new-overflow-menu",
979 flag_descriptions::kSmartSortingNewOverflowMenuName,
980 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
981 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:25982 {"smart-sorting-price-tracking-destination",
983 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
984 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
985 flags_ui::kOsIos,
986 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:44987 {"new-overflow-menu-share-chrome-action",
988 flag_descriptions::kNewOverflowMenuShareChromeActionName,
989 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
990 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekled46a36982022-05-09 20:32:42991 {"autofill-enable-ranking-formula",
992 flag_descriptions::kAutofillEnableRankingFormulaName,
993 flag_descriptions::kAutofillEnableRankingFormulaDescription,
994 flags_ui::kOsIos,
995 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)},
Alexander Tekleb4643812023-01-06 23:12:30996 {"autofill-enable-ranking-formula-address-profiles",
997 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
998 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
999 flags_ui::kOsIos,
1000 FEATURE_VALUE_TYPE(
1001 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Sergio Collazos58558712022-05-18 17:24:021002 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1003 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1004 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021005 {"enable-feed-bottom-sign-in-promo",
1006 flag_descriptions::kEnableFeedBottomSignInPromoName,
1007 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1008 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1009 {"enable-feed-card-menu-sign-in-promo",
1010 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1011 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1012 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271013 {"content-suggestions-ui-module-refresh",
1014 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1015 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401016 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581017 FEATURE_WITH_PARAMS_VALUE_TYPE(
1018 kContentSuggestionsUIModuleRefresh,
1019 kModuleRefreshVariations,
1020 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571021 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1022 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1023 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061024 {"default-browser-intents-show-settings",
1025 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1026 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1027 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451028 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1029 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421030 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1031 kDmTokenDeletionVariation,
1032 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191033 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1034 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1035 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291036 {"ios-password-manager-cross-origin-iframe-support",
1037 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1038 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1039 flags_ui::kOsIos,
1040 FEATURE_VALUE_TYPE(password_manager::features::
1041 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031042 {"ios-popular-sites-improved-suggestions",
1043 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1044 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1045 flags_ui::kOsIos,
1046 FEATURE_WITH_PARAMS_VALUE_TYPE(
1047 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1048 kIOSPopularSitesImprovedSuggestionsVariations,
1049 field_trial_constants::
1050 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141051 {"omnibox-adaptive-suggestions-count",
1052 flag_descriptions::kAdaptiveSuggestionsCountName,
1053 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1054 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201055 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1056 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581057 FEATURE_WITH_PARAMS_VALUE_TYPE(
1058 kTrendingQueriesModule,
1059 kTrendingQueriesModuleVariations,
1060 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321061 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191062 flag_descriptions::kAutofillParseIBANFieldsName,
1063 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1064 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361065 {"autofill-enable-new-card-unmask-prompt-view",
1066 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1067 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1068 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271069 FEATURE_VALUE_TYPE(
1070 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241071 {"omnibox-zero-suggest-prefetching",
1072 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1073 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1074 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451075 {"omnibox-zero-suggest-prefetching-on-srp",
1076 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1077 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1078 flags_ui::kOsIos,
1079 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1080 {"omnibox-zero-suggest-prefetching-on-web",
1081 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1082 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1083 flags_ui::kOsIos,
1084 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471085 {"omnibox-zero-suggest-in-memory-caching",
1086 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1087 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1088 flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351090 {"omnibox-on-device-tail-suggestions",
1091 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1092 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1093 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391094 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1095 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501096 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491097 {"enable-sync-history-datatype",
1098 flag_descriptions::kSyncEnableHistoryDataTypeName,
1099 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1100 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361101 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1102 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1103 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1104 kOmniboxMaxURLMatchesVariations,
1105 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061106 {"metrickit-non-crash-reports",
1107 flag_descriptions::kMetrickitNonCrashReportName,
1108 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1109 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371110 {"autofill-enable-remade-downstream-metrics",
1111 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1112 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1113 flags_ui::kOsIos,
1114 FEATURE_VALUE_TYPE(
1115 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551116 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1117 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1118 flag_descriptions::
1119 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1120 flags_ui::kOsIos,
1121 FEATURE_VALUE_TYPE(
1122 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341123#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1124 {"feed-background-refresh-ios",
1125 flag_descriptions::kFeedBackgroundRefreshName,
1126 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1127 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1128 kFeedBackgroundRefreshVariations,
1129 "FeedBackgroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191130 {"omnibox-keyboard-paste-button",
1131 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1132 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1133 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin91e44992022-07-27 13:42:341134#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Aliona DANGLAa5257ccc2022-08-29 14:01:491135 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1136 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1137 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1138 kOpenInDownloadVariations,
1139 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171140 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1141 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411142 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1143 kWhatsNewLayoutVariations,
1144 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271145 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1146 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1147 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1148 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051149 "AutofillBrandingIOS")},
1150 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1151 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1152 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351153 {"ios-new-post-restore-experience",
1154 flag_descriptions::kIOSNewPostRestoreExperienceName,
1155 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1156 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261157 FEATURE_WITH_PARAMS_VALUE_TYPE(
1158 post_restore_signin::features::kIOSNewPostRestoreExperience,
1159 kIOSNewPostRestoreExperienceVariations,
1160 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021161 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1162 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1163 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501164 {"enable-tflite-language-detection-ignore",
1165 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1166 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1167 flags_ui::kOsIos,
1168 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141169 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1170 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1171 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471172 {"enable-check-visibility-on-attention-log-start",
1173 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1174 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1175 flags_ui::kOsIos,
1176 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1177 {"enable-refine-data-source-reload-reporting",
1178 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1179 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1180 flags_ui::kOsIos,
1181 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Noémie St-Ongeac7a84b2022-10-14 22:32:521182 {"enable-compromised-passwords-muting",
1183 flag_descriptions::kEnableCompromisedPasswordsMutingName,
1184 flag_descriptions::kEnableCompromisedPasswordsMutingDescription,
1185 flags_ui::kOsIos,
1186 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041187 {"enable-passwords-account-storage",
1188 flag_descriptions::kEnablePasswordsAccountStorageName,
1189 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1190 flags_ui::kOsIos,
1191 FEATURE_VALUE_TYPE(
1192 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331193 {"enable-default-following-feed-sort-type",
1194 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1195 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1196 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201197 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331198 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201199 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131200 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1201 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1202 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201203 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011204 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1205 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371206 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1207 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1208 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1209 kEnablePinnedTabsVariations,
1210 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031211 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1212 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1213 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411214 {"credential-provider-extension-promo",
1215 flag_descriptions::kCredentialProviderExtensionPromoName,
1216 flag_descriptions::kCredentialProviderExtensionPromoDescription,
1217 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kCredentialProviderExtensionPromo)},
Nicolas MacBethfb43e152022-11-28 19:31:521218 {"default-browser-blue-dot-promo",
1219 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1220 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1221 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271222 {"ios-force-translate-enabled",
1223 flag_descriptions::kIOSForceTranslateEnabledName,
1224 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1225 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251226 {"iph-price-notifications-while-browsing",
1227 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1228 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1229 flags_ui::kOsIos,
1230 FEATURE_VALUE_TYPE(
1231 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411232 {"autofill-offer-to-save-card-with-same-last-four",
1233 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1234 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1235 flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(
1237 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041238 {"omnibox-multiline-search-suggest",
1239 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1240 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1241 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501242 {"autofill-suggest-server-card-instead-of-local-card",
1243 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1244 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1245 flags_ui::kOsIos,
1246 FEATURE_VALUE_TYPE(
1247 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581248 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1249 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1250 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1251 kNativeFindInPageVariations,
1252 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551253 {"intents-on-email", flag_descriptions::kEmailName,
1254 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
1255 FEATURE_VALUE_TYPE(kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341256 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1257 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1258 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351259 {"multiline-fade-truncating-label",
1260 flag_descriptions::kMultilineFadeTruncatingLabelName,
1261 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1262 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301263 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1264 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1265 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ameur Hosni99d11872023-01-23 12:02:301266 {"enable-accessibility-identifier-to-omnibox-leading-image",
1267 flag_descriptions::kEnableAccessibilityIdentifierToOmniboxLeadingImageName,
1268 flag_descriptions::
1269 kEnableAccessibilityIdentifierToOmniboxLeadingImageDescription,
1270 flags_ui::kOsIos,
1271 FEATURE_VALUE_TYPE(kEnableAccessibilityIdentifierToOmniboxLeadingImage)},
Ewann Pelledec2d042023-01-25 15:28:391272 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1273 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
1275 {"ios-tabstrip-context-menu", flag_descriptions::kTabStripContextMenuName,
1276 flag_descriptions::kTabStripContextMenuDescription, flags_ui::kOsIos,
Louis Romero93e9b50a2023-01-26 01:46:121277 FEATURE_VALUE_TYPE(kTabStripContextMenu)},
1278 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1279 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1280 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1281 kTabInactivityThresholdVariations,
1282 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411283 {"enable-feed-image-caching",
1284 flag_descriptions::kEnableFeedImageCachingName,
1285 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1286 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1287 {"enable-feed-synthetic-capabilities",
1288 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1289 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1290 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Louis Romerob9661dbf02023-01-27 16:50:061291 {"close-all-tabs-confirmation",
1292 flag_descriptions::kCloseAllTabsConfirmationName,
1293 flag_descriptions::kCloseAllTabsConfirmationDescription, flags_ui::kOsIos,
1294 FEATURE_VALUE_TYPE(kCloseAllTabsConfirmation)},
Louis Romero93e9b50a2023-01-26 01:46:121295};
sdefresne14900ee2015-11-27 14:43:211296
Rohit Raobed794c2020-04-27 15:27:451297bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1298 return false;
1299}
1300
1301flags_ui::FlagsState& GetGlobalFlagsState() {
1302 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1303 nullptr);
1304 return *flags_state;
1305}
David Jean5ca263c2021-08-18 09:19:301306// Creates the experimental test policies map, used by AsyncPolicyLoader and
1307// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341308NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211309 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1310
Guillaume Jenkins25e9bd72020-08-27 17:39:061311 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551312 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061313 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551314
Guillaume Jenkins25e9bd72020-08-27 17:39:061315 // Set some sample policy values for testing if EnableSamplePolicies is set to
1316 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401317 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551318 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011319 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1320
Guillaume Jenkinseeb7007c2020-06-25 22:55:401321 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1322
1323 // 2 = Disable all variations
1324 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1325
1326 // 2 = Do not allow any site to show popups
1327 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1328
Tina Wang5abee802020-07-29 23:09:521329 // Set default search engine.
1330 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1331 @YES,
1332 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1333 @"http://www.google.com/search?q={searchTerms}",
1334 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021335 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521336
Tina Wang89068c82020-10-29 15:51:501337 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1338
Gauthier Ambard21b23702021-04-16 16:11:271339 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1340
Guillaume Jenkinseeb7007c2020-06-25 22:55:401341 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011342
1343 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531344
1345 // 2 = Enhanced safe browsing protection
1346 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1347
1348 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291349
1350 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551351 }];
1352 }
1353
Ewann227a3c02021-04-19 12:04:541354 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041355 NSString* sync_policy_key =
1356 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301357 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541358 }
Ewann227a3c02021-04-19 12:04:541359
Ewann570a6302021-08-17 07:22:421360 // SyncTypesListDisabled policy.
1361 NSString* Sync_types_list_disabled_key =
1362 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1363 NSMutableArray* Sync_types_list_disabled_values =
1364 [[NSMutableArray alloc] init];
1365 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1366 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1367 }
1368 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1369 [Sync_types_list_disabled_values addObject:@"readingList"];
1370 }
1371 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1372 [Sync_types_list_disabled_values addObject:@"preferences"];
1373 }
1374 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1375 [Sync_types_list_disabled_values addObject:@"passwords"];
1376 }
1377 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1378 [Sync_types_list_disabled_values addObject:@"autofill"];
1379 }
1380 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1381 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1382 }
1383 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1384 [Sync_types_list_disabled_values addObject:@"tabs"];
1385 }
1386 if ([Sync_types_list_disabled_values count]) {
1387 [testing_policies addEntriesFromDictionary:@{
1388 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1389 }];
Ewann570a6302021-08-17 07:22:421390 }
1391
Gauthier Ambard073eaa92021-11-22 15:24:131392 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521393 NSString* incognito_policy_key =
1394 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1395 NSInteger incognito_mode_availability =
1396 [defaults integerForKey:incognito_policy_key];
1397 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521398 [testing_policies addEntriesFromDictionary:@{
1399 incognito_policy_key : @(incognito_mode_availability),
1400 }];
1401 }
1402
Ewann40a8f8a2021-07-29 10:01:201403 NSString* restriction_pattern =
1404 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1405 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291406 NSString* restrict_key =
1407 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201408 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291409 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201410 }];
1411 }
1412
Vincent Boisselle19200bc2021-09-01 17:58:251413 // If the sign-in policy is set (not "None"), add the policy key to the list
1414 // of enabled experimental policies, and set the value.
1415 NSString* const kSigninPolicyKey = @"BrowserSignin";
1416 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1417 if (signin_policy_mode) {
1418 // Remove the mode offset that was used to represent the unset policy.
1419 --signin_policy_mode;
1420 DCHECK(signin_policy_mode >= 0);
1421
Vincent Boisselle19200bc2021-09-01 17:58:251422 [testing_policies addEntriesFromDictionary:@{
1423 kSigninPolicyKey : @(signin_policy_mode),
1424 }];
1425 }
1426
Veronique Nguyen9b1044f2022-01-11 14:41:131427 // If the New Tab Page URL is set (not empty) add the value to the list of
1428 // test policies.
1429 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1430 if ([ntp_location length] > 0) {
1431 NSString* ntp_location_key =
1432 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1433 [testing_policies
1434 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571435 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131436 }
1437
Ali Juma9ec36d22022-03-28 14:53:121438 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1439 NSString* allow_backups_key =
1440 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1441 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1442 [allowed_experimental_policies addObject:allow_backups_key];
1443 }
1444
Guillaume Jenkins25e9bd72020-08-27 17:39:061445 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1446 // policy.
1447 if ([allowed_experimental_policies count] > 0) {
1448 [testing_policies setValue:allowed_experimental_policies
1449 forKey:base::SysUTF8ToNSString(
1450 policy::key::kEnableExperimentalPolicies)];
1451 }
1452
jlebel2eb40222022-05-06 11:15:421453 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1454 switch ([defaults integerForKey:metrics_reporting_key]) {
1455 case 1:
1456 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131457 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421458 break;
1459 case 2:
1460 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131461 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421462 break;
1463 default:
1464 // Metrics reporting not managed.
1465 break;
1466 }
1467
David Jean6f85d44f2021-08-19 08:08:451468 // Warning: Add new flags to TestingPoliciesHash() below.
1469
David Jean5ca263c2021-08-18 09:19:301470 return testing_policies;
1471}
David Jean6f85d44f2021-08-19 08:08:451472
David Jean5ca263c2021-08-18 09:19:301473} // namespace
1474
Gauthier Ambard02dbf022022-08-23 08:28:471475// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301476void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1477 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1478
1479 // Set the UA flag if UseMobileSafariUA is enabled.
1480 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1481 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1482 // Chrome puts its product token.
1483 int32_t major = 0;
1484 int32_t minor = 0;
1485 int32_t bugfix = 0;
1486 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1487 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1488
1489 command_line->AppendSwitchASCII(switches::kUserAgent,
1490 web::BuildMobileUserAgent(product));
1491 }
1492
1493 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341494 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301495
1496 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1497 // Management to enabled and add the token to the list of policies.
1498 NSString* token_key =
1499 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1500 NSString* token = [defaults stringForKey:token_key];
1501
1502 if ([token length] > 0) {
1503 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1504 [testing_policies setValue:token forKey:token_key];
1505 }
1506
Guillaume Jenkins57606d72020-08-13 17:32:551507 // If some policies were set, commit them to the app's registration defaults.
1508 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401509 NSDictionary* registration_defaults =
1510 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1511 [defaults registerDefaults:registration_defaults];
1512 }
1513
sdefresne14900ee2015-11-27 14:43:211514 // Freeform commandline flags. These are added last, so that any flags added
1515 // earlier in this function take precedence.
1516 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1517 base::CommandLine::StringVector flags;
1518 // Append an empty "program" argument.
1519 flags.push_back("");
1520
1521 // The number of flags corresponds to the number of text fields in
1522 // Experimental.plist.
1523 const int kNumFreeformFlags = 5;
1524 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1525 NSString* key =
1526 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1527 NSString* flag = [defaults stringForKey:key];
1528 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331529 // iOS keyboard replaces -- with —, so undo that.
1530 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1531 withString:@"--"
1532 options:0
1533 range:NSMakeRange(0, 1)];
1534 // To make things easier, allow flags with no dashes by prepending them
1535 // here. This also allows for flags that just have one dash if they
1536 // exist.
1537 if (![flag hasPrefix:@"-"]) {
1538 flag = [@"--" stringByAppendingString:flag];
1539 }
sdefresne14900ee2015-11-27 14:43:211540 flags.push_back(base::SysNSStringToUTF8(flag));
1541 }
1542 }
1543
1544 base::CommandLine temp_command_line(flags);
1545 command_line->AppendArguments(temp_command_line, false);
1546 }
msardafc76f662017-02-24 12:46:281547
justincohendacc85d2017-06-28 23:34:101548 // Populate command line flag for 3rd party keyboard omnibox workaround.
1549 NSString* enableThirdPartyKeyboardWorkaround =
1550 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1551 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1552 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1553 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1554 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1555 }
1556
Sylvain Defresned3cd8d92022-01-18 13:35:081557 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211558}
1559
sdefresne14900ee2015-11-27 14:43:211560void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1561 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181562 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111563 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531564 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211565}
1566
jkrcalbf073372016-07-29 07:21:311567std::vector<std::string> RegisterAllFeatureVariationParameters(
1568 flags_ui::FlagsStorage* flags_storage,
1569 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181570 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1571 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311572}
1573
sdefresne14900ee2015-11-27 14:43:211574void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1575 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501576 base::Value::List& supported_entries,
1577 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181578 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211579 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511580 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211581}
1582
1583void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1584 const std::string& internal_name,
1585 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181586 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1587 enable);
sdefresne14900ee2015-11-27 14:43:211588}
1589
1590void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181591 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211592}
1593
1594namespace testing {
1595
Elly Fong-Jones323ab1092021-08-23 22:36:311596base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1597 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531598 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211599}
1600
1601} // namespace testing