blob: a95975efd044703eee0b6b8c2ff83115a815efbe [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"
Gauthier Ambard92605132022-08-26 13:25:1769#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5770#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1771#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1372#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5073#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3974#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5775#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2076#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3478#import "ios/chrome/browser/sessions/session_features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3479#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0580#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5781#import "ios/chrome/browser/ui/autofill/features.h"
82#import "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2183#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Hira Mahmoodea109752022-11-17 17:45:4184#import "ios/chrome/browser/ui/credential_provider_promo/features.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
gogeralddb0d8ae2020-11-13 03:56:58246const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
247 {kDiscoverFeedIsNativeUIEnabled, "true"}};
248const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
249 {"Native UI", kDiscoverFeedInNtpEnableNativeUI,
Daniel Cheng1f047a82022-02-26 10:04:53250 std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
gogeralddb0d8ae2020-11-13 03:56:58251
Sergio Collazos9fcc6ed2021-10-06 00:58:03252const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = {
253 {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}};
254const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = {
255 {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}};
256const FeatureEntry::FeatureVariation
257 kEnableDiscoverFeedStaticResourceServingVariations[] = {
258 {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53259 std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03260 {"Preload Templates", kDiscoverFeedSRSPreloadTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53261 std::size(kDiscoverFeedSRSPreloadTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03262};
263
Mohammad Refaatab6bee62022-05-16 16:31:15264const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47265 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
266 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15267const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47268 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
269 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
270
Mohammad Refaatab6bee62022-05-16 16:31:15271const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
272 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
273 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
274 {"Compact", kDiscoverFeedTopSyncPromoCompact,
275 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
276
Robbie Gibson46351032022-03-31 19:46:23277const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
278 {kIOSOmniboxUpdatedPopupUIVariationName,
279 kIOSOmniboxUpdatedPopupUIVariation1}};
280const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
281 {kIOSOmniboxUpdatedPopupUIVariationName,
282 kIOSOmniboxUpdatedPopupUIVariation2}};
Stepan Khapugin0fd1869a2022-08-09 10:23:47283const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion3[] = {
284 {kIOSOmniboxUpdatedPopupUIVariationName,
285 kIOSOmniboxUpdatedPopupUIVariation1UIKit}};
286const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion4[] = {
287 {kIOSOmniboxUpdatedPopupUIVariationName,
288 kIOSOmniboxUpdatedPopupUIVariation2UIKit}};
Robbie Gibson46351032022-03-31 19:46:23289const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
Stepan Khapugin0fd1869a2022-08-09 10:23:47290 {"Version 1 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion1,
Robbie Gibson46351032022-03-31 19:46:23291 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
Stepan Khapugin0fd1869a2022-08-09 10:23:47292 {"Version 2 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion2,
293 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr},
294 {"Version 1 - UIKit", kiOSOmniboxUpdatedPopupUIVersion3,
295 std::size(kiOSOmniboxUpdatedPopupUIVersion3), nullptr},
296 {"Version 2 - UIKit", kiOSOmniboxUpdatedPopupUIVersion4,
297 std::size(kiOSOmniboxUpdatedPopupUIVersion4), nullptr}};
Robbie Gibson46351032022-03-31 19:46:23298
gogerald53c6e7a2021-04-15 22:07:35299const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08300 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35301 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
302const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08303 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35304 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
305const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08306 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35307 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
308const FeatureEntry::FeatureParam
309 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
310 {kStartSurfaceShrinkLogoParam, "true"},
311 {kStartSurfaceReturnToRecentTabParam, "true"},
312 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
313const FeatureEntry::FeatureParam
314 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
315 {kStartSurfaceHideShortcutsParam, "true"},
316 {kStartSurfaceReturnToRecentTabParam, "true"},
317 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
318const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08319 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35320 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
321const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
322 {kStartSurfaceHideShortcutsParam, "true"},
323 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
324const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08325 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35326 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
327const FeatureEntry::FeatureParam
328 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
329 {kStartSurfaceShrinkLogoParam, "true"},
330 {kStartSurfaceReturnToRecentTabParam, "true"},
331 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
332const FeatureEntry::FeatureParam
333 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
334 {kStartSurfaceHideShortcutsParam, "true"},
335 {kStartSurfaceReturnToRecentTabParam, "true"},
336 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08337
gogerald0e39e3aa2021-02-10 18:41:23338const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35339 {"10s:Show Return to Recent Tab tile",
340 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53341 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35342 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53343 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35344 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53345 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35346 {"10s:Shrink Logo and show Return to Recent Tab tile",
347 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53348 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35349 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
350 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53351 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35352 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53353 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35354 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53355 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35356 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53357 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35358 {"1h:Shrink Logo and show Return to Recent Tab tile",
359 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53360 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35361 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
362 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53363 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08364};
gogerald0e39e3aa2021-02-10 18:41:23365
Chris Lu8e308dc2022-09-06 16:59:40366const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
367 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
368const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57369 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40370 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
371
372const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
373 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
374 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57375 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40376 std::size(kModuleRefreshNoHeaders), nullptr},
377};
378
Ed Chin91e44992022-07-27 13:42:34379#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04380// Feed Background Refresh Feature Params
Ed Chin321b8fe2022-08-16 07:02:01381const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04382 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
383 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01384 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04385 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01386const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04387 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
388 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01389 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04390 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01391const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04392 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
393 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01394 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04395 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01396const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04397 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
398 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01399 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04400 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01401const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04402 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
403 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01404 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
405 {kBackgroundRefreshIntervalInSeconds, "0"}};
406const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04407 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
408 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01409 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
410 {kBackgroundRefreshIntervalInSeconds, "0"}};
411const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
412 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
413 {kEnableRecurringBackgroundRefreshSchedule, "false"},
414 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
415 {kBackgroundRefreshIntervalInSeconds, "0"}};
416const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
417 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
418 {kEnableRecurringBackgroundRefreshSchedule, "true"},
419 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
420 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04421
422// Feed Background Refresh Feature Variations
Ed Chin59f617b2022-07-19 22:12:04423const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01424 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
425 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
426 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
427 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
428 {"1hr Interval 1hr Max Age Recurring",
429 kOneHourIntervalOneHourMaxAgeRecurring,
430 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
431 {"4hr Interval 6hr Max Age Recurring",
432 kFourHourIntervalSixHourMaxAgeRecurring,
433 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
434 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
435 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
436 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
437 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
438 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
439 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
440 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
441 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04442};
Ed Chin91e44992022-07-27 13:42:34443#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04444
ginnnnnnny46435132022-06-01 16:06:04445const FeatureEntry::FeatureParam kFREDefaultBrowserPromoDefaultDelay[] = {
446 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoDefaultDelayParam}};
447const FeatureEntry::FeatureParam kFREDefaultBrowserPromoFirstRunOnly[] = {
448 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoFirstRunOnlyParam}};
449const FeatureEntry::FeatureParam kFREDefaultBrowserPromoShortDelay[] = {
450 {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoShortDelayParam}};
451const FeatureEntry::FeatureVariation kFREDefaultBrowserPromoVariations[] = {
Aliona DANGLA8fae66f02021-10-06 15:47:11452 {"Wait 14 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04453 kFREDefaultBrowserPromoDefaultDelay,
454 std::size(kFREDefaultBrowserPromoDefaultDelay), nullptr},
455 {"FRE default browser promo only", kFREDefaultBrowserPromoFirstRunOnly,
456 std::size(kFREDefaultBrowserPromoFirstRunOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11457 {"Wait 3 days after FRE default browser promo",
ginnnnnnny46435132022-06-01 16:06:04458 kFREDefaultBrowserPromoShortDelay,
459 std::size(kFREDefaultBrowserPromoShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11460};
461
Chris Luc9a5cb12022-07-20 16:11:39462const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58463 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39464const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58465 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39466const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
467 {kTrendingQueriesHideShortcutsParam, "false"},
468 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58469};
Chris Luc9a5cb12022-07-20 16:11:39470
471const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
472 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
473 std::size(kTrendingQueriesEnableAllUsers), nullptr},
474 {"Enabled All Users Hide Shortcuts",
475 kTrendingQueriesEnableAllUsersHideShortcuts,
476 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
477 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
478 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39479};
480
Jérôme Lebelc46af972022-10-04 15:16:32481const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncA[] = {
jlebel041fc1c2022-03-04 12:53:30482 {kNewMobileIdentityConsistencyFREParam,
Jérôme Lebelc46af972022-10-04 15:16:32483 kNewMobileIdentityConsistencyFREParamTangibleSyncA}};
484const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncB[] = {
485 {kNewMobileIdentityConsistencyFREParam,
486 kNewMobileIdentityConsistencyFREParamTangibleSyncB}};
487const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncC[] = {
488 {kNewMobileIdentityConsistencyFREParam,
489 kNewMobileIdentityConsistencyFREParamTangibleSyncC}};
jlebel041fc1c2022-03-04 12:53:30490const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
491 {kNewMobileIdentityConsistencyFREParam,
492 kNewMobileIdentityConsistencyFREParamTwoSteps}};
Jérôme Lebelce6f7162022-11-07 19:07:32493const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncD[] = {
494 {kNewMobileIdentityConsistencyFREParam,
495 kNewMobileIdentityConsistencyFREParamTangibleSyncD}};
496const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncE[] = {
497 {kNewMobileIdentityConsistencyFREParam,
498 kNewMobileIdentityConsistencyFREParamTangibleSyncE}};
499const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSyncF[] = {
500 {kNewMobileIdentityConsistencyFREParam,
501 kNewMobileIdentityConsistencyFREParamTangibleSyncF}};
jlebel041fc1c2022-03-04 12:53:30502const FeatureEntry::FeatureVariation
503 kNewMobileIdentityConsistencyFREVariations[] = {
Jérôme Lebelc46af972022-10-04 15:16:32504 {"new FRE with tangible sync A", kNewMICEFREWithTangibleSyncA,
505 std::size(kNewMICEFREWithTangibleSyncA), nullptr},
506 {"new FRE with tangible sync B", kNewMICEFREWithTangibleSyncB,
507 std::size(kNewMICEFREWithTangibleSyncB), nullptr},
508 {"new FRE with tangible sync C", kNewMICEFREWithTangibleSyncC,
509 std::size(kNewMICEFREWithTangibleSyncC), nullptr},
Jérôme Lebelce6f7162022-11-07 19:07:32510 {"new FRE with tangible sync D", kNewMICEFREWithTangibleSyncD,
511 std::size(kNewMICEFREWithTangibleSyncD), nullptr},
512 {"new FRE with tangible sync E", kNewMICEFREWithTangibleSyncE,
513 std::size(kNewMICEFREWithTangibleSyncE), nullptr},
514 {"new FRE with tangible sync F", kNewMICEFREWithTangibleSyncF,
515 std::size(kNewMICEFREWithTangibleSyncF), nullptr},
jlebel041fc1c2022-03-04 12:53:30516 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
517 std::size(kNewMICEFREWithTwoSteps), nullptr}};
518
Louis Romero023cc5052022-04-08 23:29:39519const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
520 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01521const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
522 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
523const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
524 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
525const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
526 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
527const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39528 {"Target Highlight", kBubbleRichIPHTargetHighlight,
529 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01530 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
531 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
532 {"Dismissal and rich content", kBubbleRichIPHRich,
533 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39534 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01535 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
536};
537
Christian Xubdedabec2022-07-04 10:00:13538const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueIconCapsule[] = {
539 {kOmniboxPasteButtonParameterName,
540 kOmniboxPasteButtonParameterBlueIconCapsule}};
541const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueFullCapsule[] = {
542 {kOmniboxPasteButtonParameterName,
543 kOmniboxPasteButtonParameterBlueFullCapsule}};
544const FeatureEntry::FeatureVariation kOmniboxPasteButtonVariations[] = {
545 {"Icon only", kOmniboxPasteButtonBlueIconCapsule,
546 std::size(kOmniboxPasteButtonBlueIconCapsule), nullptr},
547 {"Icon and text", kOmniboxPasteButtonBlueFullCapsule,
548 std::size(kOmniboxPasteButtonBlueFullCapsule), nullptr},
549};
550
Igor Ruvinov44fed9f2022-06-10 22:51:42551const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
552const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
553 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
554 nullptr}};
555
Aliona DANGLA00ae7db2022-10-04 16:58:50556const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58557 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49558const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58559 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49560const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58561 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
562
Aliona DANGLAa5257ccc2022-08-29 14:01:49563const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50564 {"With legacy download", kOpenInDownloadInShareButton,
565 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49566 {"With WKDownload", kOpenInDownloadWithWKDownload,
567 std::size(kOpenInDownloadWithWKDownload), nullptr},
568 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
569 nullptr},
570};
571
Ewann Pelle3774cac532022-11-15 10:12:37572const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
573 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
574const FeatureEntry::FeatureParam kEnablePinnedTabsTopPosition[] = {
575 {kEnablePinnedTabsParameterName, kEnablePinnedTabsTopParam}};
576
577const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
578 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
579 std::size(kEnablePinnedTabsBottomPosition), nullptr},
580 {"top pinned tabs", kEnablePinnedTabsTopPosition,
581 std::size(kEnablePinnedTabsTopPosition), nullptr},
582};
583
ginnnnnnny591a4972022-09-01 16:10:27584const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
585 {autofill::features::kAutofillBrandingIOSParam, "true"}};
586const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
587 {"(Monotone)", kAutofillBrandingIOSMonotone,
588 std::size(kAutofillBrandingIOSMonotone), nullptr}};
589
Scott Yodercb2fe632022-09-12 15:28:35590const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26591 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35592const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
593 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
594 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
595
Benjamin Williamsaa8da8142022-11-14 19:51:03596const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
597 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
598const FeatureEntry::FeatureVariation
599 kIOSPopularSitesImprovedSuggestionsVariations[] = {
600 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
601 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
602
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28603const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
604 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
605const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
606 {"with search result page", kEnableExperienceKitMapsWithSrp,
607 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
608
adamta3811f9182022-10-24 17:49:33609const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
610 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
611 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
612const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
613 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
614 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
615
616const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
617 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
618 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
619 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
620 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
621
Cooper Knaak1e026562017-07-26 05:22:28622// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21623// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28624// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
625// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21626// macro for this type supplying the command line to the macro.
627// . MULTI_VALUE: a list of choices, the first of which should correspond to a
628// deactivated state for this lab (i.e. no command line option). To specify
629// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
630// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28631// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
632// either enabled, disabled, or uses the default value of the associated
633// base::Feature instance. To specify this type of entry use the macro
634// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
635// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
636// base::Feature instance. Choices corresponding to the default state, a
637// universally enabled state, and a universally disabled state are
638// automatically included. To specify this type of entry use the macro
639// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
640// the array of choices.
641//
sdefresne14900ee2015-11-27 14:43:21642// See the documentation of FeatureEntry for details on the fields.
643//
644// When adding a new choice, add it to the end of the list.
645const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28646 {"in-product-help-demo-mode-choice",
647 flag_descriptions::kInProductHelpDemoModeName,
648 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
649 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23650 feature_engagement::kIPHDemoMode,
651 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09652 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22653 {"enable-autofill-credit-card-upload",
654 flag_descriptions::kAutofillCreditCardUploadName,
655 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24656 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Tina Wang41d431c2021-06-21 21:04:13657 {"enable-discover-feed-preview",
658 flag_descriptions::kEnableDiscoverFeedPreviewName,
659 flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos,
660 FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)},
Moe Ahmadid6d5d172018-06-20 17:20:23661 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
662 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
663 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51664 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23665 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
666 {"wallet-service-use-sandbox",
667 flag_descriptions::kWalletServiceUseSandboxName,
668 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
669 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
670 autofill::switches::kWalletServiceUseSandbox,
671 "1",
672 autofill::switches::kWalletServiceUseSandbox,
673 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59674 {"show-autofill-type-predictions",
675 flag_descriptions::kShowAutofillTypePredictionsName,
676 flag_descriptions::kShowAutofillTypePredictionsDescription,
677 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46678 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22679 {"autofill-ios-delay-between-fields",
680 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
681 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
682 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20683 {"fullscreen-promos-manager",
684 flag_descriptions::kFullscreenPromosManagerName,
685 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
686 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05687 {"fullscreen-promos-manager-skip-internal-limits",
688 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
689 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
690 flags_ui::kOsIos,
691 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14692 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53693 flag_descriptions::kFullscreenSmoothScrollingName,
694 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
695 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06696 {"webpage-default-zoom-from-dynamic-type",
697 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
698 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
699 flags_ui::kOsIos,
700 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56701 {"webpage-alternative-text-zoom",
702 flag_descriptions::kWebPageAlternativeTextZoomName,
703 flag_descriptions::kWebPageAlternativeTextZoomDescription,
704 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34705 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
706 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
707 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28708 {"toolbar-container", flag_descriptions::kToolbarContainerName,
709 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
710 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13711 {"omnibox-ui-max-autocomplete-matches",
712 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
713 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
714 flags_ui::kOsIos,
715 FEATURE_WITH_PARAMS_VALUE_TYPE(
716 omnibox::kUIExperimentMaxAutocompleteMatches,
717 kOmniboxUIMaxAutocompleteMatchesVariations,
718 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35719 {"omnibox-local-history-zero-suggest-beyond-ntp",
720 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
721 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
722 flags_ui::kOsIos,
723 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54724 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
725 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
726 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
727 kOmniboxMaxZPSMatchesVariations,
728 "OmniboxMaxZPSVariations")},
Caitlin Fischer43edd90a2019-05-01 13:24:30729 {"autofill-use-mobile-label-disambiguation",
730 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
731 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
732 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45733 FEATURE_WITH_PARAMS_VALUE_TYPE(
734 autofill::features::kAutofillUseMobileLabelDisambiguation,
735 kAutofillUseMobileLabelDisambiguationVariations,
736 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46737 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
738 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30739 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48740 {"force-startup-signin-promo",
741 flag_descriptions::kForceStartupSigninPromoName,
742 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29743 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22744 {"restore-session-from-cache",
745 flag_descriptions::kRestoreSessionFromCacheName,
746 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49747 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59748 {"autofill-save-card-dismiss-on-navigation",
749 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
750 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
751 flags_ui::kOsIos,
752 FEATURE_VALUE_TYPE(
753 autofill::features::kAutofillSaveCardDismissOnNavigation)},
sczs37d9c132020-07-18 06:06:33754 {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
adamta22a4d502020-05-21 03:12:21755 flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
gogeralddb0d8ae2020-11-13 03:56:58756 FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
757 kDiscoverFeedInNtpVariations,
758 "IOSDiscoverFeed")},
Roberto Mourab87b9722020-06-17 17:12:09759 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
760 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
761 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41762 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
763 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
764 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
jlebel041fc1c2022-03-04 12:53:30765 {"new-mobile-identity-consistency-fre",
766 flag_descriptions::kNewMobileIdentityConsistencyFREName,
767 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
768 flags_ui::kOsIos,
769 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
770 kNewMobileIdentityConsistencyFREVariations,
ginnnnnnny46435132022-06-01 16:06:04771 kIOSMICeAndDefaultBrowserTrialName)},
Sylvain Defresne9c107082020-10-27 16:39:13772#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45773 {"screen-time-integration-ios",
774 flag_descriptions::kScreenTimeIntegrationName,
775 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
776 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13777#endif
Nazerke3e993f72020-09-21 13:00:06778 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
779 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
780 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55781 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
782 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
783 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14784 {"default-browser-fullscreen-promo-experiment",
785 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
786 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
787 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59788 FEATURE_WITH_PARAMS_VALUE_TYPE(
789 kDefaultBrowserFullscreenPromoExperiment,
790 kDefaultBrowserFullscreenPromoExperimentVariations,
791 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11792 {"ios-shared-highlighting-color-change",
793 flag_descriptions::kIOSSharedHighlightingColorChangeName,
794 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07795 flags_ui::kOsIos,
796 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34797 {"ios-shared-highlighting-v2",
798 flag_descriptions::kIOSSharedHighlightingV2Name,
799 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
800 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45801 {"omnibox-new-textfield-implementation",
802 flag_descriptions::kOmniboxNewImplementationName,
803 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
804 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26805 {"omnibox-on-focus-suggestions-contextual-web",
806 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
807 flag_descriptions::
808 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
809 flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
811 {"omnibox-on-focus-suggestions-srp",
812 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
813 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
814 flags_ui::kOsIos,
815 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapuginecf128a92022-08-30 11:23:15816 {"omnibox-fuzzy-url-suggestions",
817 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
818 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
819 flags_ui::kOsIos,
820 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
Stepan Khapugin422f08d2022-02-18 16:19:44821 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
822 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23823 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
824 kiOSOmniboxUpdatedPopupUIVariations,
Stepan Khapugina45baed2022-05-13 19:15:43825 "IOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19826 {"start-surface", flag_descriptions::kStartSurfaceName,
827 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23828 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
829 kStartSurfaceVariations,
830 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28831 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
832 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
833 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42834 {"autofill-address-verification-in-save-prompt",
835 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
836 flag_descriptions::
837 kEnableAutofillAddressSavePromptAddressVerificationDescription,
838 flags_ui::kOsIos,
839 FEATURE_VALUE_TYPE(
840 autofill::features::
841 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25842 {"filling-across-affiliated-websites",
843 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
844 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
845 flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(
847 password_manager::features::kFillingAcrossAffiliatedWebsites)},
edchin257cea2f2021-04-07 13:07:13848 {"interest-feed-v2-clicks-and-views-cond-upload",
849 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
850 flag_descriptions::
851 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
852 flags_ui::kOsIos,
853 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Side Yilmaz6c53f7102021-09-07 13:26:19854 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
855 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
856 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33857 {"update-history-entry-points-in-incognito",
858 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
859 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
860 flags_ui::kOsIos,
861 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
Mikel Astiz850b0fe2021-06-16 09:47:27862 {"sync-trusted-vault-passphrase-promo",
863 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
864 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
865 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51866 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27867 {"sync-trusted-vault-passphrase-recovery",
868 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
869 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
870 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51871 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34872 {"wait-threshold-seconds-for-capabilities-api",
873 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
874 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
875 flags_ui::kOsIos,
876 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23877 {"autofill-fill-merchant-promo-code-fields",
878 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
879 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
880 flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(
882 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03883 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
884 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18886 {"new-overflow-menu-alternate-iph",
887 flag_descriptions::kNewOverflowMenuAlternateIPHName,
888 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
889 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24890 {"use-lens-to-search-for-image",
891 flag_descriptions::kUseLensToSearchForImageName,
892 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44893 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22894 {"enable-lens-in-home-screen-widget",
895 flag_descriptions::kEnableLensInHomeScreenWidgetName,
896 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
897 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
898 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
899 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
901 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
902 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
903 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Jason Hu67cfb0f2022-11-14 20:21:44904 {"enable-lens-in-omnibox-copied-image",
905 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
906 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
907 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40908 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23909 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
910 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40911 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23912 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03913 {"enable-discover-feed-static-resource-serving",
914 flag_descriptions::kEnableDiscoverFeedStaticResourceServingName,
915 flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription,
916 flags_ui::kOsIos,
917 FEATURE_WITH_PARAMS_VALUE_TYPE(
918 kEnableDiscoverFeedStaticResourceServing,
919 kEnableDiscoverFeedStaticResourceServingVariations,
920 "IOSDiscoverFeedStaticResourceServing")},
921 {"enable-disco-feed-endpoint",
922 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
923 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
924 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11925 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15926 {"enable-discover-feed-top-sync-promo",
927 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
928 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
929 flags_ui::kOsIos,
930 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
931 kDiscoverFeedTopSyncPromoVariations,
932 "EnableDiscoverFeedTopSyncPromo")},
Aliona DANGLA8fae66f02021-10-06 15:47:11933 {"enable-fre-default-browser-screen-testing",
ginnnnnnny46435132022-06-01 16:06:04934 flag_descriptions::kEnableFREDefaultBrowserPromoScreenName,
935 flag_descriptions::kEnableFREDefaultBrowserPromoScreenDescription,
Aliona DANGLA8fae66f02021-10-06 15:47:11936 flags_ui::kOsIos,
ginnnnnnny46435132022-06-01 16:06:04937 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserPromoScreen,
938 kFREDefaultBrowserPromoVariations,
939 kIOSMICeAndDefaultBrowserTrialName)},
Tommy Martino7393d762021-10-12 17:59:28940 {"shared-highlighting-amp",
941 flag_descriptions::kIOSSharedHighlightingAmpName,
942 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
943 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28944 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42945 commerce::flag_descriptions::kCommercePriceTrackingName,
946 commerce::flag_descriptions::kCommercePriceTrackingDescription,
947 flags_ui::kOsIos,
948 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
949 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15950 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06951 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
952 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
953 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54954 {"ntp-view-hierarchy-repair",
955 flag_descriptions::kNTPViewHierarchyRepairName,
956 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
957 FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26958 {"synthesized-restore-session",
959 flag_descriptions::kSynthesizedRestoreSessionName,
960 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
961 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41962 {"enable-password-manager-branding-update",
963 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
964 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
965 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19966 FEATURE_VALUE_TYPE(
967 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
ginnnnnnnyee3036e2022-08-12 18:01:18968 {"ios-media-permissions-control",
969 flag_descriptions::kMediaPermissionsControlName,
970 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
971 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34972 {"enable-save-session-tabs-in-separate-files",
973 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
974 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
975 flags_ui::kOsIos,
976 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Ewann8c7aadc2022-05-19 15:41:05977 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
978 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
979 FEATURE_VALUE_TYPE(kUseSFSymbols)},
Nohemi Fernandez76f54802022-01-10 18:23:32980 {"enable-unicorn-account-support",
981 flag_descriptions::kEnableUnicornAccountSupportName,
982 flag_descriptions::kEnableUnicornAccountSupportDescription,
983 flags_ui::kOsIos,
984 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
David Jeanc2b88ab602022-08-08 14:52:51985 {"ios-webpage-intent-annotations",
986 flag_descriptions::kEnableWebPageAnnotationsName,
987 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26989 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
990 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
991 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01992 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
993 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
994 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramos34175732022-02-14 18:59:16995 {"enable-enhanced-safe-browsing",
996 flag_descriptions::kEnhancedProtectionName,
997 flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos,
998 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)},
Joemer Ramos26e2b512022-05-24 17:26:41999 {"enable-enhanced-safe-browsing-phase-2",
1000 flag_descriptions::kEnhancedProtectionPhase2Name,
1001 flag_descriptions::kEnhancedProtectionPhase2Description, flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtectionPhase2IOS)},
Joemer Ramosc34a30a02022-09-22 15:18:431003 {"enable-tailored-security-integration",
1004 flag_descriptions::kTailoredSecurityIntegrationName,
1005 flag_descriptions::kTailoredSecurityIntegrationDescription,
1006 flags_ui::kOsIos,
1007 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:261008 {"autofill-enable-card-product-name",
1009 flag_descriptions::kAutofillEnableCardProductNameName,
1010 flag_descriptions::kAutofillEnableCardProductNameDescription,
1011 flags_ui::kOsIos,
1012 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:001013 {"send-tab-to-self-signin-promo",
1014 flag_descriptions::kSendTabToSelfSigninPromoName,
1015 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
1016 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Christian Xubd60c4b72022-03-22 15:25:011017 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
1018 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
1019 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
1020 kBubbleRichIPHVariations,
1021 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:221022 {"autofill-enforce-delays-in-strike-database",
1023 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
1024 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
1025 flags_ui::kOsIos,
1026 FEATURE_VALUE_TYPE(
1027 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:411028 {"autofill-upstream-allow-additional-email-domains",
1029 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
1030 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
1031 flags_ui::kOsIos,
1032 FEATURE_VALUE_TYPE(
1033 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
1034 {"autofill-upstream-allow-all-email-domains",
1035 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
1036 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
1037 flags_ui::kOsIos,
1038 FEATURE_VALUE_TYPE(
1039 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521040 {"enable-download-service-foreground-session",
1041 flag_descriptions::kDownloadServiceForegroundSessionName,
1042 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1043 flags_ui::kOsIos,
1044 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231045 {"enable-tflite-language-detection",
1046 flag_descriptions::kTFLiteLanguageDetectionName,
1047 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1048 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201049 {"optimization-guide-debug-logs",
1050 flag_descriptions::kOptimizationGuideDebugLogsName,
1051 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1052 flags_ui::kOsIos,
1053 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Olivier Robinffe767c2022-04-21 13:13:231054 {"optimization-guide-model-downloading",
1055 flag_descriptions::kOptimizationGuideModelDownloadingName,
1056 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
1057 flags_ui::kOsIos,
1058 FEATURE_VALUE_TYPE(
1059 optimization_guide::features::kOptimizationGuideModelDownloading)},
1060 {"optimization-target-prediction",
1061 flag_descriptions::kOptimizationTargetPredictionName,
1062 flag_descriptions::kOptimizationTargetPredictionDescription,
1063 flags_ui::kOsIos,
1064 FEATURE_VALUE_TYPE(
1065 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:541066 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1067 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1068 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1069 {"sync-standalone-invalidations-wallet-and-offer",
1070 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1071 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1072 flags_ui::kOsIos,
1073 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011074 {"suggestions-scrolling-ipad",
1075 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1076 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1077 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
David Jean7a8fa702022-05-02 15:21:221078 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
1079 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
1080 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551081 {"experience-kit-apple-calendar",
1082 flag_descriptions::kAppleCalendarExperienceKitName,
1083 flag_descriptions::kAppleCalendarExperienceKitDescription,
1084 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:391085 {"enable-expkit-calendar-text-classifier",
1086 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1087 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1088 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:081089 {"enable-expkit-text-classifier",
1090 flag_descriptions::kEnableExpKitTextClassifierName,
1091 flag_descriptions::kEnableExpKitTextClassifierDescription,
1092 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181093 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1094 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281095 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1096 kEnableExperienceKitMapsVariations,
1097 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051098 {"enable-long-press-surrounding-text",
1099 flag_descriptions::kLongPressSurroundingTextName,
1100 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1101 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011102 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1103 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1104 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251105 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1106 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1107 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221108 {"smart-sorting-new-overflow-menu",
1109 flag_descriptions::kSmartSortingNewOverflowMenuName,
1110 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1111 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Scott Yoder10493562022-06-28 17:37:441112 {"new-overflow-menu-share-chrome-action",
1113 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1114 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1115 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekled46a36982022-05-09 20:32:421116 {"autofill-enable-ranking-formula",
1117 flag_descriptions::kAutofillEnableRankingFormulaName,
1118 flag_descriptions::kAutofillEnableRankingFormulaDescription,
1119 flags_ui::kOsIos,
1120 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)},
Sergio Collazos58558712022-05-18 17:24:021121 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1122 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1123 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Lu7f024ed2c2022-05-27 23:11:271124 {"content-suggestions-ui-module-refresh",
1125 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1126 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401127 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581128 FEATURE_WITH_PARAMS_VALUE_TYPE(
1129 kContentSuggestionsUIModuleRefresh,
1130 kModuleRefreshVariations,
1131 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571132 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1133 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1134 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061135 {"default-browser-intents-show-settings",
1136 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1137 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1138 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Ed Chin76b1b35e2022-06-08 23:01:171139 {"enable-discover-feed-ghost-cards",
1140 flag_descriptions::kEnableDiscoverFeedGhostCardsName,
1141 flag_descriptions::kEnableDiscoverFeedGhostCardsDescription,
1142 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDiscoverFeedGhostCardsEnabled)},
Igor Ruvinova43a66dc2022-06-09 21:57:451143 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1144 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421145 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1146 kDmTokenDeletionVariation,
1147 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191148 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1149 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1150 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291151 {"ios-password-manager-cross-origin-iframe-support",
1152 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1153 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1154 flags_ui::kOsIos,
1155 FEATURE_VALUE_TYPE(password_manager::features::
1156 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031157 {"ios-popular-sites-improved-suggestions",
1158 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1159 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1160 flags_ui::kOsIos,
1161 FEATURE_WITH_PARAMS_VALUE_TYPE(
1162 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1163 kIOSPopularSitesImprovedSuggestionsVariations,
1164 field_trial_constants::
1165 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141166 {"omnibox-adaptive-suggestions-count",
1167 flag_descriptions::kAdaptiveSuggestionsCountName,
1168 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1169 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201170 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1171 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581172 FEATURE_WITH_PARAMS_VALUE_TYPE(
1173 kTrendingQueriesModule,
1174 kTrendingQueriesModuleVariations,
1175 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321176 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191177 flag_descriptions::kAutofillParseIBANFieldsName,
1178 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1179 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361180 {"autofill-enable-new-card-unmask-prompt-view",
1181 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1182 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1183 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271184 FEATURE_VALUE_TYPE(
1185 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Christian Xubdedabec2022-07-04 10:00:131186 {"omnibox-paste-button", flag_descriptions::kOmniboxPasteButtonName,
1187 flag_descriptions::kOmniboxPasteButtonDescription, flags_ui::kOsIos,
1188 FEATURE_WITH_PARAMS_VALUE_TYPE(kOmniboxPasteButton,
1189 kOmniboxPasteButtonVariations,
1190 "OmniboxPasteButton")},
Moe Ahmadi098519d82022-07-27 18:34:241191 {"omnibox-zero-suggest-prefetching",
1192 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1193 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1194 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451195 {"omnibox-zero-suggest-prefetching-on-srp",
1196 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1197 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1198 flags_ui::kOsIos,
1199 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1200 {"omnibox-zero-suggest-prefetching-on-web",
1201 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1202 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1203 flags_ui::kOsIos,
1204 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471205 {"omnibox-zero-suggest-in-memory-caching",
1206 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1207 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1208 flags_ui::kOsIos,
1209 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351210 {"omnibox-on-device-tail-suggestions",
1211 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1212 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1213 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391214 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1215 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501216 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491217 {"enable-sync-history-datatype",
1218 flag_descriptions::kSyncEnableHistoryDataTypeName,
1219 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1220 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361221 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1222 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1223 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1224 kOmniboxMaxURLMatchesVariations,
1225 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061226 {"metrickit-non-crash-reports",
1227 flag_descriptions::kMetrickitNonCrashReportName,
1228 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1229 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371230 {"autofill-enable-remade-downstream-metrics",
1231 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1232 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1233 flags_ui::kOsIos,
1234 FEATURE_VALUE_TYPE(
1235 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551236 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1237 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1238 flag_descriptions::
1239 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1240 flags_ui::kOsIos,
1241 FEATURE_VALUE_TYPE(
1242 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341243#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1244 {"feed-background-refresh-ios",
1245 flag_descriptions::kFeedBackgroundRefreshName,
1246 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1247 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1248 kFeedBackgroundRefreshVariations,
1249 "FeedBackgroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191250 {"omnibox-keyboard-paste-button",
1251 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1252 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1253 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin91e44992022-07-27 13:42:341254#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Arthur Milchiorcf4877e2022-07-29 14:23:411255 {"enable-cbd-sign-out", flag_descriptions::kEnableCBDSignOutName,
1256 flag_descriptions::kEnableCBDSignOutDescription, flags_ui::kOsIos,
Arthur Milchiord36e2502022-08-11 16:10:111257 FEATURE_VALUE_TYPE(switches::kEnableCbdSignOut)},
Aliona DANGLAa5257ccc2022-08-29 14:01:491258 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1259 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1260 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1261 kOpenInDownloadVariations,
1262 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171263 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1264 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411265 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1266 kWhatsNewLayoutVariations,
1267 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271268 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1269 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1270 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1271 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051272 "AutofillBrandingIOS")},
1273 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1274 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1275 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351276 {"ios-new-post-restore-experience",
1277 flag_descriptions::kIOSNewPostRestoreExperienceName,
1278 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1279 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261280 FEATURE_WITH_PARAMS_VALUE_TYPE(
1281 post_restore_signin::features::kIOSNewPostRestoreExperience,
1282 kIOSNewPostRestoreExperienceVariations,
1283 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021284 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1285 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1286 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501287 {"enable-tflite-language-detection-ignore",
1288 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1289 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1290 flags_ui::kOsIos,
1291 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141292 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1293 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1294 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471295 {"enable-check-visibility-on-attention-log-start",
1296 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1297 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1298 flags_ui::kOsIos,
1299 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1300 {"enable-refine-data-source-reload-reporting",
1301 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1302 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1303 flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Noémie St-Ongeac7a84b2022-10-14 22:32:521305 {"enable-compromised-passwords-muting",
1306 flag_descriptions::kEnableCompromisedPasswordsMutingName,
1307 flag_descriptions::kEnableCompromisedPasswordsMutingDescription,
1308 flags_ui::kOsIos,
1309 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041310 {"enable-passwords-account-storage",
1311 flag_descriptions::kEnablePasswordsAccountStorageName,
1312 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1313 flags_ui::kOsIos,
1314 FEATURE_VALUE_TYPE(
1315 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331316 {"enable-default-following-feed-sort-type",
1317 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1318 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1319 flags_ui::kOsIos,
1320 FEATURE_WITH_PARAMS_VALUE_TYPE(kFollowingFeedDefaultSortType,
1321 kFollowingFeedDefaultSortTypeVariations,
1322 "FollowingFeedDefaultSortType")},
Christian Xu4eb28d42022-10-28 17:54:481323 {"omnibox-carousel-dynamic-spacing",
1324 flag_descriptions::kOmniboxCarouselDynamicSpacingName,
1325 flag_descriptions::kOmniboxCarouselDynamicSpacingDescription,
1326 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxCarouselDynamicSpacing)},
Gauthier Ambardd0187592022-11-03 16:31:131327 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1328 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1329 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Gauthier Ambardc0410632022-11-16 08:45:351330 {"tab-grid-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011331 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1332 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371333 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1334 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1335 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1336 kEnablePinnedTabsVariations,
1337 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031338 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1339 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1340 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411341 {"credential-provider-extension-promo",
1342 flag_descriptions::kCredentialProviderExtensionPromoName,
1343 flag_descriptions::kCredentialProviderExtensionPromoDescription,
1344 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kCredentialProviderExtensionPromo)},
Hira Mahmoodb0e5f412022-09-01 19:41:051345};
sdefresne14900ee2015-11-27 14:43:211346
Rohit Raobed794c2020-04-27 15:27:451347bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1348 return false;
1349}
1350
1351flags_ui::FlagsState& GetGlobalFlagsState() {
1352 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1353 nullptr);
1354 return *flags_state;
1355}
David Jean5ca263c2021-08-18 09:19:301356// Creates the experimental test policies map, used by AsyncPolicyLoader and
1357// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341358NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211359 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1360
Guillaume Jenkins25e9bd72020-08-27 17:39:061361 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551362 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061363 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551364
Guillaume Jenkins25e9bd72020-08-27 17:39:061365 // Set some sample policy values for testing if EnableSamplePolicies is set to
1366 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401367 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551368 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011369 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1370
Guillaume Jenkinseeb7007c2020-06-25 22:55:401371 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1372
1373 // 2 = Disable all variations
1374 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1375
1376 // 2 = Do not allow any site to show popups
1377 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1378
Tina Wang5abee802020-07-29 23:09:521379 // Set default search engine.
1380 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1381 @YES,
1382 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1383 @"http://www.google.com/search?q={searchTerms}",
1384 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021385 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521386
Tina Wang89068c82020-10-29 15:51:501387 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1388
Gauthier Ambard21b23702021-04-16 16:11:271389 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1390
Guillaume Jenkinseeb7007c2020-06-25 22:55:401391 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011392
1393 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531394
1395 // 2 = Enhanced safe browsing protection
1396 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1397
1398 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:551399 }];
1400 }
1401
Ewann227a3c02021-04-19 12:04:541402 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041403 NSString* sync_policy_key =
1404 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301405 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541406 }
Ewann227a3c02021-04-19 12:04:541407
Ewann570a6302021-08-17 07:22:421408 // SyncTypesListDisabled policy.
1409 NSString* Sync_types_list_disabled_key =
1410 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1411 NSMutableArray* Sync_types_list_disabled_values =
1412 [[NSMutableArray alloc] init];
1413 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1414 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1415 }
1416 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1417 [Sync_types_list_disabled_values addObject:@"readingList"];
1418 }
1419 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1420 [Sync_types_list_disabled_values addObject:@"preferences"];
1421 }
1422 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1423 [Sync_types_list_disabled_values addObject:@"passwords"];
1424 }
1425 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1426 [Sync_types_list_disabled_values addObject:@"autofill"];
1427 }
1428 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1429 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1430 }
1431 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1432 [Sync_types_list_disabled_values addObject:@"tabs"];
1433 }
1434 if ([Sync_types_list_disabled_values count]) {
1435 [testing_policies addEntriesFromDictionary:@{
1436 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1437 }];
Ewann570a6302021-08-17 07:22:421438 }
1439
Gauthier Ambard073eaa92021-11-22 15:24:131440 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521441 NSString* incognito_policy_key =
1442 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1443 NSInteger incognito_mode_availability =
1444 [defaults integerForKey:incognito_policy_key];
1445 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521446 [testing_policies addEntriesFromDictionary:@{
1447 incognito_policy_key : @(incognito_mode_availability),
1448 }];
1449 }
1450
Ewann40a8f8a2021-07-29 10:01:201451 NSString* restriction_pattern =
1452 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1453 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291454 NSString* restrict_key =
1455 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201456 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291457 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201458 }];
1459 }
1460
Vincent Boisselle19200bc2021-09-01 17:58:251461 // If the sign-in policy is set (not "None"), add the policy key to the list
1462 // of enabled experimental policies, and set the value.
1463 NSString* const kSigninPolicyKey = @"BrowserSignin";
1464 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1465 if (signin_policy_mode) {
1466 // Remove the mode offset that was used to represent the unset policy.
1467 --signin_policy_mode;
1468 DCHECK(signin_policy_mode >= 0);
1469
Vincent Boisselle19200bc2021-09-01 17:58:251470 [testing_policies addEntriesFromDictionary:@{
1471 kSigninPolicyKey : @(signin_policy_mode),
1472 }];
1473 }
1474
Veronique Nguyen9b1044f2022-01-11 14:41:131475 // If the New Tab Page URL is set (not empty) add the value to the list of
1476 // test policies.
1477 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1478 if ([ntp_location length] > 0) {
1479 NSString* ntp_location_key =
1480 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1481 [testing_policies
1482 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571483 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131484 }
1485
Ali Juma9ec36d22022-03-28 14:53:121486 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1487 NSString* allow_backups_key =
1488 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1489 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1490 [allowed_experimental_policies addObject:allow_backups_key];
1491 }
1492
Guillaume Jenkins25e9bd72020-08-27 17:39:061493 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1494 // policy.
1495 if ([allowed_experimental_policies count] > 0) {
1496 [testing_policies setValue:allowed_experimental_policies
1497 forKey:base::SysUTF8ToNSString(
1498 policy::key::kEnableExperimentalPolicies)];
1499 }
1500
jlebel2eb40222022-05-06 11:15:421501 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1502 switch ([defaults integerForKey:metrics_reporting_key]) {
1503 case 1:
1504 // Metrics reporting forced.
1505 [testing_policies setValue:@(YES) forKey:metrics_reporting_key];
1506 break;
1507 case 2:
1508 // Metrics reporting disabled.
1509 [testing_policies setValue:@(NO) forKey:metrics_reporting_key];
1510 break;
1511 default:
1512 // Metrics reporting not managed.
1513 break;
1514 }
1515
David Jean6f85d44f2021-08-19 08:08:451516 // Warning: Add new flags to TestingPoliciesHash() below.
1517
David Jean5ca263c2021-08-18 09:19:301518 return testing_policies;
1519}
David Jean6f85d44f2021-08-19 08:08:451520
1521// Generates a unique NSString based on currently monitored policies from
1522// NSUserDefaults standardUserDefaults.
1523NSString* TestingPoliciesHash() {
1524 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1525 return [NSString
jlebel2eb40222022-05-06 11:15:421526 stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d|%d|%@|%d",
Ali Juma9ec36d22022-03-28 14:53:121527 [defaults boolForKey:@"DisallowChromeDataInBackups"],
David Jean6f85d44f2021-08-19 08:08:451528 [defaults boolForKey:@"EnableSyncDisabledPolicy"],
1529 [defaults boolForKey:@"EnableSamplePolicies"],
jlebel2eb40222022-05-06 11:15:421530 static_cast<int>([defaults
1531 integerForKey:@"IncognitoModeAvailability"]),
David Jean6f85d44f2021-08-19 08:08:451532 [defaults stringForKey:@"RestrictAccountsToPatterns"],
1533 [defaults boolForKey:@"SyncTypesListBookmarks"],
1534 [defaults boolForKey:@"SyncTypesListReadingList"],
1535 [defaults boolForKey:@"SyncTypesListPreferences"],
1536 [defaults boolForKey:@"SyncTypesListPasswords"],
1537 [defaults boolForKey:@"SyncTypesListAutofill"],
1538 [defaults boolForKey:@"SyncTypesListTypedUrls"],
jlebel2eb40222022-05-06 11:15:421539 [defaults boolForKey:@"SyncTypesListTabs"],
1540 static_cast<int>(
1541 [defaults integerForKey:@"BrowserSignin"]),
1542 [defaults stringForKey:@"NTPLocation"],
1543 static_cast<int>([defaults
1544 integerForKey:@"MetricsReportingEnabled"])];
David Jean6f85d44f2021-08-19 08:08:451545}
David Jean5ca263c2021-08-18 09:19:301546} // namespace
1547
Gauthier Ambard02dbf022022-08-23 08:28:471548// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301549void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1550 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1551
1552 // Set the UA flag if UseMobileSafariUA is enabled.
1553 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1554 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1555 // Chrome puts its product token.
1556 int32_t major = 0;
1557 int32_t minor = 0;
1558 int32_t bugfix = 0;
1559 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1560 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1561
1562 command_line->AppendSwitchASCII(switches::kUserAgent,
1563 web::BuildMobileUserAgent(product));
1564 }
1565
1566 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341567 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301568
1569 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1570 // Management to enabled and add the token to the list of policies.
1571 NSString* token_key =
1572 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1573 NSString* token = [defaults stringForKey:token_key];
1574
1575 if ([token length] > 0) {
1576 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1577 [testing_policies setValue:token forKey:token_key];
1578 }
1579
Guillaume Jenkins57606d72020-08-13 17:32:551580 // If some policies were set, commit them to the app's registration defaults.
1581 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401582 NSDictionary* registration_defaults =
1583 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1584 [defaults registerDefaults:registration_defaults];
1585 }
1586
sdefresne14900ee2015-11-27 14:43:211587 // Freeform commandline flags. These are added last, so that any flags added
1588 // earlier in this function take precedence.
1589 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1590 base::CommandLine::StringVector flags;
1591 // Append an empty "program" argument.
1592 flags.push_back("");
1593
1594 // The number of flags corresponds to the number of text fields in
1595 // Experimental.plist.
1596 const int kNumFreeformFlags = 5;
1597 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1598 NSString* key =
1599 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1600 NSString* flag = [defaults stringForKey:key];
1601 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331602 // iOS keyboard replaces -- with —, so undo that.
1603 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1604 withString:@"--"
1605 options:0
1606 range:NSMakeRange(0, 1)];
1607 // To make things easier, allow flags with no dashes by prepending them
1608 // here. This also allows for flags that just have one dash if they
1609 // exist.
1610 if (![flag hasPrefix:@"-"]) {
1611 flag = [@"--" stringByAppendingString:flag];
1612 }
sdefresne14900ee2015-11-27 14:43:211613 flags.push_back(base::SysNSStringToUTF8(flag));
1614 }
1615 }
1616
1617 base::CommandLine temp_command_line(flags);
1618 command_line->AppendArguments(temp_command_line, false);
1619 }
msardafc76f662017-02-24 12:46:281620
justincohendacc85d2017-06-28 23:34:101621 // Populate command line flag for 3rd party keyboard omnibox workaround.
1622 NSString* enableThirdPartyKeyboardWorkaround =
1623 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1624 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1625 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1626 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1627 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1628 }
1629
Sylvain Defresned3cd8d92022-01-18 13:35:081630 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211631}
1632
David Jean5ca263c2021-08-18 09:19:301633void MonitorExperimentalSettingsChanges() {
David Jean5ca263c2021-08-18 09:19:301634 // Startup values for settings to be observed.
David Jean6f85d44f2021-08-19 08:08:451635 __block NSString* hash = TestingPoliciesHash();
David Jeane83ed652021-08-25 14:52:481636 static std::atomic_bool pending_check(false);
David Jean5ca263c2021-08-18 09:19:301637
1638 auto monitor = ^(NSNotification* notification) {
David Jeane83ed652021-08-25 14:52:481639 bool has_pending_check = pending_check.exchange(true);
1640 if (has_pending_check)
1641 return;
1642
David Jeanbc0fae32021-08-25 10:31:391643 // Can be called from any thread from where the notification was sent,
1644 // but since it may change standardUserDefaults, and that has to be on main
1645 // thread, dispatch to main thread.
1646 dispatch_async(dispatch_get_main_queue(), ^{
1647 // Check if observed settings have changed. Since source and destination
1648 // are both user defaults, this is required to avoid cycling back here.
1649 NSString* newHash = TestingPoliciesHash();
1650 if (![newHash isEqualToString:hash]) {
1651 hash = newHash;
David Jean5ca263c2021-08-18 09:19:301652
David Jeanbc0fae32021-08-25 10:31:391653 // Publish update.
1654 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1655 NSMutableDictionary* testing_policies =
Vincent Boisselleed0e6f1a2021-11-09 06:47:341656 CreateExperimentalTestingPolicies();
David Jeanbc0fae32021-08-25 10:31:391657 NSDictionary* registration_defaults =
1658 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1659 [defaults registerDefaults:registration_defaults];
1660 }
David Jeane83ed652021-08-25 14:52:481661
1662 pending_check.store(false);
David Jeanbc0fae32021-08-25 10:31:391663 });
David Jean5ca263c2021-08-18 09:19:301664 };
1665
1666 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1667 [center addObserverForName:NSUserDefaultsDidChangeNotification
1668 object:nil
David Jeanbc0fae32021-08-25 10:31:391669 queue:nil
David Jean5ca263c2021-08-18 09:19:301670 usingBlock:monitor];
1671}
1672
sdefresne14900ee2015-11-27 14:43:211673void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1674 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181675 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111676 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531677 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211678}
1679
jkrcalbf073372016-07-29 07:21:311680std::vector<std::string> RegisterAllFeatureVariationParameters(
1681 flags_ui::FlagsStorage* flags_storage,
1682 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181683 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1684 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311685}
1686
sdefresne14900ee2015-11-27 14:43:211687void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1688 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501689 base::Value::List& supported_entries,
1690 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181691 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211692 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511693 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211694}
1695
1696void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1697 const std::string& internal_name,
1698 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181699 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1700 enable);
sdefresne14900ee2015-11-27 14:43:211701}
1702
1703void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181704 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211705}
1706
1707namespace testing {
1708
Elly Fong-Jones323ab1092021-08-23 22:36:311709base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1710 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531711 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211712}
1713
1714} // namespace testing