blob: f9a3e445d57d0a6d5e96b227d6c284848dce406e [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
15#import "base/bind.h"
16#import "base/callback_helpers.h"
17#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3618#import "base/debug/debugging_buildflags.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
28#import "components/breadcrumbs/core/features.h"
29#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
35#import "components/feature_engagement/public/feature_constants.h"
36#import "components/feature_engagement/public/feature_list.h"
37#import "components/feed/feed_feature_list.h"
38#import "components/flags_ui/feature_entry.h"
39#import "components/flags_ui/feature_entry_macros.h"
40#import "components/flags_ui/flags_storage.h"
41#import "components/flags_ui/flags_ui_switches.h"
42#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0343#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/ntp_tiles/switches.h"
45#import "components/omnibox/browser/omnibox_field_trial.h"
46#import "components/omnibox/common/omnibox_features.h"
47#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2048#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5749#import "components/password_manager/core/common/password_manager_features.h"
50#import "components/payments/core/features.h"
51#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4052#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5753#import "components/policy/policy_constants.h"
54#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2555#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
57#import "components/signin/core/browser/account_reconcilor.h"
58#import "components/signin/ios/browser/features.h"
59#import "components/signin/public/base/signin_switches.h"
60#import "components/strings/grit/components_strings.h"
61#import "components/sync/base/command_line_switches.h"
62#import "components/sync/base/features.h"
63#import "components/sync/base/pref_names.h"
64#import "components/translate/core/browser/translate_prefs.h"
65#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3466#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
68#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5469#import "ios/chrome/browser/credential_provider_promo/features.h"
Gauthier Ambard92605132022-08-26 13:25:1770#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5771#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1772#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1373#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5074#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3975#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5776#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2077#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5778#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3479#import "ios/chrome/browser/sessions/session_features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3480#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0581#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5782#import "ios/chrome/browser/ui/autofill/features.h"
83#import "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2184#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5085#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2486#import "ios/chrome/browser/ui/download/features.h"
Rohit Rao5aa791a2022-08-19 17:34:5387#import "ios/chrome/browser/ui/first_run/field_trial_constants.h"
Chris Lu438e1c052022-08-17 02:57:0088#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3589#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1490#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0391#import "ios/chrome/browser/ui/ntp/field_trial_constants.h"
adamta273568472020-12-04 23:53:5792#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0193#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4994#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4595#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2696#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1997#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Ewann Pelle3774cac532022-11-15 10:12:3798#import "ios/chrome/browser/ui/tab_switcher/pinned_tabs/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2899#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:57100#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17101#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57102#import "ios/chrome/browser/web/features.h"
103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57111#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
118#if !defined(__has_feature) || !__has_feature(objc_arc)
119#error "This file requires ARC support."
120#endif
sdefresne14900ee2015-11-27 14:43:21121
elawrence816f6790e2017-06-16 18:19:28122using flags_ui::FeatureEntry;
123
sdefresne14900ee2015-11-27 14:43:21124namespace {
Emily Starkbafa9062017-12-27 15:22:46125
Olivier Robin3d60411622018-02-23 10:03:22126const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
129 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
130 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
131 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
132 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
133 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
134 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
135 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
136};
137
Nohemi Fernandezc00842a2021-07-26 11:47:34138const FeatureEntry::Choice
139 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
140 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
141 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
142 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
143 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
144};
145
Stepan Khapugincc4e9842019-01-23 13:38:13146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
160
161const FeatureEntry::FeatureVariation
162 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
163 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13177
Stepan Khapuginbac467e2022-05-06 21:11:54178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
184
185const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
186 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
187 nullptr},
188 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
189 nullptr},
190 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
191 nullptr},
192};
193
Christian Xucf26d562022-07-06 09:28:36194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
200
201const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
202 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
203 nullptr},
204 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
205 nullptr},
206 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
207 nullptr},
208};
209
Cheick Cissef37087902022-10-07 19:01:41210const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
211 {kWhatsNewModuleBasedLayoutParam, "true"}};
212
213const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
214 {"Display module layout", kWhatsNewModuleLayout,
215 std::size(kWhatsNewModuleLayout), nullptr},
216};
217
Caitlin Fischer37e01232019-05-24 13:05:45218const FeatureEntry::FeatureParam
219 kAutofillUseMobileLabelDisambiguationShowAll[] = {
220 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
221 autofill::features::
222 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
223const FeatureEntry::FeatureParam
224 kAutofillUseMobileLabelDisambiguationShowOne[] = {
225 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
226 autofill::features::
227 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
228
229const FeatureEntry::FeatureVariation
230 kAutofillUseMobileLabelDisambiguationVariations[] = {
231 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53232 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45233 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53234 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45235
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10236const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59237 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
238 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
239const FeatureEntry::FeatureVariation
240 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
241 {"Remind me later",
242 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53243 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59244 nullptr}};
245
Mohammad Refaatab6bee62022-05-16 16:31:15246const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47247 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
248 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15249const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47250 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
251 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
252
Mohammad Refaatab6bee62022-05-16 16:31:15253const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
254 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
255 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
256 {"Compact", kDiscoverFeedTopSyncPromoCompact,
257 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
258
Robbie Gibson46351032022-03-31 19:46:23259const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
260 {kIOSOmniboxUpdatedPopupUIVariationName,
261 kIOSOmniboxUpdatedPopupUIVariation1}};
262const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
263 {kIOSOmniboxUpdatedPopupUIVariationName,
264 kIOSOmniboxUpdatedPopupUIVariation2}};
Stepan Khapugin0fd1869a2022-08-09 10:23:47265const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion3[] = {
266 {kIOSOmniboxUpdatedPopupUIVariationName,
267 kIOSOmniboxUpdatedPopupUIVariation1UIKit}};
268const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion4[] = {
269 {kIOSOmniboxUpdatedPopupUIVariationName,
270 kIOSOmniboxUpdatedPopupUIVariation2UIKit}};
Robbie Gibson46351032022-03-31 19:46:23271const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
Stepan Khapugin0fd1869a2022-08-09 10:23:47272 {"Version 1 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion1,
Robbie Gibson46351032022-03-31 19:46:23273 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
Stepan Khapugin0fd1869a2022-08-09 10:23:47274 {"Version 2 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion2,
275 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr},
276 {"Version 1 - UIKit", kiOSOmniboxUpdatedPopupUIVersion3,
277 std::size(kiOSOmniboxUpdatedPopupUIVersion3), nullptr},
278 {"Version 2 - UIKit", kiOSOmniboxUpdatedPopupUIVersion4,
279 std::size(kiOSOmniboxUpdatedPopupUIVersion4), nullptr}};
Robbie Gibson46351032022-03-31 19:46:23280
gogerald53c6e7a2021-04-15 22:07:35281const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08282 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35283 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
284const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08285 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35286 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
287const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08288 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35289 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
290const FeatureEntry::FeatureParam
291 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
292 {kStartSurfaceShrinkLogoParam, "true"},
293 {kStartSurfaceReturnToRecentTabParam, "true"},
294 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
295const FeatureEntry::FeatureParam
296 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
297 {kStartSurfaceHideShortcutsParam, "true"},
298 {kStartSurfaceReturnToRecentTabParam, "true"},
299 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
300const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08301 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35302 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
303const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
304 {kStartSurfaceHideShortcutsParam, "true"},
305 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
306const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08307 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35308 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
309const FeatureEntry::FeatureParam
310 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
311 {kStartSurfaceShrinkLogoParam, "true"},
312 {kStartSurfaceReturnToRecentTabParam, "true"},
313 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
314const FeatureEntry::FeatureParam
315 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
316 {kStartSurfaceHideShortcutsParam, "true"},
317 {kStartSurfaceReturnToRecentTabParam, "true"},
318 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08319
gogerald0e39e3aa2021-02-10 18:41:23320const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35321 {"10s:Show Return to Recent Tab tile",
322 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53323 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35324 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53325 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35326 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53327 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35328 {"10s:Shrink Logo and show Return to Recent Tab tile",
329 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53330 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35331 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
332 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53333 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35334 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53335 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35336 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53337 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35338 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53339 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35340 {"1h:Shrink Logo and show Return to Recent Tab tile",
341 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53342 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35343 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
344 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53345 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08346};
gogerald0e39e3aa2021-02-10 18:41:23347
Chris Lu8e308dc2022-09-06 16:59:40348const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
349 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
350const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57351 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40352 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
353
354const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
355 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
356 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57357 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40358 std::size(kModuleRefreshNoHeaders), nullptr},
359};
360
Ed Chin91e44992022-07-27 13:42:34361#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04362// Feed Background Refresh Feature Params
Ed Chin321b8fe2022-08-16 07:02:01363const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04364 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
365 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01366 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04367 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01368const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04369 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
370 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01371 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04372 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01373const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04374 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
375 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01376 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04377 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01378const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04379 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
380 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01381 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04382 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01383const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04384 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
385 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01386 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
387 {kBackgroundRefreshIntervalInSeconds, "0"}};
388const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04389 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
390 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01391 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
392 {kBackgroundRefreshIntervalInSeconds, "0"}};
393const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
394 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
395 {kEnableRecurringBackgroundRefreshSchedule, "false"},
396 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
397 {kBackgroundRefreshIntervalInSeconds, "0"}};
398const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
399 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
400 {kEnableRecurringBackgroundRefreshSchedule, "true"},
401 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
402 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04403
404// Feed Background Refresh Feature Variations
Ed Chin59f617b2022-07-19 22:12:04405const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01406 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
407 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
408 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
409 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
410 {"1hr Interval 1hr Max Age Recurring",
411 kOneHourIntervalOneHourMaxAgeRecurring,
412 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
413 {"4hr Interval 6hr Max Age Recurring",
414 kFourHourIntervalSixHourMaxAgeRecurring,
415 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
416 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
417 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
418 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
419 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
420 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
421 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
422 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
423 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04424};
Ed Chin91e44992022-07-27 13:42:34425#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04426
ginnnnnnny46435132022-06-01 16:06:04427const FeatureEntry::FeatureParam kFREDefaultBrowserPromoDefaultDelay[] = {
428 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoDefaultDelayParam}};
429const FeatureEntry::FeatureParam kFREDefaultBrowserPromoFirstRunOnly[] = {
430 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoFirstRunOnlyParam}};
431const FeatureEntry::FeatureParam kFREDefaultBrowserPromoShortDelay[] = {
432 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoShortDelayParam}};
433const FeatureEntry::FeatureVariation kFREDefaultBrowserPromoVariations[] = {
Aliona DANGLA8fae66f02021-10-06 15:47:11434 {"Wait 14 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04435 kFREDefaultBrowserPromoDefaultDelay,
436 std::size(kFREDefaultBrowserPromoDefaultDelay), nullptr},
437 {"FRE default browser promo only", kFREDefaultBrowserPromoFirstRunOnly,
438 std::size(kFREDefaultBrowserPromoFirstRunOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11439 {"Wait 3 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04440 kFREDefaultBrowserPromoShortDelay,
441 std::size(kFREDefaultBrowserPromoShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11442};
443
Chris Luc9a5cb12022-07-20 16:11:39444const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58445 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39446const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58447 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39448const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
449 {kTrendingQueriesHideShortcutsParam, "false"},
450 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58451};
Chris Luc9a5cb12022-07-20 16:11:39452
453const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
454 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
455 std::size(kTrendingQueriesEnableAllUsers), nullptr},
456 {"Enabled All Users Hide Shortcuts",
457 kTrendingQueriesEnableAllUsersHideShortcuts,
458 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
459 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
460 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39461};
462
Jérôme Lebelc46af972022-10-04 15:16:32463const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncA[] = {
jlebel041fc1c2022-03-04 12:53:30464 {kNewMobileIdentityConsistencyFREParam,
Jérôme Lebelc46af972022-10-04 15:16:32465 kNewMobileIdentityConsistencyFREParamTangibleSyncA}};
466const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncB[] = {
467 {kNewMobileIdentityConsistencyFREParam,
468 kNewMobileIdentityConsistencyFREParamTangibleSyncB}};
469const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncC[] = {
470 {kNewMobileIdentityConsistencyFREParam,
471 kNewMobileIdentityConsistencyFREParamTangibleSyncC}};
jlebel041fc1c2022-03-04 12:53:30472const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
473 {kNewMobileIdentityConsistencyFREParam,
474 kNewMobileIdentityConsistencyFREParamTwoSteps}};
Jérôme Lebelce6f7162022-11-07 19:07:32475const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncD[] = {
476 {kNewMobileIdentityConsistencyFREParam,
477 kNewMobileIdentityConsistencyFREParamTangibleSyncD}};
478const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncE[] = {
479 {kNewMobileIdentityConsistencyFREParam,
480 kNewMobileIdentityConsistencyFREParamTangibleSyncE}};
481const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncF[] = {
482 {kNewMobileIdentityConsistencyFREParam,
483 kNewMobileIdentityConsistencyFREParamTangibleSyncF}};
jlebel041fc1c2022-03-04 12:53:30484const FeatureEntry::FeatureVariation
485 kNewMobileIdentityConsistencyFREVariations[] = {
Jérôme Lebelc46af972022-10-04 15:16:32486 {"new FRE with tangible sync A", kNewMICEFREWithTangibleSyncA,
487 std::size(kNewMICEFREWithTangibleSyncA), nullptr},
488 {"new FRE with tangible sync B", kNewMICEFREWithTangibleSyncB,
489 std::size(kNewMICEFREWithTangibleSyncB), nullptr},
490 {"new FRE with tangible sync C", kNewMICEFREWithTangibleSyncC,
491 std::size(kNewMICEFREWithTangibleSyncC), nullptr},
Jérôme Lebelce6f7162022-11-07 19:07:32492 {"new FRE with tangible sync D", kNewMICEFREWithTangibleSyncD,
493 std::size(kNewMICEFREWithTangibleSyncD), nullptr},
494 {"new FRE with tangible sync E", kNewMICEFREWithTangibleSyncE,
495 std::size(kNewMICEFREWithTangibleSyncE), nullptr},
496 {"new FRE with tangible sync F", kNewMICEFREWithTangibleSyncF,
497 std::size(kNewMICEFREWithTangibleSyncF), nullptr},
jlebel041fc1c2022-03-04 12:53:30498 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
499 std::size(kNewMICEFREWithTwoSteps), nullptr}};
500
Louis Romero023cc5052022-04-08 23:29:39501const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
502 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01503const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
504 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
505const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
506 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
507const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
508 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
509const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39510 {"Target Highlight", kBubbleRichIPHTargetHighlight,
511 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01512 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
513 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
514 {"Dismissal and rich content", kBubbleRichIPHRich,
515 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39516 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01517 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
518};
519
Christian Xubdedabec2022-07-04 10:00:13520const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueIconCapsule[] = {
521 {kOmniboxPasteButtonParameterName,
522 kOmniboxPasteButtonParameterBlueIconCapsule}};
523const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueFullCapsule[] = {
524 {kOmniboxPasteButtonParameterName,
525 kOmniboxPasteButtonParameterBlueFullCapsule}};
526const FeatureEntry::FeatureVariation kOmniboxPasteButtonVariations[] = {
527 {"Icon only", kOmniboxPasteButtonBlueIconCapsule,
528 std::size(kOmniboxPasteButtonBlueIconCapsule), nullptr},
529 {"Icon and text", kOmniboxPasteButtonBlueFullCapsule,
530 std::size(kOmniboxPasteButtonBlueFullCapsule), nullptr},
531};
532
Igor Ruvinov44fed9f2022-06-10 22:51:42533const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
534const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
535 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
536 nullptr}};
537
Aliona DANGLA00ae7db2022-10-04 16:58:50538const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58539 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49540const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58541 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49542const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58543 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
544
Aliona DANGLAa5257ccc2022-08-29 14:01:49545const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50546 {"With legacy download", kOpenInDownloadInShareButton,
547 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49548 {"With WKDownload", kOpenInDownloadWithWKDownload,
549 std::size(kOpenInDownloadWithWKDownload), nullptr},
550 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
551 nullptr},
552};
553
Ewann Pelle3774cac532022-11-15 10:12:37554const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
555 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
556const FeatureEntry::FeatureParam kEnablePinnedTabsTopPosition[] = {
557 {kEnablePinnedTabsParameterName, kEnablePinnedTabsTopParam}};
558
559const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
560 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
561 std::size(kEnablePinnedTabsBottomPosition), nullptr},
562 {"top pinned tabs", kEnablePinnedTabsTopPosition,
563 std::size(kEnablePinnedTabsTopPosition), nullptr},
564};
565
ginnnnnnny591a4972022-09-01 16:10:27566const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
567 {autofill::features::kAutofillBrandingIOSParam, "true"}};
568const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
569 {"(Monotone)", kAutofillBrandingIOSMonotone,
570 std::size(kAutofillBrandingIOSMonotone), nullptr}};
571
Scott Yodercb2fe632022-09-12 15:28:35572const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26573 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35574const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
575 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
576 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
577
Benjamin Williamsaa8da8142022-11-14 19:51:03578const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
579 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
580const FeatureEntry::FeatureVariation
581 kIOSPopularSitesImprovedSuggestionsVariations[] = {
582 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
583 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
584
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28585const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
586 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
587const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
588 {"with search result page", kEnableExperienceKitMapsWithSrp,
589 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
590
adamta3811f9182022-10-24 17:49:33591const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
592 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
593 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
594const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
595 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
596 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
597
598const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
599 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
600 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
601 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
602 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
603
Cooper Knaak1e026562017-07-26 05:22:28604// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21605// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28606// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
607// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21608// macro for this type supplying the command line to the macro.
609// . MULTI_VALUE: a list of choices, the first of which should correspond to a
610// deactivated state for this lab (i.e. no command line option). To specify
611// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
612// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28613// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
614// either enabled, disabled, or uses the default value of the associated
615// base::Feature instance. To specify this type of entry use the macro
616// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
617// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
618// base::Feature instance. Choices corresponding to the default state, a
619// universally enabled state, and a universally disabled state are
620// automatically included. To specify this type of entry use the macro
621// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
622// the array of choices.
623//
sdefresne14900ee2015-11-27 14:43:21624// See the documentation of FeatureEntry for details on the fields.
625//
626// When adding a new choice, add it to the end of the list.
627const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28628 {"in-product-help-demo-mode-choice",
629 flag_descriptions::kInProductHelpDemoModeName,
630 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
631 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23632 feature_engagement::kIPHDemoMode,
633 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09634 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22635 {"enable-autofill-credit-card-upload",
636 flag_descriptions::kAutofillCreditCardUploadName,
637 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24638 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23639 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
640 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
641 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51642 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23643 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
644 {"wallet-service-use-sandbox",
645 flag_descriptions::kWalletServiceUseSandboxName,
646 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
647 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
648 autofill::switches::kWalletServiceUseSandbox,
649 "1",
650 autofill::switches::kWalletServiceUseSandbox,
651 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59652 {"show-autofill-type-predictions",
653 flag_descriptions::kShowAutofillTypePredictionsName,
654 flag_descriptions::kShowAutofillTypePredictionsDescription,
655 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46656 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22657 {"autofill-ios-delay-between-fields",
658 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
659 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
660 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20661 {"fullscreen-promos-manager",
662 flag_descriptions::kFullscreenPromosManagerName,
663 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
664 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05665 {"fullscreen-promos-manager-skip-internal-limits",
666 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
667 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
668 flags_ui::kOsIos,
669 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14670 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53671 flag_descriptions::kFullscreenSmoothScrollingName,
672 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
673 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06674 {"webpage-default-zoom-from-dynamic-type",
675 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
676 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
677 flags_ui::kOsIos,
678 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56679 {"webpage-alternative-text-zoom",
680 flag_descriptions::kWebPageAlternativeTextZoomName,
681 flag_descriptions::kWebPageAlternativeTextZoomDescription,
682 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34683 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
684 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
685 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28686 {"toolbar-container", flag_descriptions::kToolbarContainerName,
687 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
688 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13689 {"omnibox-ui-max-autocomplete-matches",
690 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
691 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
692 flags_ui::kOsIos,
693 FEATURE_WITH_PARAMS_VALUE_TYPE(
694 omnibox::kUIExperimentMaxAutocompleteMatches,
695 kOmniboxUIMaxAutocompleteMatchesVariations,
696 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35697 {"omnibox-local-history-zero-suggest-beyond-ntp",
698 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
699 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
700 flags_ui::kOsIos,
701 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54702 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
703 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
704 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
705 kOmniboxMaxZPSMatchesVariations,
706 "OmniboxMaxZPSVariations")},
Caitlin Fischer43edd90a2019-05-01 13:24:30707 {"autofill-use-mobile-label-disambiguation",
708 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
709 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
710 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45711 FEATURE_WITH_PARAMS_VALUE_TYPE(
712 autofill::features::kAutofillUseMobileLabelDisambiguation,
713 kAutofillUseMobileLabelDisambiguationVariations,
714 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46715 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
716 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30717 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48718 {"force-startup-signin-promo",
719 flag_descriptions::kForceStartupSigninPromoName,
720 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29721 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06722 {"identity-status-consistency",
723 flag_descriptions::kIdentityStatusConsistencyName,
724 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22726 {"restore-session-from-cache",
727 flag_descriptions::kRestoreSessionFromCacheName,
728 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49729 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59730 {"autofill-save-card-dismiss-on-navigation",
731 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
732 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
733 flags_ui::kOsIos,
734 FEATURE_VALUE_TYPE(
735 autofill::features::kAutofillSaveCardDismissOnNavigation)},
Roberto Mourab87b9722020-06-17 17:12:09736 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
737 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
738 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41739 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
740 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
741 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
jlebel041fc1c2022-03-04 12:53:30742 {"new-mobile-identity-consistency-fre",
743 flag_descriptions::kNewMobileIdentityConsistencyFREName,
744 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
745 flags_ui::kOsIos,
746 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
747 kNewMobileIdentityConsistencyFREVariations,
ginnnnnnny46435132022-06-01 16:06:04748 kIOSMICeAndDefaultBrowserTrialName)},
Sylvain Defresne9c107082020-10-27 16:39:13749#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45750 {"screen-time-integration-ios",
751 flag_descriptions::kScreenTimeIntegrationName,
752 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
753 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13754#endif
Nazerke3e993f72020-09-21 13:00:06755 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
756 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
757 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55758 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
759 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
760 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14761 {"default-browser-fullscreen-promo-experiment",
762 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
763 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
764 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59765 FEATURE_WITH_PARAMS_VALUE_TYPE(
766 kDefaultBrowserFullscreenPromoExperiment,
767 kDefaultBrowserFullscreenPromoExperimentVariations,
768 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11769 {"ios-shared-highlighting-color-change",
770 flag_descriptions::kIOSSharedHighlightingColorChangeName,
771 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07772 flags_ui::kOsIos,
773 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34774 {"ios-shared-highlighting-v2",
775 flag_descriptions::kIOSSharedHighlightingV2Name,
776 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
777 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45778 {"omnibox-new-textfield-implementation",
779 flag_descriptions::kOmniboxNewImplementationName,
780 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
781 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26782 {"omnibox-on-focus-suggestions-contextual-web",
783 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
784 flag_descriptions::
785 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
786 flags_ui::kOsIos,
787 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
788 {"omnibox-on-focus-suggestions-srp",
789 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
790 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
791 flags_ui::kOsIos,
792 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapuginecf128a92022-08-30 11:23:15793 {"omnibox-fuzzy-url-suggestions",
794 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
795 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
796 flags_ui::kOsIos,
797 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
Stepan Khapugin422f08d2022-02-18 16:19:44798 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
799 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23800 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
801 kiOSOmniboxUpdatedPopupUIVariations,
Stepan Khapugina45baed2022-05-13 19:15:43802 "IOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19803 {"start-surface", flag_descriptions::kStartSurfaceName,
804 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23805 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
806 kStartSurfaceVariations,
807 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28808 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
809 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42811 {"autofill-address-verification-in-save-prompt",
812 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
813 flag_descriptions::
814 kEnableAutofillAddressSavePromptAddressVerificationDescription,
815 flags_ui::kOsIos,
816 FEATURE_VALUE_TYPE(
817 autofill::features::
818 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25819 {"filling-across-affiliated-websites",
820 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
821 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
822 flags_ui::kOsIos,
823 FEATURE_VALUE_TYPE(
824 password_manager::features::kFillingAcrossAffiliatedWebsites)},
edchin257cea2f2021-04-07 13:07:13825 {"interest-feed-v2-clicks-and-views-cond-upload",
826 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
827 flag_descriptions::
828 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
829 flags_ui::kOsIos,
830 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Side Yilmaz6c53f7102021-09-07 13:26:19831 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
832 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
833 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33834 {"update-history-entry-points-in-incognito",
835 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
836 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
837 flags_ui::kOsIos,
838 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
Mikel Astiz850b0fe2021-06-16 09:47:27839 {"sync-trusted-vault-passphrase-promo",
840 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
841 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
842 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51843 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27844 {"sync-trusted-vault-passphrase-recovery",
845 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
846 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
847 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51848 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34849 {"wait-threshold-seconds-for-capabilities-api",
850 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
851 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
852 flags_ui::kOsIos,
853 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23854 {"autofill-fill-merchant-promo-code-fields",
855 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
856 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
857 flags_ui::kOsIos,
858 FEATURE_VALUE_TYPE(
859 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03860 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
861 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
862 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18863 {"new-overflow-menu-alternate-iph",
864 flag_descriptions::kNewOverflowMenuAlternateIPHName,
865 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
866 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24867 {"use-lens-to-search-for-image",
868 flag_descriptions::kUseLensToSearchForImageName,
869 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44870 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22871 {"enable-lens-in-home-screen-widget",
872 flag_descriptions::kEnableLensInHomeScreenWidgetName,
873 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
874 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
875 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
876 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
877 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
878 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
879 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
880 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Jason Hu67cfb0f2022-11-14 20:21:44881 {"enable-lens-in-omnibox-copied-image",
882 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
883 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
884 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40885 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23886 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
887 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40888 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23889 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03890 {"enable-disco-feed-endpoint",
891 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
892 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
893 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11894 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15895 {"enable-discover-feed-top-sync-promo",
896 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
897 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
898 flags_ui::kOsIos,
899 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
900 kDiscoverFeedTopSyncPromoVariations,
901 "EnableDiscoverFeedTopSyncPromo")},
Aliona DANGLA8fae66f02021-10-06 15:47:11902 {"enable-fre-default-browser-screen-testing",
ginnnnnnny46435132022-06-01 16:06:04903 flag_descriptions::kEnableFREDefaultBrowserPromoScreenName,
904 flag_descriptions::kEnableFREDefaultBrowserPromoScreenDescription,
Aliona DANGLA8fae66f02021-10-06 15:47:11905 flags_ui::kOsIos,
ginnnnnnny46435132022-06-01 16:06:04906 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserPromoScreen,
907 kFREDefaultBrowserPromoVariations,
908 kIOSMICeAndDefaultBrowserTrialName)},
Tommy Martino7393d762021-10-12 17:59:28909 {"shared-highlighting-amp",
910 flag_descriptions::kIOSSharedHighlightingAmpName,
911 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
912 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28913 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42914 commerce::flag_descriptions::kCommercePriceTrackingName,
915 commerce::flag_descriptions::kCommercePriceTrackingDescription,
916 flags_ui::kOsIos,
917 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
918 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15919 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06920 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
921 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
922 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54923 {"ntp-view-hierarchy-repair",
924 flag_descriptions::kNTPViewHierarchyRepairName,
925 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20926 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26927 {"synthesized-restore-session",
928 flag_descriptions::kSynthesizedRestoreSessionName,
929 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
930 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41931 {"enable-password-manager-branding-update",
932 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
933 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
934 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19935 FEATURE_VALUE_TYPE(
936 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
ginnnnnnnyee3036e2022-08-12 18:01:18937 {"ios-media-permissions-control",
938 flag_descriptions::kMediaPermissionsControlName,
939 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
940 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34941 {"enable-save-session-tabs-in-separate-files",
942 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
943 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
944 flags_ui::kOsIos,
945 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Ewann8c7aadc2022-05-19 15:41:05946 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
947 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
948 FEATURE_VALUE_TYPE(kUseSFSymbols)},
Nohemi Fernandez76f54802022-01-10 18:23:32949 {"enable-unicorn-account-support",
950 flag_descriptions::kEnableUnicornAccountSupportName,
951 flag_descriptions::kEnableUnicornAccountSupportDescription,
952 flags_ui::kOsIos,
953 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
David Jeanc2b88ab602022-08-08 14:52:51954 {"ios-webpage-intent-annotations",
955 flag_descriptions::kEnableWebPageAnnotationsName,
956 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
957 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26958 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
959 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
960 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01961 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
962 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
963 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43964 {"enable-tailored-security-integration",
965 flag_descriptions::kTailoredSecurityIntegrationName,
966 flag_descriptions::kTailoredSecurityIntegrationDescription,
967 flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26969 {"autofill-enable-card-product-name",
970 flag_descriptions::kAutofillEnableCardProductNameName,
971 flag_descriptions::kAutofillEnableCardProductNameDescription,
972 flags_ui::kOsIos,
973 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00974 {"send-tab-to-self-signin-promo",
975 flag_descriptions::kSendTabToSelfSigninPromoName,
976 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
977 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Christian Xubd60c4b72022-03-22 15:25:01978 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
979 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
980 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
981 kBubbleRichIPHVariations,
982 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22983 {"autofill-enforce-delays-in-strike-database",
984 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
985 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
986 flags_ui::kOsIos,
987 FEATURE_VALUE_TYPE(
988 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41989 {"autofill-upstream-allow-additional-email-domains",
990 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
991 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
992 flags_ui::kOsIos,
993 FEATURE_VALUE_TYPE(
994 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
995 {"autofill-upstream-allow-all-email-domains",
996 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
997 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
998 flags_ui::kOsIos,
999 FEATURE_VALUE_TYPE(
1000 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521001 {"enable-download-service-foreground-session",
1002 flag_descriptions::kDownloadServiceForegroundSessionName,
1003 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1004 flags_ui::kOsIos,
1005 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231006 {"enable-tflite-language-detection",
1007 flag_descriptions::kTFLiteLanguageDetectionName,
1008 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1009 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201010 {"optimization-guide-debug-logs",
1011 flag_descriptions::kOptimizationGuideDebugLogsName,
1012 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1013 flags_ui::kOsIos,
1014 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Olivier Robinffe767c2022-04-21 13:13:231015 {"optimization-guide-model-downloading",
1016 flag_descriptions::kOptimizationGuideModelDownloadingName,
1017 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
1018 flags_ui::kOsIos,
1019 FEATURE_VALUE_TYPE(
1020 optimization_guide::features::kOptimizationGuideModelDownloading)},
1021 {"optimization-target-prediction",
1022 flag_descriptions::kOptimizationTargetPredictionName,
1023 flag_descriptions::kOptimizationTargetPredictionDescription,
1024 flags_ui::kOsIos,
1025 FEATURE_VALUE_TYPE(
1026 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:541027 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1028 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1029 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1030 {"sync-standalone-invalidations-wallet-and-offer",
1031 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1032 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1033 flags_ui::kOsIos,
1034 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011035 {"suggestions-scrolling-ipad",
1036 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1037 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1038 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001039 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1040 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1041 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:221042 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
1043 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
1044 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251045 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1046 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
1047 FEATURE_VALUE_TYPE(kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551048 {"experience-kit-apple-calendar",
1049 flag_descriptions::kAppleCalendarExperienceKitName,
1050 flag_descriptions::kAppleCalendarExperienceKitDescription,
1051 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:391052 {"enable-expkit-calendar-text-classifier",
1053 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1054 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1055 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:081056 {"enable-expkit-text-classifier",
1057 flag_descriptions::kEnableExpKitTextClassifierName,
1058 flag_descriptions::kEnableExpKitTextClassifierDescription,
1059 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181060 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1061 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281062 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1063 kEnableExperienceKitMapsVariations,
1064 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051065 {"enable-long-press-surrounding-text",
1066 flag_descriptions::kLongPressSurroundingTextName,
1067 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1068 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011069 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1070 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1071 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251072 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1073 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1074 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221075 {"smart-sorting-new-overflow-menu",
1076 flag_descriptions::kSmartSortingNewOverflowMenuName,
1077 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1078 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Scott Yoder10493562022-06-28 17:37:441079 {"new-overflow-menu-share-chrome-action",
1080 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1081 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1082 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekled46a36982022-05-09 20:32:421083 {"autofill-enable-ranking-formula",
1084 flag_descriptions::kAutofillEnableRankingFormulaName,
1085 flag_descriptions::kAutofillEnableRankingFormulaDescription,
1086 flags_ui::kOsIos,
1087 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)},
Sergio Collazos58558712022-05-18 17:24:021088 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1089 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1090 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021091 {"enable-feed-bottom-sign-in-promo",
1092 flag_descriptions::kEnableFeedBottomSignInPromoName,
1093 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1094 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1095 {"enable-feed-card-menu-sign-in-promo",
1096 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1097 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1098 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271099 {"content-suggestions-ui-module-refresh",
1100 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1101 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401102 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581103 FEATURE_WITH_PARAMS_VALUE_TYPE(
1104 kContentSuggestionsUIModuleRefresh,
1105 kModuleRefreshVariations,
1106 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571107 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1108 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1109 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061110 {"default-browser-intents-show-settings",
1111 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1112 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1113 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Ed Chin76b1b35e2022-06-08 23:01:171114 {"enable-discover-feed-ghost-cards",
1115 flag_descriptions::kEnableDiscoverFeedGhostCardsName,
1116 flag_descriptions::kEnableDiscoverFeedGhostCardsDescription,
adamta8da8dce2022-11-17 18:03:201117 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedGhostCards)},
Igor Ruvinova43a66dc2022-06-09 21:57:451118 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1119 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421120 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1121 kDmTokenDeletionVariation,
1122 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191123 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1124 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1125 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291126 {"ios-password-manager-cross-origin-iframe-support",
1127 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1128 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1129 flags_ui::kOsIos,
1130 FEATURE_VALUE_TYPE(password_manager::features::
1131 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031132 {"ios-popular-sites-improved-suggestions",
1133 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1134 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1135 flags_ui::kOsIos,
1136 FEATURE_WITH_PARAMS_VALUE_TYPE(
1137 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1138 kIOSPopularSitesImprovedSuggestionsVariations,
1139 field_trial_constants::
1140 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141141 {"omnibox-adaptive-suggestions-count",
1142 flag_descriptions::kAdaptiveSuggestionsCountName,
1143 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1144 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201145 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1146 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581147 FEATURE_WITH_PARAMS_VALUE_TYPE(
1148 kTrendingQueriesModule,
1149 kTrendingQueriesModuleVariations,
1150 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321151 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191152 flag_descriptions::kAutofillParseIBANFieldsName,
1153 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1154 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361155 {"autofill-enable-new-card-unmask-prompt-view",
1156 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1157 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1158 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271159 FEATURE_VALUE_TYPE(
1160 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Christian Xubdedabec2022-07-04 10:00:131161 {"omnibox-paste-button", flag_descriptions::kOmniboxPasteButtonName,
1162 flag_descriptions::kOmniboxPasteButtonDescription, flags_ui::kOsIos,
1163 FEATURE_WITH_PARAMS_VALUE_TYPE(kOmniboxPasteButton,
1164 kOmniboxPasteButtonVariations,
1165 "OmniboxPasteButton")},
Moe Ahmadi098519d82022-07-27 18:34:241166 {"omnibox-zero-suggest-prefetching",
1167 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1168 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1169 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451170 {"omnibox-zero-suggest-prefetching-on-srp",
1171 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1172 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1173 flags_ui::kOsIos,
1174 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1175 {"omnibox-zero-suggest-prefetching-on-web",
1176 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1177 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1178 flags_ui::kOsIos,
1179 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471180 {"omnibox-zero-suggest-in-memory-caching",
1181 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1182 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1183 flags_ui::kOsIos,
1184 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351185 {"omnibox-on-device-tail-suggestions",
1186 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1187 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1188 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391189 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1190 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501191 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491192 {"enable-sync-history-datatype",
1193 flag_descriptions::kSyncEnableHistoryDataTypeName,
1194 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1195 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361196 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1197 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1198 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1199 kOmniboxMaxURLMatchesVariations,
1200 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061201 {"metrickit-non-crash-reports",
1202 flag_descriptions::kMetrickitNonCrashReportName,
1203 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1204 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371205 {"autofill-enable-remade-downstream-metrics",
1206 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1207 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1208 flags_ui::kOsIos,
1209 FEATURE_VALUE_TYPE(
1210 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551211 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1212 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1213 flag_descriptions::
1214 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1215 flags_ui::kOsIos,
1216 FEATURE_VALUE_TYPE(
1217 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341218#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1219 {"feed-background-refresh-ios",
1220 flag_descriptions::kFeedBackgroundRefreshName,
1221 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1222 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1223 kFeedBackgroundRefreshVariations,
1224 "FeedBackgroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191225 {"omnibox-keyboard-paste-button",
1226 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1227 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1228 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin91e44992022-07-27 13:42:341229#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Arthur Milchiorcf4877e2022-07-29 14:23:411230 {"enable-cbd-sign-out", flag_descriptions::kEnableCBDSignOutName,
1231 flag_descriptions::kEnableCBDSignOutDescription, flags_ui::kOsIos,
Arthur Milchiord36e2502022-08-11 16:10:111232 FEATURE_VALUE_TYPE(switches::kEnableCbdSignOut)},
Aliona DANGLAa5257ccc2022-08-29 14:01:491233 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1234 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1235 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1236 kOpenInDownloadVariations,
1237 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171238 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1239 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411240 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1241 kWhatsNewLayoutVariations,
1242 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271243 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1244 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1245 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1246 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051247 "AutofillBrandingIOS")},
1248 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1249 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1250 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351251 {"ios-new-post-restore-experience",
1252 flag_descriptions::kIOSNewPostRestoreExperienceName,
1253 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1254 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261255 FEATURE_WITH_PARAMS_VALUE_TYPE(
1256 post_restore_signin::features::kIOSNewPostRestoreExperience,
1257 kIOSNewPostRestoreExperienceVariations,
1258 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021259 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1260 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1261 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501262 {"enable-tflite-language-detection-ignore",
1263 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1264 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1265 flags_ui::kOsIos,
1266 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141267 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1268 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1269 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471270 {"enable-check-visibility-on-attention-log-start",
1271 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1272 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1273 flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1275 {"enable-refine-data-source-reload-reporting",
1276 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1277 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1278 flags_ui::kOsIos,
1279 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Noémie St-Ongeac7a84b2022-10-14 22:32:521280 {"enable-compromised-passwords-muting",
1281 flag_descriptions::kEnableCompromisedPasswordsMutingName,
1282 flag_descriptions::kEnableCompromisedPasswordsMutingDescription,
1283 flags_ui::kOsIos,
1284 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041285 {"enable-passwords-account-storage",
1286 flag_descriptions::kEnablePasswordsAccountStorageName,
1287 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1288 flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(
1290 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331291 {"enable-default-following-feed-sort-type",
1292 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1293 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1294 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201295 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331296 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201297 "EnableFollowingFeedDefaultSortType")},
Christian Xu4eb28d42022-10-28 17:54:481298 {"omnibox-carousel-dynamic-spacing",
1299 flag_descriptions::kOmniboxCarouselDynamicSpacingName,
1300 flag_descriptions::kOmniboxCarouselDynamicSpacingDescription,
1301 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxCarouselDynamicSpacing)},
Gauthier Ambardd0187592022-11-03 16:31:131302 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1303 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Gauthier Ambardc0410632022-11-16 08:45:351305 {"tab-grid-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011306 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1307 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371308 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1309 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1310 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1311 kEnablePinnedTabsVariations,
1312 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031313 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1314 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1315 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411316 {"credential-provider-extension-promo",
1317 flag_descriptions::kCredentialProviderExtensionPromoName,
1318 flag_descriptions::kCredentialProviderExtensionPromoDescription,
1319 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kCredentialProviderExtensionPromo)},
Nicolas MacBethfb43e152022-11-28 19:31:521320 {"default-browser-blue-dot-promo",
1321 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1322 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1323 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271324 {"ios-force-translate-enabled",
1325 flag_descriptions::kIOSForceTranslateEnabledName,
1326 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1327 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Hira Mahmoodb0e5f412022-09-01 19:41:051328};
sdefresne14900ee2015-11-27 14:43:211329
Rohit Raobed794c2020-04-27 15:27:451330bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1331 return false;
1332}
1333
1334flags_ui::FlagsState& GetGlobalFlagsState() {
1335 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1336 nullptr);
1337 return *flags_state;
1338}
David Jean5ca263c2021-08-18 09:19:301339// Creates the experimental test policies map, used by AsyncPolicyLoader and
1340// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341341NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211342 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1343
Guillaume Jenkins25e9bd72020-08-27 17:39:061344 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551345 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061346 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551347
Guillaume Jenkins25e9bd72020-08-27 17:39:061348 // Set some sample policy values for testing if EnableSamplePolicies is set to
1349 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401350 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551351 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011352 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1353
Guillaume Jenkinseeb7007c2020-06-25 22:55:401354 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1355
1356 // 2 = Disable all variations
1357 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1358
1359 // 2 = Do not allow any site to show popups
1360 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1361
Tina Wang5abee802020-07-29 23:09:521362 // Set default search engine.
1363 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1364 @YES,
1365 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1366 @"http://www.google.com/search?q={searchTerms}",
1367 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021368 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521369
Tina Wang89068c82020-10-29 15:51:501370 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1371
Gauthier Ambard21b23702021-04-16 16:11:271372 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1373
Guillaume Jenkinseeb7007c2020-06-25 22:55:401374 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011375
1376 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531377
1378 // 2 = Enhanced safe browsing protection
1379 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1380
1381 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:551382 }];
1383 }
1384
Ewann227a3c02021-04-19 12:04:541385 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041386 NSString* sync_policy_key =
1387 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301388 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541389 }
Ewann227a3c02021-04-19 12:04:541390
Ewann570a6302021-08-17 07:22:421391 // SyncTypesListDisabled policy.
1392 NSString* Sync_types_list_disabled_key =
1393 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1394 NSMutableArray* Sync_types_list_disabled_values =
1395 [[NSMutableArray alloc] init];
1396 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1397 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1398 }
1399 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1400 [Sync_types_list_disabled_values addObject:@"readingList"];
1401 }
1402 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1403 [Sync_types_list_disabled_values addObject:@"preferences"];
1404 }
1405 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1406 [Sync_types_list_disabled_values addObject:@"passwords"];
1407 }
1408 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1409 [Sync_types_list_disabled_values addObject:@"autofill"];
1410 }
1411 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1412 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1413 }
1414 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1415 [Sync_types_list_disabled_values addObject:@"tabs"];
1416 }
1417 if ([Sync_types_list_disabled_values count]) {
1418 [testing_policies addEntriesFromDictionary:@{
1419 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1420 }];
Ewann570a6302021-08-17 07:22:421421 }
1422
Gauthier Ambard073eaa92021-11-22 15:24:131423 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521424 NSString* incognito_policy_key =
1425 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1426 NSInteger incognito_mode_availability =
1427 [defaults integerForKey:incognito_policy_key];
1428 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521429 [testing_policies addEntriesFromDictionary:@{
1430 incognito_policy_key : @(incognito_mode_availability),
1431 }];
1432 }
1433
Ewann40a8f8a2021-07-29 10:01:201434 NSString* restriction_pattern =
1435 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1436 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291437 NSString* restrict_key =
1438 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201439 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291440 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201441 }];
1442 }
1443
Vincent Boisselle19200bc2021-09-01 17:58:251444 // If the sign-in policy is set (not "None"), add the policy key to the list
1445 // of enabled experimental policies, and set the value.
1446 NSString* const kSigninPolicyKey = @"BrowserSignin";
1447 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1448 if (signin_policy_mode) {
1449 // Remove the mode offset that was used to represent the unset policy.
1450 --signin_policy_mode;
1451 DCHECK(signin_policy_mode >= 0);
1452
Vincent Boisselle19200bc2021-09-01 17:58:251453 [testing_policies addEntriesFromDictionary:@{
1454 kSigninPolicyKey : @(signin_policy_mode),
1455 }];
1456 }
1457
Veronique Nguyen9b1044f2022-01-11 14:41:131458 // If the New Tab Page URL is set (not empty) add the value to the list of
1459 // test policies.
1460 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1461 if ([ntp_location length] > 0) {
1462 NSString* ntp_location_key =
1463 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1464 [testing_policies
1465 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571466 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131467 }
1468
Ali Juma9ec36d22022-03-28 14:53:121469 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1470 NSString* allow_backups_key =
1471 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1472 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1473 [allowed_experimental_policies addObject:allow_backups_key];
1474 }
1475
Guillaume Jenkins25e9bd72020-08-27 17:39:061476 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1477 // policy.
1478 if ([allowed_experimental_policies count] > 0) {
1479 [testing_policies setValue:allowed_experimental_policies
1480 forKey:base::SysUTF8ToNSString(
1481 policy::key::kEnableExperimentalPolicies)];
1482 }
1483
jlebel2eb40222022-05-06 11:15:421484 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1485 switch ([defaults integerForKey:metrics_reporting_key]) {
1486 case 1:
1487 // Metrics reporting forced.
1488 [testing_policies setValue:@(YES) forKey:metrics_reporting_key];
1489 break;
1490 case 2:
1491 // Metrics reporting disabled.
1492 [testing_policies setValue:@(NO) forKey:metrics_reporting_key];
1493 break;
1494 default:
1495 // Metrics reporting not managed.
1496 break;
1497 }
1498
David Jean6f85d44f2021-08-19 08:08:451499 // Warning: Add new flags to TestingPoliciesHash() below.
1500
David Jean5ca263c2021-08-18 09:19:301501 return testing_policies;
1502}
David Jean6f85d44f2021-08-19 08:08:451503
David Jean5ca263c2021-08-18 09:19:301504} // namespace
1505
Gauthier Ambard02dbf022022-08-23 08:28:471506// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301507void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1508 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1509
1510 // Set the UA flag if UseMobileSafariUA is enabled.
1511 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1512 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1513 // Chrome puts its product token.
1514 int32_t major = 0;
1515 int32_t minor = 0;
1516 int32_t bugfix = 0;
1517 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1518 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1519
1520 command_line->AppendSwitchASCII(switches::kUserAgent,
1521 web::BuildMobileUserAgent(product));
1522 }
1523
1524 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341525 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301526
1527 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1528 // Management to enabled and add the token to the list of policies.
1529 NSString* token_key =
1530 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1531 NSString* token = [defaults stringForKey:token_key];
1532
1533 if ([token length] > 0) {
1534 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1535 [testing_policies setValue:token forKey:token_key];
1536 }
1537
Guillaume Jenkins57606d72020-08-13 17:32:551538 // If some policies were set, commit them to the app's registration defaults.
1539 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401540 NSDictionary* registration_defaults =
1541 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1542 [defaults registerDefaults:registration_defaults];
1543 }
1544
sdefresne14900ee2015-11-27 14:43:211545 // Freeform commandline flags. These are added last, so that any flags added
1546 // earlier in this function take precedence.
1547 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1548 base::CommandLine::StringVector flags;
1549 // Append an empty "program" argument.
1550 flags.push_back("");
1551
1552 // The number of flags corresponds to the number of text fields in
1553 // Experimental.plist.
1554 const int kNumFreeformFlags = 5;
1555 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1556 NSString* key =
1557 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1558 NSString* flag = [defaults stringForKey:key];
1559 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331560 // iOS keyboard replaces -- with —, so undo that.
1561 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1562 withString:@"--"
1563 options:0
1564 range:NSMakeRange(0, 1)];
1565 // To make things easier, allow flags with no dashes by prepending them
1566 // here. This also allows for flags that just have one dash if they
1567 // exist.
1568 if (![flag hasPrefix:@"-"]) {
1569 flag = [@"--" stringByAppendingString:flag];
1570 }
sdefresne14900ee2015-11-27 14:43:211571 flags.push_back(base::SysNSStringToUTF8(flag));
1572 }
1573 }
1574
1575 base::CommandLine temp_command_line(flags);
1576 command_line->AppendArguments(temp_command_line, false);
1577 }
msardafc76f662017-02-24 12:46:281578
justincohendacc85d2017-06-28 23:34:101579 // Populate command line flag for 3rd party keyboard omnibox workaround.
1580 NSString* enableThirdPartyKeyboardWorkaround =
1581 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1582 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1583 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1584 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1585 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1586 }
1587
Sylvain Defresned3cd8d92022-01-18 13:35:081588 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211589}
1590
sdefresne14900ee2015-11-27 14:43:211591void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1592 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181593 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111594 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531595 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211596}
1597
jkrcalbf073372016-07-29 07:21:311598std::vector<std::string> RegisterAllFeatureVariationParameters(
1599 flags_ui::FlagsStorage* flags_storage,
1600 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181601 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1602 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311603}
1604
sdefresne14900ee2015-11-27 14:43:211605void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1606 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501607 base::Value::List& supported_entries,
1608 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181609 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211610 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511611 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211612}
1613
1614void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1615 const std::string& internal_name,
1616 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181617 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1618 enable);
sdefresne14900ee2015-11-27 14:43:211619}
1620
1621void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181622 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211623}
1624
1625namespace testing {
1626
Elly Fong-Jones323ab1092021-08-23 22:36:311627base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1628 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531629 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211630}
1631
1632} // namespace testing