blob: 3e4aa63050fcbb04a18b36409656f619bf053a7a [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
Avi Drissmaneac566b02023-08-18 02:56:2114#import "base/apple/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5716#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3617#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4118#import "base/functional/bind.h"
19#import "base/functional/callback_helpers.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"
Menghan YANGf3fe2de52023-02-27 16:38:5027#import "components/bookmarks/common/bookmark_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5728#import "components/commerce/core/commerce_feature_list.h"
29#import "components/commerce/core/flag_descriptions.h"
30#import "components/content_settings/core/common/features.h"
31#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5232#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5733#import "components/enterprise/browser/enterprise_switches.h"
34#import "components/feature_engagement/public/feature_constants.h"
35#import "components/feature_engagement/public/feature_list.h"
36#import "components/feed/feed_feature_list.h"
37#import "components/flags_ui/feature_entry.h"
38#import "components/flags_ui/feature_entry_macros.h"
39#import "components/flags_ui/flags_storage.h"
40#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2541#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5742#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"
Vasilii Sukhanov32b14452023-10-12 17:31:2749#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5750#import "components/password_manager/core/common/password_manager_features.h"
51#import "components/payments/core/features.h"
52#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4053#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5754#import "components/policy/policy_constants.h"
Menghan YANG5b3a78a2023-03-24 17:38:2655#import "components/reading_list/features/reading_list_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3057#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2958#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2559#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5760#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
61#import "components/signin/core/browser/account_reconcilor.h"
62#import "components/signin/ios/browser/features.h"
63#import "components/signin/public/base/signin_switches.h"
64#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1565#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5766#import "components/sync/base/command_line_switches.h"
67#import "components/sync/base/features.h"
68#import "components/sync/base/pref_names.h"
69#import "components/translate/core/browser/translate_prefs.h"
70#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3471#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3072#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5373#import "ios/chrome/browser/crash_report/model/features.h"
Aman Verma10315df62023-10-02 11:56:5674#import "ios/chrome/browser/credential_provider_promo/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1175#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1476#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1777#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5778#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Vincent Boisselle8b321bb2023-11-28 13:58:3179#import "ios/chrome/browser/follow/model/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5880#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
Chris Lue687fc72023-10-27 02:42:1981#import "ios/chrome/browser/parcel_tracking/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5782#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2083#import "ios/chrome/browser/promos_manager/features.h"
mmrashadf158cad942023-10-03 09:15:4884#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4685#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3586#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3687#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
88#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2889#import "ios/chrome/browser/text_selection/model/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0590#import "ios/chrome/browser/ui/app_store_rating/features.h"
Hira Mahmood6b0e5502023-06-12 21:51:4391#import "ios/chrome/browser/ui/default_promo/post_restore/features.h"
Ewann1a9d33d2021-06-14 11:12:2492#import "ios/chrome/browser/ui/download/features.h"
adamta273568472020-12-04 23:53:5793#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0194#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Robbie Gibson686c56732021-10-04 17:11:4595#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1596#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:4197#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:1998#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:5899#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22100#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/grit/ios_strings.h"
102#import "ios/components/security_interstitials/https_only_mode/feature.h"
103#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
104#import "ios/web/common/features.h"
105#import "ios/web/common/user_agent.h"
106#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21107
Sylvain Defresne9c107082020-10-27 16:39:13108#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48109#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13110#endif
111
sdefresne14900ee2015-11-27 14:43:21112#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57113#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22114#endif
stkhapuginc1be1792016-12-13 14:30:53115
elawrence816f6790e2017-06-16 18:19:28116using flags_ui::FeatureEntry;
117
sdefresne14900ee2015-11-27 14:43:21118namespace {
Emily Starkbafa9062017-12-27 15:22:46119
Nohemi Fernandezc00842a2021-07-26 11:47:34120const FeatureEntry::Choice
121 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
122 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
123 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
124 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
125 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
126};
127
Cheick Cisse8835611a2023-06-02 21:42:54128// Uses int values from DefaultPromoType enum.
129const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
130 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
131 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
132 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
133 "1"},
134 {"Show tailored made for ios promo",
135 "default-browser-promo-force-show-promo", "2"},
136 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
137 "3"},
138 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
139};
140
Stepan Khapugincc4e9842019-01-23 13:38:13141const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
142 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
143const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
144 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
155
156const FeatureEntry::FeatureVariation
157 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
158 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53159 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13160 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53161 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13162 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13172
Stepan Khapuginbac467e2022-05-06 21:11:54173const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
174 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
175const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
176 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
179
180const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
181 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
182 nullptr},
183 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
184 nullptr},
185 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
186 nullptr},
187};
188
Christian Xucf26d562022-07-06 09:28:36189const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
190 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
191const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
192 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
195
196const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
197 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
198 nullptr},
199 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
200 nullptr},
201 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
202 nullptr},
203};
204
Cheick Cissedc49dbe2023-08-09 13:33:52205const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51206 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
207 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
208const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
209 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
210const FeatureEntry::FeatureParam
211 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
212 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
213
214const FeatureEntry::FeatureVariation
215 kOmniboxCompanyEntityAdjustmentVariations[] = {
216 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
217 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
218 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
219 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
220 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
221 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
222};
223
224const FeatureEntry::FeatureParam
Cheick Cissedc49dbe2023-08-09 13:33:52225 kDefaultBrowserVideoConditionsHalfscreenPromo[] = {
226 {kDefaultBrowserVideoPromoVariant, kVideoConditionsHalfscreenPromo}};
227const FeatureEntry::FeatureParam
228 kDefaultBrowserVideoConditionsFullscreenPromo[] = {
229 {kDefaultBrowserVideoPromoVariant, kVideoConditionsFullscreenPromo}};
230const FeatureEntry::FeatureParam
231 kDefaultBrowserGenericConsitionsFullscreenPromo[] = {
232 {kDefaultBrowserVideoPromoVariant, kGenericConditionsFullscreenPromo}};
233const FeatureEntry::FeatureParam
234 kDefaultBrowserGenericConditionsHalfscreenPromo[] = {
235 {kDefaultBrowserVideoPromoVariant, kGenericConditionsHalfscreenPromo}};
236
Cheick Cisse2806f082b2023-04-25 14:20:01237const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Cheick Cissedc49dbe2023-08-09 13:33:52238 {"Show half screen ui with video condtions",
239 kDefaultBrowserVideoConditionsHalfscreenPromo,
240 std::size(kDefaultBrowserVideoConditionsHalfscreenPromo), nullptr},
241 {"Show full screen ui with video condtions",
242 kDefaultBrowserVideoConditionsFullscreenPromo,
243 std::size(kDefaultBrowserVideoConditionsFullscreenPromo), nullptr},
244 {"Show full screen ui with generic condtions",
245 kDefaultBrowserGenericConsitionsFullscreenPromo,
246 std::size(kDefaultBrowserGenericConsitionsFullscreenPromo), nullptr},
247 {"Show half screen ui with generic condtions",
248 kDefaultBrowserGenericConditionsHalfscreenPromo,
249 std::size(kDefaultBrowserGenericConditionsHalfscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01250};
251
Caitlin Fischer37e01232019-05-24 13:05:45252const FeatureEntry::FeatureParam
Caitlin Fischer37e01232019-05-24 13:05:45253 kAutofillUseMobileLabelDisambiguationShowAll[] = {
254 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
255 autofill::features::
256 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
257const FeatureEntry::FeatureParam
258 kAutofillUseMobileLabelDisambiguationShowOne[] = {
259 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
260 autofill::features::
261 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
262
263const FeatureEntry::FeatureVariation
264 kAutofillUseMobileLabelDisambiguationVariations[] = {
265 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53266 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45267 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53268 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45269
adamta37c6b832023-03-10 20:04:09270// Uses int values from SigninPromoViewStyle enum.
271const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
272 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09273const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59274 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09275const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59276 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47277
Mohammad Refaatab6bee62022-05-16 16:31:15278const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09279 {"Standard", kDiscoverFeedTopSyncPromoStandard,
280 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09281 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
282 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
283 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
284 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15285
Guillem Perez40086ef2023-11-20 20:03:52286const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
287 {kContentPushNotificationsExperimentType, "1"}};
288const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
289 {{kContentPushNotificationsExperimentType, "2"}};
290
291const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
292 {"Promo", kContentPushNotificationsEnabledPromo,
293 std::size(kContentPushNotificationsEnabledPromo), nullptr},
294 {"Set up list", kContentPushNotificationsEnabledSetupLists,
295 std::size(kContentPushNotificationsEnabledSetupLists), nullptr}};
296
adamta4a6f2fd22023-02-13 17:37:14297const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
298 {kDisableStickyHeaderForFollowingFeed, "true"}};
299const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18300 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14301const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
302 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18303 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14304
305const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
306 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
307 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
308 {"Reduced header height", kFeedHeaderSettingReducedHeight,
309 std::size(kFeedHeaderSettingReducedHeight), nullptr},
310 {"All improvements", kFeedHeaderSettingAllImprovements,
311 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
312
Chris Ludca9ce32023-09-20 16:53:50313const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35314 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50315const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35316 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08317
gogerald0e39e3aa2021-02-10 18:41:23318const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50319 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
320 std::size(kStartSurfaceTenSeconds), nullptr},
321 {"1h:Show Home Surface", kStartSurfaceOneHour,
322 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08323};
gogerald0e39e3aa2021-02-10 18:41:23324
Chris Luce928eb2023-05-12 21:36:26325const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
326 {kMagicStackMostVisitedModuleParam, "true"},
327 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22328const FeatureEntry::FeatureParam
329 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
330 {kMagicStackMostVisitedModuleParam, "true"},
331 {kReducedSpaceParam, "-80"},
332 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13333const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26334 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13335 {kReducedSpaceParam, "20"}};
336const FeatureEntry::FeatureParam
337 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
338 {kMagicStackMostVisitedModuleParam, "false"},
339 {kReducedSpaceParam, "20"},
340 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26341
342const FeatureEntry::FeatureVariation kMagicStackVariations[]{
343 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
344 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22345 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
346 kMagicStackMostVisitedModuleHideIrrelevantModules,
347 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13348 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
349 std::size(kMagicStackReducedNTPTopSpace), nullptr},
350 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
351 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
352 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26353};
354
Chris Lu6fd4eaf2023-08-08 18:29:30355const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
356 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
357
358const FeatureEntry::FeatureVariation
359 kSegmentationPlatformIosModuleRankerVariations[]{
360 {"Enabled With Default Model Parameter (Must Set this!)",
361 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
362 };
363
Ed Chin91e44992022-07-27 13:42:34364#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26365// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01366const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
368 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04370 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01371const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04372 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
373 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01374 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04375 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01376const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04377 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
378 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01379 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04380 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01381const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04382 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
383 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01384 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04385 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01386const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04387 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
388 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01389 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
390 {kBackgroundRefreshIntervalInSeconds, "0"}};
391const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04392 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
393 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01394 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
395 {kBackgroundRefreshIntervalInSeconds, "0"}};
396const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
397 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
398 {kEnableRecurringBackgroundRefreshSchedule, "false"},
399 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
400 {kBackgroundRefreshIntervalInSeconds, "0"}};
401const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
402 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
403 {kEnableRecurringBackgroundRefreshSchedule, "true"},
404 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
405 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04406
Ed Chin178ec2a2023-02-10 22:21:26407// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04408const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01409 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
410 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
411 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
412 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
413 {"1hr Interval 1hr Max Age Recurring",
414 kOneHourIntervalOneHourMaxAgeRecurring,
415 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
416 {"4hr Interval 6hr Max Age Recurring",
417 kFourHourIntervalSixHourMaxAgeRecurring,
418 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
419 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
420 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
421 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
422 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
423 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
424 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
425 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
426 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04427};
Ed Chin91e44992022-07-27 13:42:34428#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04429
Ed Chin178ec2a2023-02-10 22:21:26430// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29431const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
432 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54433 {kEnableFeedAppCloseForegroundRefresh, "false"},
434 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29435const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
436 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54437 {kEnableFeedAppCloseForegroundRefresh, "true"},
438 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
439const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
440 {kEnableFeedSessionCloseForegroundRefresh, "false"},
441 {kEnableFeedAppCloseForegroundRefresh, "false"},
442 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26443
Ed Chin5c1fd532023-03-20 17:43:29444// Feed Invisible Foreground Refresh Feature Variations.
445const FeatureEntry::FeatureVariation
446 kFeedInvisibleForegroundRefreshVariations[] = {
447 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
448 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
449 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
450 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54451 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
452 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26453};
454
Raj T18a2c8c2023-03-15 17:20:15455const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
456 {"date", "true"}};
457const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
458 {"address", "true"}};
459const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
460 {"phonenumber", "true"}};
461const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
462 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50463const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
464 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15465const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
466 {"date", "true"},
467 {"address", "true"},
468 {"phonenumber", "true"},
469 {"email", "true"}};
470const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
471 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
472 std::size(kEnableExpKitTextClassifierAll), nullptr},
473 {"Enabled for date", kEnableExpKitTextClassifierDate,
474 std::size(kEnableExpKitTextClassifierDate), nullptr},
475 {"Enabled for address", kEnableExpKitTextClassifierAddress,
476 std::size(kEnableExpKitTextClassifierAddress), nullptr},
477 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
478 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
479 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50480 std::size(kEnableExpKitTextClassifierEmail), nullptr},
481 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
482 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15483
Louis Romero93e9b50a2023-01-26 01:46:12484const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
485 {kTabInactivityThresholdParameterName,
486 kTabInactivityThresholdOneWeekParam}};
487const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
488 {kTabInactivityThresholdParameterName,
489 kTabInactivityThresholdTwoWeeksParam}};
490const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
491 {kTabInactivityThresholdParameterName,
492 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58493const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
494 {kTabInactivityThresholdParameterName,
495 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12496
497const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
498 {"One week", kTabInactivityThresholdOneWeek,
499 std::size(kTabInactivityThresholdOneWeek), nullptr},
500 {"Two weeks", kTabInactivityThresholdTwoWeeks,
501 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
502 {"Three weeks", kTabInactivityThresholdThreeWeeks,
503 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58504 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
505 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12506};
507
Ewann Pelle6eecb8f2023-06-23 14:31:37508const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
509 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
510const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
511 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
512const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
513 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55514const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
515 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37516
517const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
518 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00519 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37520 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00521 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37522 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00523 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55524 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
525 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00526};
527
528const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
529 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
530const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
531 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48532const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
533 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00534
535const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
536 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
537 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48538 {"Most recent tab and last synced tab (12 hours threshold)",
539 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
540 {"Most recent tab and last synced tab (24 hours threshold)",
541 kTabResumptionAllTabsOneDayThreshold,
542 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37543};
544
Huiting Yud7d2a5322023-02-09 21:14:22545const FeatureEntry::FeatureParam
546 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
547 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
548const FeatureEntry::FeatureParam
549 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
550 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
551const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20552 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20553 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
554 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22555
556const FeatureEntry::FeatureVariation
557 kCredentialProviderExtensionPromoVariations[] = {
558 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
559 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
560 {"On password copied",
561 kCredentialProviderExtensionPromoOnPasswordCopied,
562 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20563 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30564 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22565
Olivier ROBINfd3887b72023-02-23 14:45:42566const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
567 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44568const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
569 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42570const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
571 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44572 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
573 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
574 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42575
Olivier ROBIN2613bcd02023-04-20 10:00:47576const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
577 {kIOSEditMenuSearchWithTitleParamTitle,
578 kIOSEditMenuSearchWithTitleSearchWithParam}};
579const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
580 {kIOSEditMenuSearchWithTitleParamTitle,
581 kIOSEditMenuSearchWithTitleSearchParam}};
582const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
583 {kIOSEditMenuSearchWithTitleParamTitle,
584 kIOSEditMenuSearchWithTitleWebSearchParam}};
585const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
586 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
587 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
588 {"Search", kIOSEditMenuSearchWithTitleSearch,
589 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
590 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
591 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
592};
593
Hira Mahmood6b0e5502023-06-12 21:51:43594const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
595 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
596const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
597 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
598const FeatureEntry::FeatureVariation
599 kPostRestoreDefaultBrowserPromoVariations[] = {
600 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
601 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
602 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
603 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
604};
605
Christian Xu07d600192023-07-24 12:29:52606const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
607 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
608const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
609 {kBottomOmniboxDefaultSettingParam,
610 kBottomOmniboxDefaultSettingParamBottom}};
611const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
612 {{kBottomOmniboxDefaultSettingParam,
613 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
614const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
615 {
616 {"Top", kBottomOmniboxDefaultSettingTop,
617 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
618 {"Bottom", kBottomOmniboxDefaultSettingBottom,
619 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
620 {"Bottom for Safari Switcher",
621 kBottomOmniboxDefaultSettingSafariSwitcher,
622 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
623};
624
Christian Xue72882d2023-11-20 17:10:48625const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
626 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
627const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
628 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
629 nullptr},
630};
631
Christian Xua3667352023-11-21 16:54:09632const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
633 {kBottomOmniboxPromoDefaultPositionParam,
634 kBottomOmniboxPromoDefaultPositionParamTop}};
635const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
636 {kBottomOmniboxPromoDefaultPositionParam,
637 kBottomOmniboxPromoDefaultPositionParamBottom}};
638const FeatureEntry::FeatureVariation
639 kBottomOmniboxPromoDefaultPositionVariations[] = {
640 {"Top", kBottomOmniboxPromoDefaultPositionTop,
641 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
642 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
643 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
644};
645
Marc Treib9bddebb2023-06-15 14:03:34646const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
647 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25648 {"Disabled", "disable-features",
649 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24650 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02651 "FeedBottomSyncStringRemoval,"
652 "SyncEnableContactInfoDataTypeInTransportMode,"
653 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
654 "SyncEnableBatchUploadLocalData,"
655 "SyncEnableWalletMetadataInTransportMode,"
656 "SyncEnableWalletOfferInTransportMode,"
657 "IOSPasswordSettingsBulkUploadLocalPasswords"},
658 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34659 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24660 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25661 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34662 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37663 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55664 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06665 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06666 "SyncEnableWalletOfferInTransportMode,"
667 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02668 {"Enabled with fast-follows", "enable-features",
669 "ReplaceSyncPromosWithSignInPromos,"
670 "ConsistencyNewAccountInterface,"
671 "FeedBottomSyncStringRemoval,"
672 "SyncEnableContactInfoDataTypeInTransportMode,"
673 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
674 "SyncEnableBatchUploadLocalData,"
675 "SyncEnableWalletMetadataInTransportMode,"
676 "SyncEnableWalletOfferInTransportMode,"
677 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33678 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07679 "EnableBatchUploadFromBookmarksManager,"
680 "EnableReviewAccountSettingsPromo"},
Marc Treib9bddebb2023-06-15 14:03:34681};
682
Olivier ROBIN82b67002023-07-31 14:34:46683const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
684 {web::features::kOneTapForMapsConsentModeParamTitle,
685 web::features::kOneTapForMapsConsentModeDefaultParam}};
686const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
687 {web::features::kOneTapForMapsConsentModeParamTitle,
688 web::features::kOneTapForMapsConsentModeForcedParam}};
689const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
690 {web::features::kOneTapForMapsConsentModeParamTitle,
691 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31692const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
693 {web::features::kOneTapForMapsConsentModeParamTitle,
694 web::features::kOneTapForMapsConsentModeIPHParam}};
695const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
696 {web::features::kOneTapForMapsConsentModeParamTitle,
697 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46698const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
699 {"Consent Default", kOneTapForMapsConsentModeDefault,
700 std::size(kOneTapForMapsConsentModeDefault), nullptr},
701 {"Consent Forced", kOneTapForMapsConsentModeForced,
702 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31703 {"Consent IPH", kOneTapForMapsConsentModeIPH,
704 std::size(kOneTapForMapsConsentModeIPH), nullptr},
705 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
706 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46707 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
708 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
709};
710
Stepan Khapuginec68d5bb2023-10-16 13:35:25711constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
712 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19713 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25714constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
715 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19716 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25717constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
718 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19719 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25720constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
721 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19722 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25723
724constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
725 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
726 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
727 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
728 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
729 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
730 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
731 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
732 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
733};
734
Rafał Godlewskie75d12402023-10-25 15:31:53735const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
736 {"Default", "", ""},
737 {"Bootstraping Only", switches::kEnableFeatures,
738 "SharingOfferKeyPairBootstrap"},
739 {"Enabled", switches::kEnableFeatures,
740 "SharingOfferKeyPairBootstrap,SendPasswords,"
741 "PasswordManagerEnableSenderService,"
742 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
743};
744
Scott Yoderd781bd12023-10-25 20:47:15745const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
746 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
747const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
748 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
749 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
750};
751
Matt Jones79534392023-10-27 14:35:02752const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
753 {{commerce::kParcelTrackingTestDataParam,
754 commerce::kParcelTrackingTestDataParamDelivered}};
755const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
756 {{commerce::kParcelTrackingTestDataParam,
757 commerce::kParcelTrackingTestDataParamInProgress}};
758const flags_ui::FeatureEntry::FeatureParam
759 kParcelTrackingTestDataOutForDelivery[] = {
760 {commerce::kParcelTrackingTestDataParam,
761 commerce::kParcelTrackingTestDataParamOutForDelivery}};
762const flags_ui::FeatureEntry::FeatureVariation
763 kParcelTrackingTestDataVariations[] = {
764 {"Delivered", kParcelTrackingTestDataDelivered,
765 std::size(kParcelTrackingTestDataDelivered), nullptr},
766 {"In progress", kParcelTrackingTestDataInProgress,
767 std::size(kParcelTrackingTestDataInProgress), nullptr},
768 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
769 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
770};
771
Cooper Knaak1e026562017-07-26 05:22:28772// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21773// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28774// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
775// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21776// macro for this type supplying the command line to the macro.
777// . MULTI_VALUE: a list of choices, the first of which should correspond to a
778// deactivated state for this lab (i.e. no command line option). To specify
779// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
780// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28781// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
782// either enabled, disabled, or uses the default value of the associated
783// base::Feature instance. To specify this type of entry use the macro
784// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
785// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
786// base::Feature instance. Choices corresponding to the default state, a
787// universally enabled state, and a universally disabled state are
788// automatically included. To specify this type of entry use the macro
789// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
790// the array of choices.
791//
sdefresne14900ee2015-11-27 14:43:21792// See the documentation of FeatureEntry for details on the fields.
793//
794// When adding a new choice, add it to the end of the list.
795const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28796 {"in-product-help-demo-mode-choice",
797 flag_descriptions::kInProductHelpDemoModeName,
798 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
799 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23800 feature_engagement::kIPHDemoMode,
801 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09802 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22803 {"enable-autofill-credit-card-upload",
804 flag_descriptions::kAutofillCreditCardUploadName,
805 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24806 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23807 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
808 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
809 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51810 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23811 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
812 {"wallet-service-use-sandbox",
813 flag_descriptions::kWalletServiceUseSandboxName,
814 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
815 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
816 autofill::switches::kWalletServiceUseSandbox,
817 "1",
818 autofill::switches::kWalletServiceUseSandbox,
819 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59820 {"show-autofill-type-predictions",
821 flag_descriptions::kShowAutofillTypePredictionsName,
822 flag_descriptions::kShowAutofillTypePredictionsDescription,
823 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50824 FEATURE_VALUE_TYPE(
825 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05826 {"fullscreen-promos-manager-skip-internal-limits",
827 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
828 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
829 flags_ui::kOsIos,
830 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14831 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53832 flag_descriptions::kFullscreenSmoothScrollingName,
833 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19834 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06835 {"webpage-default-zoom-from-dynamic-type",
836 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
837 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
838 flags_ui::kOsIos,
839 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56840 {"webpage-alternative-text-zoom",
841 flag_descriptions::kWebPageAlternativeTextZoomName,
842 flag_descriptions::kWebPageAlternativeTextZoomDescription,
843 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34844 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
845 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13847 {"omnibox-ui-max-autocomplete-matches",
848 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
849 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
850 flags_ui::kOsIos,
851 FEATURE_WITH_PARAMS_VALUE_TYPE(
852 omnibox::kUIExperimentMaxAutocompleteMatches,
853 kOmniboxUIMaxAutocompleteMatchesVariations,
854 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35855 {"omnibox-local-history-zero-suggest-beyond-ntp",
856 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
857 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
858 flags_ui::kOsIos,
859 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54860 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
861 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
862 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
863 kOmniboxMaxZPSMatchesVariations,
864 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25865 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
866 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
867 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
868 kOmniboxInspireMeVariants,
869 "OmniboxBundledExperimentV1")},
870 {"omnibox-inspire-me-signed-out",
871 flag_descriptions::kOmniboxInspireMeSignedOutName,
872 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
873 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Caitlin Fischer43edd90a2019-05-01 13:24:30874 {"autofill-use-mobile-label-disambiguation",
875 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
876 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
877 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45878 FEATURE_WITH_PARAMS_VALUE_TYPE(
879 autofill::features::kAutofillUseMobileLabelDisambiguation,
880 kAutofillUseMobileLabelDisambiguationVariations,
881 "AutofillUseMobileLabelDisambiguation")},
Jérôme Lebelc374fdd2019-09-27 10:36:48882 {"force-startup-signin-promo",
883 flag_descriptions::kForceStartupSigninPromoName,
884 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29885 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41886 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
887 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
888 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13889#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45890 {"screen-time-integration-ios",
891 flag_descriptions::kScreenTimeIntegrationName,
892 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
893 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13894#endif
Nazerke3e993f72020-09-21 13:00:06895 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
896 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
897 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11898 {"ios-shared-highlighting-color-change",
899 flag_descriptions::kIOSSharedHighlightingColorChangeName,
900 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07901 flags_ui::kOsIos,
902 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34903 {"ios-shared-highlighting-v2",
904 flag_descriptions::kIOSSharedHighlightingV2Name,
905 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
906 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45907 {"omnibox-new-textfield-implementation",
908 flag_descriptions::kOmniboxNewImplementationName,
909 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0da12382023-01-24 16:08:12911 {"omnibox-report-assisted-query-stats",
912 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
913 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
914 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
915 {"omnibox-report-searchbox-stats",
916 flag_descriptions::kOmniboxReportSearchboxStatsName,
917 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
918 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
gogerald0ff29e52021-02-03 18:56:19919 {"start-surface", flag_descriptions::kStartSurfaceName,
920 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23921 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
922 kStartSurfaceVariations,
923 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42924 {"autofill-address-verification-in-save-prompt",
925 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
926 flag_descriptions::
927 kEnableAutofillAddressSavePromptAddressVerificationDescription,
928 flags_ui::kOsIos,
929 FEATURE_VALUE_TYPE(
930 autofill::features::
931 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Side Yilmaz6c53f7102021-09-07 13:26:19932 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
933 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
934 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34935 {"wait-threshold-seconds-for-capabilities-api",
936 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
937 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
938 flags_ui::kOsIos,
939 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28940 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
941 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
942 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24943 {"content-push-notifications",
944 flag_descriptions::kContentPushNotificationsName,
945 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52946 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
947 kContentPushNotificationsVariations,
948 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57949 {"overflow-menu-customization",
950 flag_descriptions::kOverflowMenuCustomizationName,
951 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
952 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44953 {"enable-lens-in-omnibox-copied-image",
954 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
955 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
956 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40957 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23958 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
959 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40960 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23961 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03962 {"enable-disco-feed-endpoint",
963 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
964 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
965 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11966 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15967 {"enable-discover-feed-top-sync-promo",
968 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
969 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
970 flags_ui::kOsIos,
971 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
972 kDiscoverFeedTopSyncPromoVariations,
973 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14974 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
975 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
976 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
977 kFeedHeaderSettingsVariations,
978 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28979 {"shared-highlighting-amp",
980 flag_descriptions::kIOSSharedHighlightingAmpName,
981 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
982 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28983 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42984 commerce::flag_descriptions::kCommercePriceTrackingName,
985 commerce::flag_descriptions::kCommercePriceTrackingDescription,
986 flags_ui::kOsIos,
987 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
988 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15989 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06990 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
991 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
992 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54993 {"ntp-view-hierarchy-repair",
994 flag_descriptions::kNTPViewHierarchyRepairName,
995 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20996 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26997 {"autofill-enable-card-product-name",
998 flag_descriptions::kAutofillEnableCardProductNameName,
999 flag_descriptions::kAutofillEnableCardProductNameDescription,
1000 flags_ui::kOsIos,
1001 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:521002 {"enable-download-service-foreground-session",
1003 flag_descriptions::kDownloadServiceForegroundSessionName,
1004 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1005 flags_ui::kOsIos,
1006 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231007 {"enable-tflite-language-detection",
1008 flag_descriptions::kTFLiteLanguageDetectionName,
1009 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1010 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201011 {"optimization-guide-debug-logs",
1012 flag_descriptions::kOptimizationGuideDebugLogsName,
1013 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1014 flags_ui::kOsIos,
1015 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:551016 {"optimization-guide-push-notifications",
1017 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1018 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1019 flags_ui::kOsIos,
1020 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:251021 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
1022 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
1023 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:011024 {"suggestions-scrolling-ipad",
1025 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1026 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1027 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001028 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1029 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1030 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251031 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1032 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331033 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
David Jeanad303a92023-07-31 16:58:111034 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
1035 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
1036 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551037 {"experience-kit-apple-calendar",
1038 flag_descriptions::kAppleCalendarExperienceKitName,
1039 flag_descriptions::kAppleCalendarExperienceKitDescription,
1040 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081041 {"enable-expkit-text-classifier",
1042 flag_descriptions::kEnableExpKitTextClassifierName,
1043 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151044 flags_ui::kOsIos,
1045 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1046 kEnableExpKitTextClassifierVariations,
1047 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331048 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1049 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461050 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1051 kOneTapForMapsWithVariations,
1052 "OneTapForMaps")},
David Jean139ba1bf2023-08-31 15:59:321053 {"enable-annotations-language-detection",
1054 flag_descriptions::kUseAnnotationsForLanguageDetectionName,
1055 flag_descriptions::kUseAnnotationsForLanguageDetectionDescription,
1056 flags_ui::kOsIos,
1057 FEATURE_VALUE_TYPE(web::features::kUseAnnotationsForLanguageDetection)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251058 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1059 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1060 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301061 {"autofill-enable-ranking-formula-address-profiles",
1062 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1063 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1064 flags_ui::kOsIos,
1065 FEATURE_VALUE_TYPE(
1066 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391067 {"autofill-enable-ranking-formula-credit-cards",
1068 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1069 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1070 flags_ui::kOsIos,
1071 FEATURE_VALUE_TYPE(
1072 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021073 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1074 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1075 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521076 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1077 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261078 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1079 kMagicStackVariations,
1080 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211081 {"ios-hide-feed-with-search-choice",
1082 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1083 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151084 flags_ui::kOsIos,
1085 FEATURE_WITH_PARAMS_VALUE_TYPE(
1086 kIOSHideFeedWithSearchChoice,
1087 kIOSHideFeedWithSearchChoiceVariations,
1088 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311089 {"ios-keyboard-accessory-upgrade",
1090 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1091 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1092 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261093 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1094 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1095 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291096 {"ios-magic-stack-segmentation-ranking",
1097 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1098 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1099 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301100 FEATURE_WITH_PARAMS_VALUE_TYPE(
1101 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1102 kSegmentationPlatformIosModuleRankerVariations,
1103 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061104 {"default-browser-intents-show-settings",
1105 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1106 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1107 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321108 {"ios-password-bottom-sheet",
1109 flag_descriptions::kIOSPasswordBottomSheetName,
1110 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1111 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hétu459451a2023-06-01 17:05:311112 {"ios-payments-bottom-sheet",
1113 flag_descriptions::kIOSPaymentsBottomSheetName,
1114 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1115 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
Moe Ahmadi098519d82022-07-27 18:34:241116 {"omnibox-zero-suggest-prefetching",
1117 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1118 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1119 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451120 {"omnibox-zero-suggest-prefetching-on-srp",
1121 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1122 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1123 flags_ui::kOsIos,
1124 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1125 {"omnibox-zero-suggest-prefetching-on-web",
1126 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1127 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1128 flags_ui::kOsIos,
1129 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471130 {"omnibox-zero-suggest-in-memory-caching",
1131 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1132 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1133 flags_ui::kOsIos,
1134 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351135 {"omnibox-on-device-tail-suggestions",
1136 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1137 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1138 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosada1e852023-03-10 19:14:411139 {"enable-button-configuration-usage",
1140 flag_descriptions::kEnableUIButtonConfigurationName,
1141 flag_descriptions::kEnableUIButtonConfigurationDescription,
1142 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Christian Xucf26d562022-07-06 09:28:361143 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1144 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1145 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1146 kOmniboxMaxURLMatchesVariations,
1147 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061148 {"metrickit-non-crash-reports",
1149 flag_descriptions::kMetrickitNonCrashReportName,
1150 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1151 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371152 {"autofill-enable-remade-downstream-metrics",
1153 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1154 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1155 flags_ui::kOsIos,
1156 FEATURE_VALUE_TYPE(
1157 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551158 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1159 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1160 flag_descriptions::
1161 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1162 flags_ui::kOsIos,
1163 FEATURE_VALUE_TYPE(
1164 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011165 {"default-browser-video-promo",
1166 flag_descriptions::kDefaultBrowserVideoPromoName,
1167 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1168 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1169 kDefaultBrowserVideoPromoVariations,
1170 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541171 {"default-browser-promo-force-show-promo",
1172 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1173 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1174 flags_ui::kOsIos,
1175 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171176 {"default-browser-promo-trigger-criteria-experiment",
1177 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1178 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1179 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501180 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441181 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211182 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1183 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1184 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501185 {"fullscreen-promo-on-omnibox-copy-paste",
1186 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1187 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1188 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341189#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1190 {"feed-background-refresh-ios",
1191 flag_descriptions::kFeedBackgroundRefreshName,
1192 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1193 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1194 kFeedBackgroundRefreshVariations,
1195 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261196#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291197 {"feed-invisible-foreground-refresh-ios",
1198 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1199 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1200 flags_ui::kOsIos,
1201 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1202 kFeedInvisibleForegroundRefreshVariations,
1203 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191204 {"omnibox-keyboard-paste-button",
1205 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1206 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1207 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Hira Mahmoodb0e5f412022-09-01 19:41:051208 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1209 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1210 FEATURE_VALUE_TYPE(kAppStoreRating)},
Olivier ROBINf05518782022-09-14 23:55:501211 {"enable-tflite-language-detection-ignore",
1212 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1213 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1214 flags_ui::kOsIos,
1215 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571216 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1217 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1218 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411219 {"credential-provider-extension-promo",
1220 flag_descriptions::kCredentialProviderExtensionPromoName,
1221 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221222 flags_ui::kOsIos,
1223 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1224 kCredentialProviderExtensionPromoVariations,
1225 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251226 {"iph-price-notifications-while-browsing",
1227 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1228 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1229 flags_ui::kOsIos,
1230 FEATURE_VALUE_TYPE(
1231 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501232 {"autofill-suggest-server-card-instead-of-local-card",
1233 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1234 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1235 flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(
1237 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Robbie Gibson88f680a2023-01-19 16:47:301238 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1239 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1240 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Matt Jonesc01327662023-08-02 16:34:291241 {"shopping-collection",
1242 commerce::flag_descriptions::kShoppingCollectionName,
1243 commerce::flag_descriptions::kShoppingCollectionDescription,
1244 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kShoppingCollection)},
Ewann Pelledec2d042023-01-25 15:28:391245 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1246 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones5c8c8e32023-06-13 22:49:471248 {"shopping-list-track-by-default",
1249 commerce::flag_descriptions::kShoppingListTrackByDefaultName,
1250 commerce::flag_descriptions::kShoppingListTrackByDefaultDescription,
1251 flags_ui::kOsIos,
1252 FEATURE_VALUE_TYPE(commerce::kShoppingListTrackByDefault)},
Matt Jones1795eda2023-05-09 20:24:481253 {"local-pdp-detection",
1254 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1255 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1256 flags_ui::kOsIos,
1257 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121258 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1259 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1260 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1261 kTabInactivityThresholdVariations,
1262 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181263 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1264 flag_descriptions::
1265 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1266 flag_descriptions::
1267 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1268 flags_ui::kOsIos,
1269 FEATURE_VALUE_TYPE(
1270 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361271 {"enable-friendlier-safe-browsing-settings-standard-protection",
1272 flag_descriptions::
1273 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1274 flag_descriptions::
1275 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521276 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361277 FEATURE_VALUE_TYPE(
1278 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291279 {"enable-red-interstitial-facelift",
1280 flag_descriptions::kEnableRedInterstitialFaceliftName,
1281 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1282 flags_ui::kOsIos,
1283 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Louis Romero58f355022023-02-13 19:04:311284 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1285 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1286 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421287 {"ios-edit-menu-partial-translate",
1288 flag_descriptions::kIOSEditMenuPartialTranslateName,
1289 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421290 flags_ui::kOsIos,
1291 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1292 kIOSEditMenuPartialTranslateVariations,
1293 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431294 {"notification-settings-menu-item",
1295 flag_descriptions::kNotificationSettingsMenuItemName,
1296 flag_descriptions::kNotificationSettingsMenuItemDescription,
1297 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Ed Chin97560fc42023-02-20 16:48:321298 {"feed-experiment-tagging-ios",
1299 flag_descriptions::kFeedExperimentTaggingName,
1300 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1301 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061302 {"spotlight-reading-list-source",
1303 flag_descriptions::kSpotlightReadingListSourceName,
1304 flag_descriptions::kSpotlightReadingListSourceDescription,
1305 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481306 {"enable-policy-test-page-ios",
1307 flag_descriptions::kEnablePolicyTestPageName,
1308 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1309 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
Menghan YANGf3fe2de52023-02-27 16:38:501310 {"enable-bookmarks-account-storage",
1311 flag_descriptions::kEnableBookmarksAccountStorageName,
1312 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1313 flags_ui::kOsIos,
Marc Treib98d17f52023-07-06 13:00:461314 FEATURE_VALUE_TYPE(syncer::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531315 {"web-feed-feedback-reroute",
1316 flag_descriptions::kWebFeedFeedbackRerouteName,
1317 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1318 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551319 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1320 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1321 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431322 {"enable-follow-IPH-exp-params",
1323 flag_descriptions::kEnableFollowIPHExpParamsName,
1324 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1325 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031326 {"enable-follow-management-instant-reload",
1327 flag_descriptions::kEnableFollowManagementInstantReloadName,
1328 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1329 flags_ui::kOsIos,
1330 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251331 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1332 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1333 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441334 {"mixed-content-autoupgrade-ios",
1335 flag_descriptions::kMixedContentAutoupgradeName,
1336 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1337 FEATURE_VALUE_TYPE(
1338 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421339 {"enable-preferences-account-storage",
1340 flag_descriptions::kEnablePreferencesAccountStorageName,
1341 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1342 flags_ui::kOsIos,
1343 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201344 {"ios-browser-edit-menu-metrics",
1345 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1346 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1347 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Nicolas MacBeth17c9b92c2023-08-24 14:15:401348 {"ios-bulk-upload-local-passwords",
1349 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsName,
1350 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsDescription,
1351 flags_ui::kOsIos,
1352 FEATURE_VALUE_TYPE(password_manager::features::
1353 kIOSPasswordSettingsBulkUploadLocalPasswords)},
Menghan YANG5b3a78a2023-03-24 17:38:261354 {"enable-reading-list-sign-in-promo",
1355 flag_descriptions::kEnableReadingListSignInPromoName,
1356 flag_descriptions::kEnableReadingListSignInPromoDescription,
1357 flags_ui::kOsIos,
Marc Treib98d17f52023-07-06 13:00:461358 FEATURE_VALUE_TYPE(syncer::kReadingListEnableSyncTransportModeUponSignIn)},
Stepan Khapuginb2f49522023-04-03 18:25:241359 {"omnibox-grouping-framework-zps",
1360 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1361 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1362 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1363 {"omnibox-grouping-framework-non-zps",
1364 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1365 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1366 flags_ui::kOsIos,
1367 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471368 {"enable-session-serialization-optimizations",
1369 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1370 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1371 flags_ui::kOsIos,
1372 FEATURE_VALUE_TYPE(
1373 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411374 {"bottom-omnibox-steady-state",
1375 flag_descriptions::kBottomOmniboxSteadyStateName,
1376 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1377 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Robbie Gibson0ea280602023-04-12 01:02:391378 {"only-access-clipboard-async",
1379 flag_descriptions::kOnlyAccessClipboardAsyncName,
1380 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1381 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Christian Xue5f60232023-04-12 17:50:091382 {"omnibox-tail-suggest", flag_descriptions::kOmniboxTailSuggestName,
1383 flag_descriptions::kOmniboxTailSuggestDescription, flags_ui::kOsIos,
1384 FEATURE_VALUE_TYPE(kOmniboxTailSuggest)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191385 {"omnibox-improved-rtl-suggestions",
1386 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1387 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1388 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Ed Chinecb7d5b2023-04-14 19:22:091389 {"feed-disable-hot-start-refresh-ios",
1390 flag_descriptions::kFeedDisableHotStartRefreshName,
1391 flag_descriptions::kFeedDisableHotStartRefreshDescription,
1392 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFeedDisableHotStartRefresh)},
Olivier ROBIN2613bcd02023-04-20 10:00:471393 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1394 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1395 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1396 kIOSEditMenuSearchWithVariations,
1397 "IOSEditMenuSearchWith")},
1398 {"ios-edit-menu-hide-search-web",
1399 flag_descriptions::kIOSEditMenuHideSearchWebName,
1400 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1401 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171402 {"autofill-enable-card-art-image",
1403 flag_descriptions::kAutofillEnableCardArtImageName,
1404 flag_descriptions::kAutofillEnableCardArtImageDescription,
1405 flags_ui::kOsIos,
1406 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451407 {"enable-signed-out-view-demotion",
1408 flag_descriptions::kEnableSignedOutViewDemotionName,
1409 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1410 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251411 {"autofill-use-two-dots-for-last-four-digits",
1412 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1413 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1414 flags_ui::kOsIos,
1415 FEATURE_VALUE_TYPE(
1416 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241417 {"autofill-disable-profile-updates",
1418 flag_descriptions::kAutofillDisableProfileUpdatesName,
1419 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1420 flags_ui::kOsIos,
1421 FEATURE_VALUE_TYPE(
1422 autofill::features::test::kAutofillDisableProfileUpdates)},
1423 {"autofill-disable-silent-profile-updates",
1424 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1425 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1426 flags_ui::kOsIos,
1427 FEATURE_VALUE_TYPE(
1428 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1429 {"autofill-enable-admin-level-2",
1430 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1431 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1432 flags_ui::kOsIos,
1433 FEATURE_VALUE_TYPE(
1434 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1435 {"autofill-enable-between-streets",
1436 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1437 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1438 flags_ui::kOsIos,
1439 FEATURE_VALUE_TYPE(
1440 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1441 {"autofill-enable-landmark",
1442 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1443 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1444 flags_ui::kOsIos,
1445 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431446 {"post-restore-default-browser-promo",
1447 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1448 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1449 flags_ui::kOsIos,
1450 FEATURE_WITH_PARAMS_VALUE_TYPE(
1451 kPostRestoreDefaultBrowserPromo,
1452 kPostRestoreDefaultBrowserPromoVariations,
1453 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311454 {"spotlight-open-tabs-source",
1455 flag_descriptions::kSpotlightOpenTabsSourceName,
1456 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1457 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451458 {"spotlight-donate-new-intents",
1459 flag_descriptions::kSpotlightDonateNewIntentsName,
1460 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1461 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341462 {"replace-sync-promos-with-sign-in-promos",
1463 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1464 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1465 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301466 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571467 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1468 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1469 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371470 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1471 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1472 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1473 kTabPickupThresholdVariations,
1474 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321475 {"ios-iph-for-safari-switcher",
1476 flag_descriptions::kIPHForSafariSwitcherName,
1477 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1478 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071479 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1480 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1481 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Hira Mahmood746047162023-07-11 22:02:061482 {"app-store-rating-loosened-triggers",
1483 flag_descriptions::kAppStoreRatingLoosenedTriggersName,
1484 flag_descriptions::kAppStoreRatingLoosenedTriggersDescription,
1485 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAppStoreRatingLoosenedTriggers)},
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:151486 {"ios-password-auth-on-entry",
1487 flag_descriptions::kIOSPasswordAuthOnEntryName,
1488 flag_descriptions::kIOSPasswordAuthOnEntryDescription, flags_ui::kOsIos,
1489 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntry)},
Ewann Pelle9cd85b22023-07-12 14:42:011490 {"tab-resumption", flag_descriptions::kTabResumptionName,
1491 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001492 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1493 kTabResumptionVariations,
1494 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521495 {"bottom-omnibox-default-setting",
1496 flag_descriptions::kBottomOmniboxDefaultSettingName,
1497 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1498 flags_ui::kOsIos,
1499 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1500 kBottomOmniboxDefaultSettingVariations,
1501 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131502 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1503 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1504 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
Nohemi Fernandez64acf982023-08-04 09:27:151505 {"enable-family-link-controls",
1506 flag_descriptions::kEnableFamilyLinkControlsName,
1507 flag_descriptions::kEnableFamilyLinkControlsDescription, flags_ui::kOsIos,
1508 FEATURE_VALUE_TYPE(
1509 supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)},
adamta7be73b182023-08-08 22:30:351510 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1511 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1512 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501513 {"ios-password-auth-on-entry-v2",
1514 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1515 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1516 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281517 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1518 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1519 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131520 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1521 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1522 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021523 {"parcel-tracking-test-data",
1524 commerce::flag_descriptions::kParcelTrackingTestDataName,
1525 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1526 flags_ui::kOsIos,
1527 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1528 kParcelTrackingTestDataVariations,
1529 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111530 {"autofill-enable-merchant-domain-in-unmask-card-request",
1531 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1532 flag_descriptions::
1533 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1534 flags_ui::kOsIos,
1535 FEATURE_VALUE_TYPE(
1536 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331537 {"autofill-update-chrome-settings-link-to-gpay-web",
1538 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1539 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1540 flags_ui::kOsIos,
1541 FEATURE_VALUE_TYPE(
1542 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281543 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1544 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1545 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591546 {"iph-ios-promo-manager-widget-promo",
1547 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1548 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1549 flags_ui::kOsIos,
1550 FEATURE_VALUE_TYPE(
1551 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571552 {"autofill-enable-virtual-cards",
1553 flag_descriptions::kAutofillEnableVirtualCardsName,
1554 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1555 flags_ui::kOsIos,
1556 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551557 {"ios-incognito-downloads-warning",
1558 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1559 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1560 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571561 {"omnibox-shortcuts-database-ios",
1562 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1563 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211564 flags_ui::kOsIos,
1565 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021566 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1567 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1568 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Vasilii Sukhanov32b14452023-10-12 17:31:271569 {"delete-undecryptable-passwords",
1570 flag_descriptions::kClearUndecryptablePasswordsOnSyncName,
1571 flag_descriptions::kClearUndecryptablePasswordsOnSyncDescription,
1572 flags_ui::kOsIos,
1573 FEATURE_VALUE_TYPE(
1574 password_manager::features::kClearUndecryptablePasswordsOnSync)},
1575 {"ignore-undecryptable-passwords",
1576 flag_descriptions::kSkipUndecryptablePasswordsName,
1577 flag_descriptions::kSkipUndecryptablePasswordsDescription,
1578 flags_ui::kOsIos,
1579 FEATURE_VALUE_TYPE(
1580 password_manager::features::kSkipUndecryptablePasswords)},
Rubin Deliallisi072bc842023-10-19 12:00:411581 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1582 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1583 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Christian Xubb3374c2023-10-24 10:58:221584 {"bottom-omnibox-device-switcher-results",
1585 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsName,
1586 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsDescription,
1587 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxDeviceSwitcherResults)},
Ewann Pelle54e51bd62023-10-24 17:28:121588 {"sync-session-on-visibility-changed",
1589 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1590 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1591 flags_ui::kOsIos,
1592 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451593 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1594 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1595 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531596 {"password-sharing", flag_descriptions::kPasswordSharingName,
1597 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1598 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511599 {"omnibox-company-entity-icon-adjustment",
1600 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1601 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1602 flags_ui::kOsIos,
1603 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1604 kOmniboxCompanyEntityAdjustmentVariations,
1605 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051606 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1607 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1608 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1609 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1610 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1611 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351612 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1613 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1614 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471615 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1616 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1617 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131618 {"autofill-enable-payments-mandatory-reauth",
1619 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1620 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1621 flags_ui::kOsIos,
1622 FEATURE_VALUE_TYPE(
1623 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231624 {"autofill-enable-card-benefits",
1625 flag_descriptions::kAutofillEnableCardBenefitsName,
1626 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1627 flags_ui::kOsIos,
1628 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201629 {"password-manager-signin-uff",
1630 flag_descriptions::kIOSPasswordSignInUffName,
1631 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1632 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011633 {"tab-grid-compositional-layout",
1634 flag_descriptions::kTabGridCompositionalLayoutName,
1635 flag_descriptions::kTabGridCompositionalLayoutDescription,
1636 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Christian Xue72882d2023-11-20 17:10:481637 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1638 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1639 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1640 kBottomOmniboxPromoVariations,
1641 "BottomOmniboxPromoFRE")},
1642 {"bottom-omnibox-promo-app-launch",
1643 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1644 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1645 flags_ui::kOsIos,
1646 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1647 kBottomOmniboxPromoVariations,
1648 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091649 {"bottom-omnibox-promo-default-position",
1650 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1651 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1652 flags_ui::kOsIos,
1653 FEATURE_WITH_PARAMS_VALUE_TYPE(
1654 kBottomOmniboxPromoDefaultPosition,
1655 kBottomOmniboxPromoDefaultPositionVariations,
1656 "BottomOmniboxPromoDefaultPosition")},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301657};
sdefresne14900ee2015-11-27 14:43:211658
Rohit Raobed794c2020-04-27 15:27:451659bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1660 return false;
1661}
1662
1663flags_ui::FlagsState& GetGlobalFlagsState() {
1664 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1665 nullptr);
1666 return *flags_state;
1667}
David Jean5ca263c2021-08-18 09:19:301668// Creates the experimental test policies map, used by AsyncPolicyLoader and
1669// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341670NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211671 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1672
Guillaume Jenkins25e9bd72020-08-27 17:39:061673 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551674 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061675 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551676
Guillaume Jenkins25e9bd72020-08-27 17:39:061677 // Set some sample policy values for testing if EnableSamplePolicies is set to
1678 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401679 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551680 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011681 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1682
Guillaume Jenkinseeb7007c2020-06-25 22:55:401683 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1684
1685 // 2 = Disable all variations
1686 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1687
1688 // 2 = Do not allow any site to show popups
1689 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1690
Tina Wang5abee802020-07-29 23:09:521691 // Set default search engine.
1692 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1693 @YES,
1694 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1695 @"http://www.google.com/search?q={searchTerms}",
1696 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021697 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521698
Tina Wang89068c82020-10-29 15:51:501699 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1700
Gauthier Ambard21b23702021-04-16 16:11:271701 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1702
Tina Wang59d0b7e2020-08-11 04:41:011703 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531704
1705 // 2 = Enhanced safe browsing protection
1706 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1707
1708 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291709
1710 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551711 }];
1712 }
1713
Ewann227a3c02021-04-19 12:04:541714 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041715 NSString* sync_policy_key =
1716 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301717 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541718 }
Ewann227a3c02021-04-19 12:04:541719
Ewann570a6302021-08-17 07:22:421720 // SyncTypesListDisabled policy.
1721 NSString* Sync_types_list_disabled_key =
1722 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1723 NSMutableArray* Sync_types_list_disabled_values =
1724 [[NSMutableArray alloc] init];
1725 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1726 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1727 }
1728 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1729 [Sync_types_list_disabled_values addObject:@"readingList"];
1730 }
1731 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1732 [Sync_types_list_disabled_values addObject:@"preferences"];
1733 }
1734 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1735 [Sync_types_list_disabled_values addObject:@"passwords"];
1736 }
1737 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1738 [Sync_types_list_disabled_values addObject:@"autofill"];
1739 }
1740 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1741 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1742 }
1743 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1744 [Sync_types_list_disabled_values addObject:@"tabs"];
1745 }
1746 if ([Sync_types_list_disabled_values count]) {
1747 [testing_policies addEntriesFromDictionary:@{
1748 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1749 }];
Ewann570a6302021-08-17 07:22:421750 }
1751
Gauthier Ambard073eaa92021-11-22 15:24:131752 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521753 NSString* incognito_policy_key =
1754 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1755 NSInteger incognito_mode_availability =
1756 [defaults integerForKey:incognito_policy_key];
1757 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521758 [testing_policies addEntriesFromDictionary:@{
1759 incognito_policy_key : @(incognito_mode_availability),
1760 }];
1761 }
1762
Ewann40a8f8a2021-07-29 10:01:201763 NSString* restriction_pattern =
1764 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1765 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291766 NSString* restrict_key =
1767 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201768 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291769 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201770 }];
1771 }
1772
Vincent Boisselle19200bc2021-09-01 17:58:251773 // If the sign-in policy is set (not "None"), add the policy key to the list
1774 // of enabled experimental policies, and set the value.
1775 NSString* const kSigninPolicyKey = @"BrowserSignin";
1776 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1777 if (signin_policy_mode) {
1778 // Remove the mode offset that was used to represent the unset policy.
1779 --signin_policy_mode;
1780 DCHECK(signin_policy_mode >= 0);
1781
Vincent Boisselle19200bc2021-09-01 17:58:251782 [testing_policies addEntriesFromDictionary:@{
1783 kSigninPolicyKey : @(signin_policy_mode),
1784 }];
1785 }
1786
Veronique Nguyen9b1044f2022-01-11 14:41:131787 // If the New Tab Page URL is set (not empty) add the value to the list of
1788 // test policies.
1789 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1790 if ([ntp_location length] > 0) {
1791 NSString* ntp_location_key =
1792 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1793 [testing_policies
1794 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571795 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131796 }
1797
Ali Juma9ec36d22022-03-28 14:53:121798 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1799 NSString* allow_backups_key =
1800 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1801 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1802 [allowed_experimental_policies addObject:allow_backups_key];
1803 }
1804
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241805 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1806 NSString* password_manager_key =
1807 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1808 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1809 [allowed_experimental_policies addObject:password_manager_key];
1810 }
Vincent Boisselle003569a72023-09-11 16:03:121811
1812 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1813 NSString* user_policy_merge_key =
1814 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1815 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1816 [allowed_experimental_policies addObject:user_policy_merge_key];
1817 }
1818
Arthur Milchiorbb44f5c82023-03-14 16:14:461819 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1820 NSString* managed_bookmarks_key =
1821 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1822 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571823 @"["
1824 // The following gets filtered out from
1825 // the JSON string when parsed.
1826 " {"
1827 " \"toplevel_name\": \"Managed Bookmarks\""
1828 " },"
1829 " {"
1830 " \"name\": \"Google\","
1831 " \"url\": \"google.com\""
1832 " },"
1833 " {"
1834 " \"name\": \"Empty Folder\","
1835 " \"children\": []"
1836 " },"
1837 " {"
1838 " \"name\": \"Big Folder\","
1839 " \"children\": ["
1840 " {"
1841 " \"name\": \"Youtube\","
1842 " \"url\": \"youtube.com\""
1843 " },"
1844 " {"
1845 " \"name\": \"Chromium\","
1846 " \"url\": \"chromium.org\""
1847 " },"
1848 " {"
1849 " \"name\": \"More Stuff\","
1850 " \"children\": ["
1851 " {"
1852 " \"name\": \"Bugs\","
1853 " \"url\": \"crbug.com\""
1854 " }"
1855 " ]"
1856 " }"
1857 " ]"
1858 " }"
1859 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461860 [testing_policies addEntriesFromDictionary:@{
1861 managed_bookmarks_key : managed_bookmarks_value
1862 }];
1863 [allowed_experimental_policies addObject:managed_bookmarks_key];
1864 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241865
Guillaume Jenkins25e9bd72020-08-27 17:39:061866 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1867 // policy.
1868 if ([allowed_experimental_policies count] > 0) {
1869 [testing_policies setValue:allowed_experimental_policies
1870 forKey:base::SysUTF8ToNSString(
1871 policy::key::kEnableExperimentalPolicies)];
1872 }
1873
jlebel2eb40222022-05-06 11:15:421874 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1875 switch ([defaults integerForKey:metrics_reporting_key]) {
1876 case 1:
1877 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131878 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421879 break;
1880 case 2:
1881 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131882 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421883 break;
1884 default:
1885 // Metrics reporting not managed.
1886 break;
1887 }
1888
David Jean6f85d44f2021-08-19 08:08:451889 // Warning: Add new flags to TestingPoliciesHash() below.
1890
David Jean5ca263c2021-08-18 09:19:301891 return testing_policies;
1892}
David Jean6f85d44f2021-08-19 08:08:451893
David Jean5ca263c2021-08-18 09:19:301894} // namespace
1895
Gauthier Ambard02dbf022022-08-23 08:28:471896// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301897void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1898 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1899
1900 // Set the UA flag if UseMobileSafariUA is enabled.
1901 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1902 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1903 // Chrome puts its product token.
1904 int32_t major = 0;
1905 int32_t minor = 0;
1906 int32_t bugfix = 0;
1907 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1908 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1909
1910 command_line->AppendSwitchASCII(switches::kUserAgent,
1911 web::BuildMobileUserAgent(product));
1912 }
1913
1914 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341915 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301916
1917 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1918 // Management to enabled and add the token to the list of policies.
1919 NSString* token_key =
1920 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1921 NSString* token = [defaults stringForKey:token_key];
1922
1923 if ([token length] > 0) {
1924 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1925 [testing_policies setValue:token forKey:token_key];
1926 }
1927
Guillaume Jenkins57606d72020-08-13 17:32:551928 // If some policies were set, commit them to the app's registration defaults.
1929 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401930 NSDictionary* registration_defaults =
1931 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1932 [defaults registerDefaults:registration_defaults];
1933 }
1934
sdefresne14900ee2015-11-27 14:43:211935 // Freeform commandline flags. These are added last, so that any flags added
1936 // earlier in this function take precedence.
1937 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1938 base::CommandLine::StringVector flags;
1939 // Append an empty "program" argument.
1940 flags.push_back("");
1941
1942 // The number of flags corresponds to the number of text fields in
1943 // Experimental.plist.
1944 const int kNumFreeformFlags = 5;
1945 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1946 NSString* key =
1947 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1948 NSString* flag = [defaults stringForKey:key];
1949 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331950 // iOS keyboard replaces -- with —, so undo that.
1951 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1952 withString:@"--"
1953 options:0
1954 range:NSMakeRange(0, 1)];
1955 // To make things easier, allow flags with no dashes by prepending them
1956 // here. This also allows for flags that just have one dash if they
1957 // exist.
1958 if (![flag hasPrefix:@"-"]) {
1959 flag = [@"--" stringByAppendingString:flag];
1960 }
sdefresne14900ee2015-11-27 14:43:211961 flags.push_back(base::SysNSStringToUTF8(flag));
1962 }
1963 }
1964
1965 base::CommandLine temp_command_line(flags);
1966 command_line->AppendArguments(temp_command_line, false);
1967 }
msardafc76f662017-02-24 12:46:281968
justincohendacc85d2017-06-28 23:34:101969 // Populate command line flag for 3rd party keyboard omnibox workaround.
1970 NSString* enableThirdPartyKeyboardWorkaround =
1971 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1972 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1973 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1974 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1975 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1976 }
1977
Sylvain Defresned3cd8d92022-01-18 13:35:081978 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211979}
1980
sdefresne14900ee2015-11-27 14:43:211981void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1982 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181983 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111984 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531985 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211986}
1987
jkrcalbf073372016-07-29 07:21:311988std::vector<std::string> RegisterAllFeatureVariationParameters(
1989 flags_ui::FlagsStorage* flags_storage,
1990 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181991 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1992 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311993}
1994
sdefresne14900ee2015-11-27 14:43:211995void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1996 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501997 base::Value::List& supported_entries,
1998 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181999 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:212000 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:512001 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:212002}
2003
2004void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
2005 const std::string& internal_name,
2006 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:182007 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
2008 enable);
sdefresne14900ee2015-11-27 14:43:212009}
2010
2011void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:182012 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:212013}
2014
Nicolas MacBeth972e2592023-02-23 15:22:092015bool IsRestartNeededToCommitChanges() {
2016 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
2017}
2018
sdefresne14900ee2015-11-27 14:43:212019namespace testing {
2020
Elly Fong-Jones323ab1092021-08-23 22:36:312021base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
2022 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:532023 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:212024}
2025
2026} // namespace testing