blob: 7e588f2b4b6ff4c839e73eb038af2e0d711ec314 [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"
Matthew Jonesbf0a53bc2023-12-19 16:08:3155#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"
mmrashadd0c7f952023-12-14 13:36:3882#import "ios/chrome/browser/policy/model/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"
Filipa Senra0bd07982023-12-19 10:56:2595#import "ios/chrome/browser/ui/page_info/features.h"
Robbie Gibson686c56732021-10-04 17:11:4596#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1597#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:4198#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:1999#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58100#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22101#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57102#import "ios/chrome/grit/ios_strings.h"
103#import "ios/components/security_interstitials/https_only_mode/feature.h"
104#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
105#import "ios/web/common/features.h"
106#import "ios/web/common/user_agent.h"
107#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21108
Sylvain Defresne9c107082020-10-27 16:39:13109#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48110#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13111#endif
112
sdefresne14900ee2015-11-27 14:43:21113#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22115#endif
stkhapuginc1be1792016-12-13 14:30:53116
elawrence816f6790e2017-06-16 18:19:28117using flags_ui::FeatureEntry;
118
sdefresne14900ee2015-11-27 14:43:21119namespace {
Emily Starkbafa9062017-12-27 15:22:46120
Nohemi Fernandezc00842a2021-07-26 11:47:34121const FeatureEntry::Choice
122 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
123 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
124 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
125 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
126 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
127};
128
Cheick Cisse8835611a2023-06-02 21:42:54129// Uses int values from DefaultPromoType enum.
130const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
131 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
132 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
133 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
134 "1"},
135 {"Show tailored made for ios promo",
136 "default-browser-promo-force-show-promo", "2"},
137 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
138 "3"},
139 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
140};
141
Stepan Khapugincc4e9842019-01-23 13:38:13142const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
143 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
144const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
145 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
156
157const FeatureEntry::FeatureVariation
158 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
159 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53160 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13161 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53162 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13163 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13173
Stepan Khapuginbac467e2022-05-06 21:11:54174const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
175 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
176const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
177 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
180
181const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
182 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
183 nullptr},
184 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
185 nullptr},
186 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
187 nullptr},
188};
189
Christian Xucf26d562022-07-06 09:28:36190const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
191 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
192const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
193 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
196
197const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
198 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
199 nullptr},
200 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
201 nullptr},
202 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
203 nullptr},
204};
205
Cheick Cissedc49dbe2023-08-09 13:33:52206const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51207 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
208 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
209const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
210 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
211const FeatureEntry::FeatureParam
212 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
213 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
214
215const FeatureEntry::FeatureVariation
216 kOmniboxCompanyEntityAdjustmentVariations[] = {
217 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
218 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
219 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
220 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
221 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
222 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
223};
224
225const FeatureEntry::FeatureParam
Cheick Cissedc49dbe2023-08-09 13:33:52226 kDefaultBrowserVideoConditionsHalfscreenPromo[] = {
227 {kDefaultBrowserVideoPromoVariant, kVideoConditionsHalfscreenPromo}};
228const FeatureEntry::FeatureParam
229 kDefaultBrowserVideoConditionsFullscreenPromo[] = {
230 {kDefaultBrowserVideoPromoVariant, kVideoConditionsFullscreenPromo}};
231const FeatureEntry::FeatureParam
232 kDefaultBrowserGenericConsitionsFullscreenPromo[] = {
233 {kDefaultBrowserVideoPromoVariant, kGenericConditionsFullscreenPromo}};
234const FeatureEntry::FeatureParam
235 kDefaultBrowserGenericConditionsHalfscreenPromo[] = {
236 {kDefaultBrowserVideoPromoVariant, kGenericConditionsHalfscreenPromo}};
237
Cheick Cisse2806f082b2023-04-25 14:20:01238const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Cheick Cissedc49dbe2023-08-09 13:33:52239 {"Show half screen ui with video condtions",
240 kDefaultBrowserVideoConditionsHalfscreenPromo,
241 std::size(kDefaultBrowserVideoConditionsHalfscreenPromo), nullptr},
242 {"Show full screen ui with video condtions",
243 kDefaultBrowserVideoConditionsFullscreenPromo,
244 std::size(kDefaultBrowserVideoConditionsFullscreenPromo), nullptr},
245 {"Show full screen ui with generic condtions",
246 kDefaultBrowserGenericConsitionsFullscreenPromo,
247 std::size(kDefaultBrowserGenericConsitionsFullscreenPromo), nullptr},
248 {"Show half screen ui with generic condtions",
249 kDefaultBrowserGenericConditionsHalfscreenPromo,
250 std::size(kDefaultBrowserGenericConditionsHalfscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01251};
252
adamta37c6b832023-03-10 20:04:09253// Uses int values from SigninPromoViewStyle enum.
254const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
255 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09256const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59257 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09258const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59259 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47260
Mohammad Refaatab6bee62022-05-16 16:31:15261const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09262 {"Standard", kDiscoverFeedTopSyncPromoStandard,
263 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09264 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
265 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
266 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
267 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15268
Guillem Perez40086ef2023-11-20 20:03:52269const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
270 {kContentPushNotificationsExperimentType, "1"}};
271const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
272 {{kContentPushNotificationsExperimentType, "2"}};
273
274const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
275 {"Promo", kContentPushNotificationsEnabledPromo,
276 std::size(kContentPushNotificationsEnabledPromo), nullptr},
277 {"Set up list", kContentPushNotificationsEnabledSetupLists,
278 std::size(kContentPushNotificationsEnabledSetupLists), nullptr}};
279
adamta4a6f2fd22023-02-13 17:37:14280const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
281 {kDisableStickyHeaderForFollowingFeed, "true"}};
282const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18283 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14284const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
285 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18286 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14287
288const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
289 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
290 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
291 {"Reduced header height", kFeedHeaderSettingReducedHeight,
292 std::size(kFeedHeaderSettingReducedHeight), nullptr},
293 {"All improvements", kFeedHeaderSettingAllImprovements,
294 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
295
Chris Ludca9ce32023-09-20 16:53:50296const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35297 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50298const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35299 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08300
gogerald0e39e3aa2021-02-10 18:41:23301const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50302 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
303 std::size(kStartSurfaceTenSeconds), nullptr},
304 {"1h:Show Home Surface", kStartSurfaceOneHour,
305 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08306};
gogerald0e39e3aa2021-02-10 18:41:23307
Chris Luce928eb2023-05-12 21:36:26308const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
309 {kMagicStackMostVisitedModuleParam, "true"},
310 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22311const FeatureEntry::FeatureParam
312 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
313 {kMagicStackMostVisitedModuleParam, "true"},
314 {kReducedSpaceParam, "-80"},
315 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13316const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26317 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13318 {kReducedSpaceParam, "20"}};
319const FeatureEntry::FeatureParam
320 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
321 {kMagicStackMostVisitedModuleParam, "false"},
322 {kReducedSpaceParam, "20"},
323 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26324
325const FeatureEntry::FeatureVariation kMagicStackVariations[]{
326 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
327 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22328 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
329 kMagicStackMostVisitedModuleHideIrrelevantModules,
330 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13331 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
332 std::size(kMagicStackReducedNTPTopSpace), nullptr},
333 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
334 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
335 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26336};
337
Chris Lu6fd4eaf2023-08-08 18:29:30338const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
339 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
340
341const FeatureEntry::FeatureVariation
342 kSegmentationPlatformIosModuleRankerVariations[]{
343 {"Enabled With Default Model Parameter (Must Set this!)",
344 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
345 };
346
Ed Chin91e44992022-07-27 13:42:34347#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26348// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01349const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04350 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
351 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01352 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04353 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01354const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04355 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
356 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01357 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04358 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01359const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04360 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
361 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01362 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04363 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01364const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04365 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
366 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01367 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04368 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01369const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04370 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
371 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01372 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
373 {kBackgroundRefreshIntervalInSeconds, "0"}};
374const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04375 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
376 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01377 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
378 {kBackgroundRefreshIntervalInSeconds, "0"}};
379const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
380 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
381 {kEnableRecurringBackgroundRefreshSchedule, "false"},
382 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
383 {kBackgroundRefreshIntervalInSeconds, "0"}};
384const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
385 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
386 {kEnableRecurringBackgroundRefreshSchedule, "true"},
387 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
388 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04389
Ed Chin178ec2a2023-02-10 22:21:26390// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04391const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01392 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
393 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
394 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
395 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
396 {"1hr Interval 1hr Max Age Recurring",
397 kOneHourIntervalOneHourMaxAgeRecurring,
398 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
399 {"4hr Interval 6hr Max Age Recurring",
400 kFourHourIntervalSixHourMaxAgeRecurring,
401 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
402 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
403 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
404 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
405 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
406 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
407 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
408 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
409 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04410};
Ed Chin91e44992022-07-27 13:42:34411#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04412
Ed Chin178ec2a2023-02-10 22:21:26413// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29414const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
415 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54416 {kEnableFeedAppCloseForegroundRefresh, "false"},
417 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29418const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
419 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54420 {kEnableFeedAppCloseForegroundRefresh, "true"},
421 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
422const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
423 {kEnableFeedSessionCloseForegroundRefresh, "false"},
424 {kEnableFeedAppCloseForegroundRefresh, "false"},
425 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26426
Ed Chin5c1fd532023-03-20 17:43:29427// Feed Invisible Foreground Refresh Feature Variations.
428const FeatureEntry::FeatureVariation
429 kFeedInvisibleForegroundRefreshVariations[] = {
430 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
431 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
432 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
433 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54434 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
435 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26436};
437
Raj T18a2c8c2023-03-15 17:20:15438const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
439 {"date", "true"}};
440const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
441 {"address", "true"}};
442const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
443 {"phonenumber", "true"}};
444const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
445 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50446const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
447 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15448const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
449 {"date", "true"},
450 {"address", "true"},
451 {"phonenumber", "true"},
452 {"email", "true"}};
453const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
454 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
455 std::size(kEnableExpKitTextClassifierAll), nullptr},
456 {"Enabled for date", kEnableExpKitTextClassifierDate,
457 std::size(kEnableExpKitTextClassifierDate), nullptr},
458 {"Enabled for address", kEnableExpKitTextClassifierAddress,
459 std::size(kEnableExpKitTextClassifierAddress), nullptr},
460 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
461 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
462 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50463 std::size(kEnableExpKitTextClassifierEmail), nullptr},
464 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
465 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15466
Louis Romero93e9b50a2023-01-26 01:46:12467const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
468 {kTabInactivityThresholdParameterName,
469 kTabInactivityThresholdOneWeekParam}};
470const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
471 {kTabInactivityThresholdParameterName,
472 kTabInactivityThresholdTwoWeeksParam}};
473const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
474 {kTabInactivityThresholdParameterName,
475 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58476const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
477 {kTabInactivityThresholdParameterName,
478 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12479
480const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
481 {"One week", kTabInactivityThresholdOneWeek,
482 std::size(kTabInactivityThresholdOneWeek), nullptr},
483 {"Two weeks", kTabInactivityThresholdTwoWeeks,
484 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
485 {"Three weeks", kTabInactivityThresholdThreeWeeks,
486 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58487 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
488 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12489};
490
Ewann Pelle6eecb8f2023-06-23 14:31:37491const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
492 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
493const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
494 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
495const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
496 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55497const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
498 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37499
500const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
501 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00502 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37503 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00504 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37505 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00506 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55507 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
508 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00509};
510
511const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
512 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
513const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
514 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48515const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
516 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00517
518const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
519 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
520 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48521 {"Most recent tab and last synced tab (12 hours threshold)",
522 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
523 {"Most recent tab and last synced tab (24 hours threshold)",
524 kTabResumptionAllTabsOneDayThreshold,
525 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37526};
527
Huiting Yud7d2a5322023-02-09 21:14:22528const FeatureEntry::FeatureParam
529 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
530 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
531const FeatureEntry::FeatureParam
532 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
533 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
534const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20535 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20536 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
537 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22538
539const FeatureEntry::FeatureVariation
540 kCredentialProviderExtensionPromoVariations[] = {
541 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
542 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
543 {"On password copied",
544 kCredentialProviderExtensionPromoOnPasswordCopied,
545 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20546 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30547 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22548
Olivier ROBINfd3887b72023-02-23 14:45:42549const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
550 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44551const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
552 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42553const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
554 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44555 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
556 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
557 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42558
Olivier ROBIN2613bcd02023-04-20 10:00:47559const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
560 {kIOSEditMenuSearchWithTitleParamTitle,
561 kIOSEditMenuSearchWithTitleSearchWithParam}};
562const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
563 {kIOSEditMenuSearchWithTitleParamTitle,
564 kIOSEditMenuSearchWithTitleSearchParam}};
565const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
566 {kIOSEditMenuSearchWithTitleParamTitle,
567 kIOSEditMenuSearchWithTitleWebSearchParam}};
568const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
569 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
570 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
571 {"Search", kIOSEditMenuSearchWithTitleSearch,
572 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
573 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
574 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
575};
576
Hira Mahmood6b0e5502023-06-12 21:51:43577const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
578 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
579const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
580 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
581const FeatureEntry::FeatureVariation
582 kPostRestoreDefaultBrowserPromoVariations[] = {
583 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
584 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
585 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
586 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
587};
588
Christian Xu07d600192023-07-24 12:29:52589const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
590 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
591const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
592 {kBottomOmniboxDefaultSettingParam,
593 kBottomOmniboxDefaultSettingParamBottom}};
594const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
595 {{kBottomOmniboxDefaultSettingParam,
596 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
597const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
598 {
599 {"Top", kBottomOmniboxDefaultSettingTop,
600 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
601 {"Bottom", kBottomOmniboxDefaultSettingBottom,
602 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
603 {"Bottom for Safari Switcher",
604 kBottomOmniboxDefaultSettingSafariSwitcher,
605 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
606};
607
Christian Xue72882d2023-11-20 17:10:48608const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
609 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
610const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
611 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
612 nullptr},
613};
614
Christian Xua3667352023-11-21 16:54:09615const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
616 {kBottomOmniboxPromoDefaultPositionParam,
617 kBottomOmniboxPromoDefaultPositionParamTop}};
618const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
619 {kBottomOmniboxPromoDefaultPositionParam,
620 kBottomOmniboxPromoDefaultPositionParamBottom}};
621const FeatureEntry::FeatureVariation
622 kBottomOmniboxPromoDefaultPositionVariations[] = {
623 {"Top", kBottomOmniboxPromoDefaultPositionTop,
624 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
625 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
626 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
627};
628
Marc Treib9bddebb2023-06-15 14:03:34629const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
630 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25631 {"Disabled", "disable-features",
632 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24633 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02634 "FeedBottomSyncStringRemoval,"
635 "SyncEnableContactInfoDataTypeInTransportMode,"
636 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
637 "SyncEnableBatchUploadLocalData,"
638 "SyncEnableWalletMetadataInTransportMode,"
639 "SyncEnableWalletOfferInTransportMode,"
640 "IOSPasswordSettingsBulkUploadLocalPasswords"},
641 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34642 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24643 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25644 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34645 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37646 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55647 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06648 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06649 "SyncEnableWalletOfferInTransportMode,"
650 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02651 {"Enabled with fast-follows", "enable-features",
652 "ReplaceSyncPromosWithSignInPromos,"
653 "ConsistencyNewAccountInterface,"
654 "FeedBottomSyncStringRemoval,"
655 "SyncEnableContactInfoDataTypeInTransportMode,"
656 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
657 "SyncEnableBatchUploadLocalData,"
658 "SyncEnableWalletMetadataInTransportMode,"
659 "SyncEnableWalletOfferInTransportMode,"
660 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33661 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07662 "EnableBatchUploadFromBookmarksManager,"
663 "EnableReviewAccountSettingsPromo"},
Marc Treib9bddebb2023-06-15 14:03:34664};
665
Olivier ROBIN82b67002023-07-31 14:34:46666const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
667 {web::features::kOneTapForMapsConsentModeParamTitle,
668 web::features::kOneTapForMapsConsentModeDefaultParam}};
669const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
670 {web::features::kOneTapForMapsConsentModeParamTitle,
671 web::features::kOneTapForMapsConsentModeForcedParam}};
672const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
673 {web::features::kOneTapForMapsConsentModeParamTitle,
674 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31675const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
676 {web::features::kOneTapForMapsConsentModeParamTitle,
677 web::features::kOneTapForMapsConsentModeIPHParam}};
678const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
679 {web::features::kOneTapForMapsConsentModeParamTitle,
680 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46681const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
682 {"Consent Default", kOneTapForMapsConsentModeDefault,
683 std::size(kOneTapForMapsConsentModeDefault), nullptr},
684 {"Consent Forced", kOneTapForMapsConsentModeForced,
685 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31686 {"Consent IPH", kOneTapForMapsConsentModeIPH,
687 std::size(kOneTapForMapsConsentModeIPH), nullptr},
688 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
689 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46690 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
691 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
692};
693
Stepan Khapuginec68d5bb2023-10-16 13:35:25694constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
695 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19696 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25697constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
698 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19699 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25700constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
701 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19702 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25703constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
704 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19705 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25706
707constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
708 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
709 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
710 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
711 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
712 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
713 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
714 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
715 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
716};
717
Rafał Godlewskie75d12402023-10-25 15:31:53718const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
719 {"Default", "", ""},
720 {"Bootstraping Only", switches::kEnableFeatures,
721 "SharingOfferKeyPairBootstrap"},
722 {"Enabled", switches::kEnableFeatures,
723 "SharingOfferKeyPairBootstrap,SendPasswords,"
724 "PasswordManagerEnableSenderService,"
725 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
726};
727
Scott Yoderd781bd12023-10-25 20:47:15728const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
729 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
730const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
731 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
732 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
733};
734
Matt Jones79534392023-10-27 14:35:02735const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
736 {{commerce::kParcelTrackingTestDataParam,
737 commerce::kParcelTrackingTestDataParamDelivered}};
738const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
739 {{commerce::kParcelTrackingTestDataParam,
740 commerce::kParcelTrackingTestDataParamInProgress}};
741const flags_ui::FeatureEntry::FeatureParam
742 kParcelTrackingTestDataOutForDelivery[] = {
743 {commerce::kParcelTrackingTestDataParam,
744 commerce::kParcelTrackingTestDataParamOutForDelivery}};
745const flags_ui::FeatureEntry::FeatureVariation
746 kParcelTrackingTestDataVariations[] = {
747 {"Delivered", kParcelTrackingTestDataDelivered,
748 std::size(kParcelTrackingTestDataDelivered), nullptr},
749 {"In progress", kParcelTrackingTestDataInProgress,
750 std::size(kParcelTrackingTestDataInProgress), nullptr},
751 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
752 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
753};
754
Cooper Knaak1e026562017-07-26 05:22:28755// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21756// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28757// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
758// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21759// macro for this type supplying the command line to the macro.
760// . MULTI_VALUE: a list of choices, the first of which should correspond to a
761// deactivated state for this lab (i.e. no command line option). To specify
762// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
763// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28764// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
765// either enabled, disabled, or uses the default value of the associated
766// base::Feature instance. To specify this type of entry use the macro
767// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
768// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
769// base::Feature instance. Choices corresponding to the default state, a
770// universally enabled state, and a universally disabled state are
771// automatically included. To specify this type of entry use the macro
772// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
773// the array of choices.
774//
sdefresne14900ee2015-11-27 14:43:21775// See the documentation of FeatureEntry for details on the fields.
776//
777// When adding a new choice, add it to the end of the list.
778const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28779 {"in-product-help-demo-mode-choice",
780 flag_descriptions::kInProductHelpDemoModeName,
781 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
782 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23783 feature_engagement::kIPHDemoMode,
784 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09785 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22786 {"enable-autofill-credit-card-upload",
787 flag_descriptions::kAutofillCreditCardUploadName,
788 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24789 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23790 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
791 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
792 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51793 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23794 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
795 {"wallet-service-use-sandbox",
796 flag_descriptions::kWalletServiceUseSandboxName,
797 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
798 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
799 autofill::switches::kWalletServiceUseSandbox,
800 "1",
801 autofill::switches::kWalletServiceUseSandbox,
802 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59803 {"show-autofill-type-predictions",
804 flag_descriptions::kShowAutofillTypePredictionsName,
805 flag_descriptions::kShowAutofillTypePredictionsDescription,
806 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50807 FEATURE_VALUE_TYPE(
808 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05809 {"fullscreen-promos-manager-skip-internal-limits",
810 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
811 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
812 flags_ui::kOsIos,
813 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14814 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53815 flag_descriptions::kFullscreenSmoothScrollingName,
816 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19817 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06818 {"webpage-default-zoom-from-dynamic-type",
819 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
820 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
821 flags_ui::kOsIos,
822 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56823 {"webpage-alternative-text-zoom",
824 flag_descriptions::kWebPageAlternativeTextZoomName,
825 flag_descriptions::kWebPageAlternativeTextZoomDescription,
826 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34827 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
828 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
829 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13830 {"omnibox-ui-max-autocomplete-matches",
831 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
832 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
833 flags_ui::kOsIos,
834 FEATURE_WITH_PARAMS_VALUE_TYPE(
835 omnibox::kUIExperimentMaxAutocompleteMatches,
836 kOmniboxUIMaxAutocompleteMatchesVariations,
837 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35838 {"omnibox-local-history-zero-suggest-beyond-ntp",
839 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
840 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
841 flags_ui::kOsIos,
842 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54843 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
844 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
845 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
846 kOmniboxMaxZPSMatchesVariations,
847 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25848 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
849 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
850 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
851 kOmniboxInspireMeVariants,
852 "OmniboxBundledExperimentV1")},
853 {"omnibox-inspire-me-signed-out",
854 flag_descriptions::kOmniboxInspireMeSignedOutName,
855 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
856 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48857 {"force-startup-signin-promo",
858 flag_descriptions::kForceStartupSigninPromoName,
859 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29860 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41861 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
862 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
863 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13864#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45865 {"screen-time-integration-ios",
866 flag_descriptions::kScreenTimeIntegrationName,
867 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
868 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13869#endif
Nazerke3e993f72020-09-21 13:00:06870 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
871 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
872 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11873 {"ios-shared-highlighting-color-change",
874 flag_descriptions::kIOSSharedHighlightingColorChangeName,
875 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07876 flags_ui::kOsIos,
877 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34878 {"ios-shared-highlighting-v2",
879 flag_descriptions::kIOSSharedHighlightingV2Name,
880 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45882 {"omnibox-new-textfield-implementation",
883 flag_descriptions::kOmniboxNewImplementationName,
884 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19886 {"start-surface", flag_descriptions::kStartSurfaceName,
887 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23888 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
889 kStartSurfaceVariations,
890 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42891 {"autofill-address-verification-in-save-prompt",
892 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
893 flag_descriptions::
894 kEnableAutofillAddressSavePromptAddressVerificationDescription,
895 flags_ui::kOsIos,
896 FEATURE_VALUE_TYPE(
897 autofill::features::
898 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Side Yilmaz6c53f7102021-09-07 13:26:19899 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
900 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
901 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34902 {"wait-threshold-seconds-for-capabilities-api",
903 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
904 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
905 flags_ui::kOsIos,
906 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28907 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
908 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
909 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24910 {"content-push-notifications",
911 flag_descriptions::kContentPushNotificationsName,
912 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52913 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
914 kContentPushNotificationsVariations,
915 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57916 {"overflow-menu-customization",
917 flag_descriptions::kOverflowMenuCustomizationName,
918 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
919 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44920 {"enable-lens-in-omnibox-copied-image",
921 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
922 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
923 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40924 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23925 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
926 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40927 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23928 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03929 {"enable-disco-feed-endpoint",
930 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
931 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
932 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11933 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15934 {"enable-discover-feed-top-sync-promo",
935 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
936 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
937 flags_ui::kOsIos,
938 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
939 kDiscoverFeedTopSyncPromoVariations,
940 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14941 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
942 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
943 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
944 kFeedHeaderSettingsVariations,
945 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28946 {"shared-highlighting-amp",
947 flag_descriptions::kIOSSharedHighlightingAmpName,
948 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
949 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28950 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42951 commerce::flag_descriptions::kCommercePriceTrackingName,
952 commerce::flag_descriptions::kCommercePriceTrackingDescription,
953 flags_ui::kOsIos,
954 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
955 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15956 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06957 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
958 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
959 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54960 {"ntp-view-hierarchy-repair",
961 flag_descriptions::kNTPViewHierarchyRepairName,
962 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20963 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26964 {"autofill-enable-card-product-name",
965 flag_descriptions::kAutofillEnableCardProductNameName,
966 flag_descriptions::kAutofillEnableCardProductNameDescription,
967 flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52969 {"enable-download-service-foreground-session",
970 flag_descriptions::kDownloadServiceForegroundSessionName,
971 flag_descriptions::kDownloadServiceForegroundSessionDescription,
972 flags_ui::kOsIos,
973 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23974 {"enable-tflite-language-detection",
975 flag_descriptions::kTFLiteLanguageDetectionName,
976 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
977 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20978 {"optimization-guide-debug-logs",
979 flag_descriptions::kOptimizationGuideDebugLogsName,
980 flag_descriptions::kOptimizationGuideDebugLogsDescription,
981 flags_ui::kOsIos,
982 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55983 {"optimization-guide-push-notifications",
984 flag_descriptions::kOptimizationGuidePushNotificationClientName,
985 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
986 flags_ui::kOsIos,
987 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25988 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
989 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
990 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01991 {"suggestions-scrolling-ipad",
992 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
993 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
994 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00995 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
996 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
997 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25998 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
999 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331000 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
David Jeanad303a92023-07-31 16:58:111001 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
1002 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
1003 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551004 {"experience-kit-apple-calendar",
1005 flag_descriptions::kAppleCalendarExperienceKitName,
1006 flag_descriptions::kAppleCalendarExperienceKitDescription,
1007 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081008 {"enable-expkit-text-classifier",
1009 flag_descriptions::kEnableExpKitTextClassifierName,
1010 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151011 flags_ui::kOsIos,
1012 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1013 kEnableExpKitTextClassifierVariations,
1014 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331015 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1016 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461017 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1018 kOneTapForMapsWithVariations,
1019 "OneTapForMaps")},
David Jean139ba1bf2023-08-31 15:59:321020 {"enable-annotations-language-detection",
1021 flag_descriptions::kUseAnnotationsForLanguageDetectionName,
1022 flag_descriptions::kUseAnnotationsForLanguageDetectionDescription,
1023 flags_ui::kOsIos,
1024 FEATURE_VALUE_TYPE(web::features::kUseAnnotationsForLanguageDetection)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251025 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1026 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1027 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301028 {"autofill-enable-ranking-formula-address-profiles",
1029 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1030 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1031 flags_ui::kOsIos,
1032 FEATURE_VALUE_TYPE(
1033 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391034 {"autofill-enable-ranking-formula-credit-cards",
1035 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1036 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1037 flags_ui::kOsIos,
1038 FEATURE_VALUE_TYPE(
1039 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021040 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1041 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1042 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521043 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1044 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261045 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1046 kMagicStackVariations,
1047 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211048 {"ios-hide-feed-with-search-choice",
1049 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1050 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151051 flags_ui::kOsIos,
1052 FEATURE_WITH_PARAMS_VALUE_TYPE(
1053 kIOSHideFeedWithSearchChoice,
1054 kIOSHideFeedWithSearchChoiceVariations,
1055 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311056 {"ios-keyboard-accessory-upgrade",
1057 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1058 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1059 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261060 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1061 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1062 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291063 {"ios-magic-stack-segmentation-ranking",
1064 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1065 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1066 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301067 FEATURE_WITH_PARAMS_VALUE_TYPE(
1068 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1069 kSegmentationPlatformIosModuleRankerVariations,
1070 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061071 {"default-browser-intents-show-settings",
1072 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1073 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1074 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321075 {"ios-password-bottom-sheet",
1076 flag_descriptions::kIOSPasswordBottomSheetName,
1077 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1078 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281079 {"ios-password-bottom-sheet-autofocus",
1080 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1081 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1082 flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(
1084 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Alexis Hétu459451a2023-06-01 17:05:311085 {"ios-payments-bottom-sheet",
1086 flag_descriptions::kIOSPaymentsBottomSheetName,
1087 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1088 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
Moe Ahmadi098519d82022-07-27 18:34:241089 {"omnibox-zero-suggest-prefetching",
1090 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1091 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1092 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451093 {"omnibox-zero-suggest-prefetching-on-srp",
1094 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1095 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1096 flags_ui::kOsIos,
1097 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1098 {"omnibox-zero-suggest-prefetching-on-web",
1099 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1100 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1101 flags_ui::kOsIos,
1102 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471103 {"omnibox-zero-suggest-in-memory-caching",
1104 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1105 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1106 flags_ui::kOsIos,
1107 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351108 {"omnibox-on-device-tail-suggestions",
1109 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1110 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1111 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosada1e852023-03-10 19:14:411112 {"enable-button-configuration-usage",
1113 flag_descriptions::kEnableUIButtonConfigurationName,
1114 flag_descriptions::kEnableUIButtonConfigurationDescription,
1115 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Christian Xucf26d562022-07-06 09:28:361116 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1117 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1118 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1119 kOmniboxMaxURLMatchesVariations,
1120 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061121 {"metrickit-non-crash-reports",
1122 flag_descriptions::kMetrickitNonCrashReportName,
1123 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1124 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371125 {"autofill-enable-remade-downstream-metrics",
1126 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1127 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1128 flags_ui::kOsIos,
1129 FEATURE_VALUE_TYPE(
1130 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551131 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1132 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1133 flag_descriptions::
1134 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1135 flags_ui::kOsIos,
1136 FEATURE_VALUE_TYPE(
1137 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011138 {"default-browser-video-promo",
1139 flag_descriptions::kDefaultBrowserVideoPromoName,
1140 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1141 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1142 kDefaultBrowserVideoPromoVariations,
1143 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541144 {"default-browser-promo-force-show-promo",
1145 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1146 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1147 flags_ui::kOsIos,
1148 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171149 {"default-browser-promo-trigger-criteria-experiment",
1150 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1151 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1152 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501153 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441154 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211155 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1156 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1157 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501158 {"fullscreen-promo-on-omnibox-copy-paste",
1159 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1160 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1161 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341162#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1163 {"feed-background-refresh-ios",
1164 flag_descriptions::kFeedBackgroundRefreshName,
1165 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1166 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1167 kFeedBackgroundRefreshVariations,
1168 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261169#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291170 {"feed-invisible-foreground-refresh-ios",
1171 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1172 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1173 flags_ui::kOsIos,
1174 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1175 kFeedInvisibleForegroundRefreshVariations,
1176 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191177 {"omnibox-keyboard-paste-button",
1178 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1179 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1180 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Hira Mahmoodb0e5f412022-09-01 19:41:051181 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1182 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1183 FEATURE_VALUE_TYPE(kAppStoreRating)},
Olivier ROBINf05518782022-09-14 23:55:501184 {"enable-tflite-language-detection-ignore",
1185 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1186 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1187 flags_ui::kOsIos,
1188 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571189 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1190 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1191 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411192 {"credential-provider-extension-promo",
1193 flag_descriptions::kCredentialProviderExtensionPromoName,
1194 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221195 flags_ui::kOsIos,
1196 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1197 kCredentialProviderExtensionPromoVariations,
1198 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251199 {"iph-price-notifications-while-browsing",
1200 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1201 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1202 flags_ui::kOsIos,
1203 FEATURE_VALUE_TYPE(
1204 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501205 {"autofill-suggest-server-card-instead-of-local-card",
1206 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1207 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1208 flags_ui::kOsIos,
1209 FEATURE_VALUE_TYPE(
1210 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Robbie Gibson88f680a2023-01-19 16:47:301211 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1212 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1213 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Matt Jonesc01327662023-08-02 16:34:291214 {"shopping-collection",
1215 commerce::flag_descriptions::kShoppingCollectionName,
1216 commerce::flag_descriptions::kShoppingCollectionDescription,
1217 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kShoppingCollection)},
Ewann Pelledec2d042023-01-25 15:28:391218 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1219 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1220 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481221 {"local-pdp-detection",
1222 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1223 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1224 flags_ui::kOsIos,
1225 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121226 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1227 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1228 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1229 kTabInactivityThresholdVariations,
1230 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181231 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1232 flag_descriptions::
1233 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1234 flag_descriptions::
1235 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1236 flags_ui::kOsIos,
1237 FEATURE_VALUE_TYPE(
1238 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361239 {"enable-friendlier-safe-browsing-settings-standard-protection",
1240 flag_descriptions::
1241 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1242 flag_descriptions::
1243 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521244 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361245 FEATURE_VALUE_TYPE(
1246 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291247 {"enable-red-interstitial-facelift",
1248 flag_descriptions::kEnableRedInterstitialFaceliftName,
1249 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1250 flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421252 {"ios-edit-menu-partial-translate",
1253 flag_descriptions::kIOSEditMenuPartialTranslateName,
1254 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421255 flags_ui::kOsIos,
1256 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1257 kIOSEditMenuPartialTranslateVariations,
1258 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431259 {"notification-settings-menu-item",
1260 flag_descriptions::kNotificationSettingsMenuItemName,
1261 flag_descriptions::kNotificationSettingsMenuItemDescription,
1262 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Ed Chin97560fc42023-02-20 16:48:321263 {"feed-experiment-tagging-ios",
1264 flag_descriptions::kFeedExperimentTaggingName,
1265 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1266 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061267 {"spotlight-reading-list-source",
1268 flag_descriptions::kSpotlightReadingListSourceName,
1269 flag_descriptions::kSpotlightReadingListSourceDescription,
1270 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481271 {"enable-policy-test-page-ios",
1272 flag_descriptions::kEnablePolicyTestPageName,
1273 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531275 {"web-feed-feedback-reroute",
1276 flag_descriptions::kWebFeedFeedbackRerouteName,
1277 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1278 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551279 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1280 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1281 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431282 {"enable-follow-IPH-exp-params",
1283 flag_descriptions::kEnableFollowIPHExpParamsName,
1284 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1285 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031286 {"enable-follow-management-instant-reload",
1287 flag_descriptions::kEnableFollowManagementInstantReloadName,
1288 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1289 flags_ui::kOsIos,
1290 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251291 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1292 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1293 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441294 {"mixed-content-autoupgrade-ios",
1295 flag_descriptions::kMixedContentAutoupgradeName,
1296 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1297 FEATURE_VALUE_TYPE(
1298 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421299 {"enable-preferences-account-storage",
1300 flag_descriptions::kEnablePreferencesAccountStorageName,
1301 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1302 flags_ui::kOsIos,
1303 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201304 {"ios-browser-edit-menu-metrics",
1305 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1306 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1307 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Nicolas MacBeth17c9b92c2023-08-24 14:15:401308 {"ios-bulk-upload-local-passwords",
1309 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsName,
1310 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsDescription,
1311 flags_ui::kOsIos,
1312 FEATURE_VALUE_TYPE(password_manager::features::
1313 kIOSPasswordSettingsBulkUploadLocalPasswords)},
Matthew Jonesbf0a53bc2023-12-19 16:08:311314 {"enable-reading-list-sign-in-promo",
1315 flag_descriptions::kEnableReadingListSignInPromoName,
1316 flag_descriptions::kEnableReadingListSignInPromoDescription,
1317 flags_ui::kOsIos,
1318 FEATURE_VALUE_TYPE(syncer::kReadingListEnableSyncTransportModeUponSignIn)},
Stepan Khapuginb2f49522023-04-03 18:25:241319 {"omnibox-grouping-framework-zps",
1320 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1321 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1322 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1323 {"omnibox-grouping-framework-non-zps",
1324 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1325 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1326 flags_ui::kOsIos,
1327 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471328 {"enable-session-serialization-optimizations",
1329 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1330 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1331 flags_ui::kOsIos,
1332 FEATURE_VALUE_TYPE(
1333 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411334 {"bottom-omnibox-steady-state",
1335 flag_descriptions::kBottomOmniboxSteadyStateName,
1336 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1337 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Robbie Gibson0ea280602023-04-12 01:02:391338 {"only-access-clipboard-async",
1339 flag_descriptions::kOnlyAccessClipboardAsyncName,
1340 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1341 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191342 {"omnibox-improved-rtl-suggestions",
1343 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1344 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1345 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Ed Chinecb7d5b2023-04-14 19:22:091346 {"feed-disable-hot-start-refresh-ios",
1347 flag_descriptions::kFeedDisableHotStartRefreshName,
1348 flag_descriptions::kFeedDisableHotStartRefreshDescription,
1349 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFeedDisableHotStartRefresh)},
Olivier ROBIN2613bcd02023-04-20 10:00:471350 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1351 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1352 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1353 kIOSEditMenuSearchWithVariations,
1354 "IOSEditMenuSearchWith")},
1355 {"ios-edit-menu-hide-search-web",
1356 flag_descriptions::kIOSEditMenuHideSearchWebName,
1357 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1358 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171359 {"autofill-enable-card-art-image",
1360 flag_descriptions::kAutofillEnableCardArtImageName,
1361 flag_descriptions::kAutofillEnableCardArtImageDescription,
1362 flags_ui::kOsIos,
1363 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451364 {"enable-signed-out-view-demotion",
1365 flag_descriptions::kEnableSignedOutViewDemotionName,
1366 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1367 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251368 {"autofill-use-two-dots-for-last-four-digits",
1369 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1370 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1371 flags_ui::kOsIos,
1372 FEATURE_VALUE_TYPE(
1373 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241374 {"autofill-disable-profile-updates",
1375 flag_descriptions::kAutofillDisableProfileUpdatesName,
1376 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1377 flags_ui::kOsIos,
1378 FEATURE_VALUE_TYPE(
1379 autofill::features::test::kAutofillDisableProfileUpdates)},
1380 {"autofill-disable-silent-profile-updates",
1381 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1382 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1383 flags_ui::kOsIos,
1384 FEATURE_VALUE_TYPE(
1385 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1386 {"autofill-enable-admin-level-2",
1387 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1388 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1389 flags_ui::kOsIos,
1390 FEATURE_VALUE_TYPE(
1391 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1392 {"autofill-enable-between-streets",
1393 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1394 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1395 flags_ui::kOsIos,
1396 FEATURE_VALUE_TYPE(
1397 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1398 {"autofill-enable-landmark",
1399 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1400 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1401 flags_ui::kOsIos,
1402 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431403 {"post-restore-default-browser-promo",
1404 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1405 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1406 flags_ui::kOsIos,
1407 FEATURE_WITH_PARAMS_VALUE_TYPE(
1408 kPostRestoreDefaultBrowserPromo,
1409 kPostRestoreDefaultBrowserPromoVariations,
1410 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311411 {"spotlight-open-tabs-source",
1412 flag_descriptions::kSpotlightOpenTabsSourceName,
1413 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1414 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451415 {"spotlight-donate-new-intents",
1416 flag_descriptions::kSpotlightDonateNewIntentsName,
1417 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1418 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341419 {"replace-sync-promos-with-sign-in-promos",
1420 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1421 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1422 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301423 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571424 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1425 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371427 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1428 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1429 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1430 kTabPickupThresholdVariations,
1431 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321432 {"ios-iph-for-safari-switcher",
1433 flag_descriptions::kIPHForSafariSwitcherName,
1434 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1435 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071436 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1437 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1438 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Hira Mahmood746047162023-07-11 22:02:061439 {"app-store-rating-loosened-triggers",
1440 flag_descriptions::kAppStoreRatingLoosenedTriggersName,
1441 flag_descriptions::kAppStoreRatingLoosenedTriggersDescription,
1442 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAppStoreRatingLoosenedTriggers)},
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:151443 {"ios-password-auth-on-entry",
1444 flag_descriptions::kIOSPasswordAuthOnEntryName,
1445 flag_descriptions::kIOSPasswordAuthOnEntryDescription, flags_ui::kOsIos,
1446 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntry)},
Ewann Pelle9cd85b22023-07-12 14:42:011447 {"tab-resumption", flag_descriptions::kTabResumptionName,
1448 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001449 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1450 kTabResumptionVariations,
1451 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521452 {"bottom-omnibox-default-setting",
1453 flag_descriptions::kBottomOmniboxDefaultSettingName,
1454 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1455 flags_ui::kOsIos,
1456 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1457 kBottomOmniboxDefaultSettingVariations,
1458 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131459 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1460 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1461 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
Nohemi Fernandez64acf982023-08-04 09:27:151462 {"enable-family-link-controls",
1463 flag_descriptions::kEnableFamilyLinkControlsName,
1464 flag_descriptions::kEnableFamilyLinkControlsDescription, flags_ui::kOsIos,
1465 FEATURE_VALUE_TYPE(
1466 supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)},
adamta7be73b182023-08-08 22:30:351467 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1468 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1469 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501470 {"ios-password-auth-on-entry-v2",
1471 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1472 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1473 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281474 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1475 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1476 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131477 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1478 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1479 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021480 {"parcel-tracking-test-data",
1481 commerce::flag_descriptions::kParcelTrackingTestDataName,
1482 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1483 flags_ui::kOsIos,
1484 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1485 kParcelTrackingTestDataVariations,
1486 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111487 {"autofill-enable-merchant-domain-in-unmask-card-request",
1488 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1489 flag_descriptions::
1490 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1491 flags_ui::kOsIos,
1492 FEATURE_VALUE_TYPE(
1493 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331494 {"autofill-update-chrome-settings-link-to-gpay-web",
1495 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1496 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1497 flags_ui::kOsIos,
1498 FEATURE_VALUE_TYPE(
1499 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281500 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1501 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1502 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591503 {"iph-ios-promo-manager-widget-promo",
1504 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1505 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1506 flags_ui::kOsIos,
1507 FEATURE_VALUE_TYPE(
1508 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571509 {"autofill-enable-virtual-cards",
1510 flag_descriptions::kAutofillEnableVirtualCardsName,
1511 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1512 flags_ui::kOsIos,
1513 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551514 {"ios-incognito-downloads-warning",
1515 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1516 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1517 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571518 {"omnibox-shortcuts-database-ios",
1519 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1520 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211521 flags_ui::kOsIos,
1522 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021523 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1524 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1525 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Vasilii Sukhanov32b14452023-10-12 17:31:271526 {"delete-undecryptable-passwords",
1527 flag_descriptions::kClearUndecryptablePasswordsOnSyncName,
1528 flag_descriptions::kClearUndecryptablePasswordsOnSyncDescription,
1529 flags_ui::kOsIos,
1530 FEATURE_VALUE_TYPE(
1531 password_manager::features::kClearUndecryptablePasswordsOnSync)},
1532 {"ignore-undecryptable-passwords",
1533 flag_descriptions::kSkipUndecryptablePasswordsName,
1534 flag_descriptions::kSkipUndecryptablePasswordsDescription,
1535 flags_ui::kOsIos,
1536 FEATURE_VALUE_TYPE(
1537 password_manager::features::kSkipUndecryptablePasswords)},
Rubin Deliallisi072bc842023-10-19 12:00:411538 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1539 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1540 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Christian Xubb3374c2023-10-24 10:58:221541 {"bottom-omnibox-device-switcher-results",
1542 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsName,
1543 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsDescription,
1544 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxDeviceSwitcherResults)},
Ewann Pelle54e51bd62023-10-24 17:28:121545 {"sync-session-on-visibility-changed",
1546 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1547 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1548 flags_ui::kOsIos,
1549 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451550 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1551 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1552 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531553 {"password-sharing", flag_descriptions::kPasswordSharingName,
1554 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1555 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511556 {"omnibox-company-entity-icon-adjustment",
1557 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1558 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1559 flags_ui::kOsIos,
1560 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1561 kOmniboxCompanyEntityAdjustmentVariations,
1562 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051563 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1564 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1565 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1566 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1567 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1568 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351569 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1570 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1571 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471572 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1573 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1574 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131575 {"autofill-enable-payments-mandatory-reauth",
1576 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1577 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1578 flags_ui::kOsIos,
1579 FEATURE_VALUE_TYPE(
1580 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231581 {"autofill-enable-card-benefits",
1582 flag_descriptions::kAutofillEnableCardBenefitsName,
1583 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1584 flags_ui::kOsIos,
1585 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201586 {"password-manager-signin-uff",
1587 flag_descriptions::kIOSPasswordSignInUffName,
1588 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1589 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011590 {"tab-grid-compositional-layout",
1591 flag_descriptions::kTabGridCompositionalLayoutName,
1592 flag_descriptions::kTabGridCompositionalLayoutDescription,
1593 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Christian Xue72882d2023-11-20 17:10:481594 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1595 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1596 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1597 kBottomOmniboxPromoVariations,
1598 "BottomOmniboxPromoFRE")},
1599 {"bottom-omnibox-promo-app-launch",
1600 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1601 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1602 flags_ui::kOsIos,
1603 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1604 kBottomOmniboxPromoVariations,
1605 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091606 {"bottom-omnibox-promo-default-position",
1607 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1608 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1609 flags_ui::kOsIos,
1610 FEATURE_WITH_PARAMS_VALUE_TYPE(
1611 kBottomOmniboxPromoDefaultPosition,
1612 kBottomOmniboxPromoDefaultPositionVariations,
1613 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251614 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1615 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1616 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171617 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1618 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1619 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301620};
sdefresne14900ee2015-11-27 14:43:211621
Rohit Raobed794c2020-04-27 15:27:451622bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1623 return false;
1624}
1625
1626flags_ui::FlagsState& GetGlobalFlagsState() {
1627 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1628 nullptr);
1629 return *flags_state;
1630}
David Jean5ca263c2021-08-18 09:19:301631// Creates the experimental test policies map, used by AsyncPolicyLoader and
1632// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341633NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211634 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1635
Guillaume Jenkins25e9bd72020-08-27 17:39:061636 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551637 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061638 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551639
Guillaume Jenkins25e9bd72020-08-27 17:39:061640 // Set some sample policy values for testing if EnableSamplePolicies is set to
1641 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401642 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551643 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011644 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1645
Guillaume Jenkinseeb7007c2020-06-25 22:55:401646 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1647
1648 // 2 = Disable all variations
1649 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1650
1651 // 2 = Do not allow any site to show popups
1652 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1653
Tina Wang5abee802020-07-29 23:09:521654 // Set default search engine.
1655 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1656 @YES,
1657 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1658 @"http://www.google.com/search?q={searchTerms}",
1659 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021660 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521661
Tina Wang89068c82020-10-29 15:51:501662 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1663
Gauthier Ambard21b23702021-04-16 16:11:271664 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1665
Tina Wang59d0b7e2020-08-11 04:41:011666 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531667
1668 // 2 = Enhanced safe browsing protection
1669 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1670
1671 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291672
1673 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551674 }];
1675 }
1676
Ewann227a3c02021-04-19 12:04:541677 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041678 NSString* sync_policy_key =
1679 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301680 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541681 }
Ewann227a3c02021-04-19 12:04:541682
Ewann570a6302021-08-17 07:22:421683 // SyncTypesListDisabled policy.
1684 NSString* Sync_types_list_disabled_key =
1685 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1686 NSMutableArray* Sync_types_list_disabled_values =
1687 [[NSMutableArray alloc] init];
1688 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1689 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1690 }
1691 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1692 [Sync_types_list_disabled_values addObject:@"readingList"];
1693 }
1694 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1695 [Sync_types_list_disabled_values addObject:@"preferences"];
1696 }
1697 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1698 [Sync_types_list_disabled_values addObject:@"passwords"];
1699 }
1700 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1701 [Sync_types_list_disabled_values addObject:@"autofill"];
1702 }
1703 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1704 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1705 }
1706 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1707 [Sync_types_list_disabled_values addObject:@"tabs"];
1708 }
1709 if ([Sync_types_list_disabled_values count]) {
1710 [testing_policies addEntriesFromDictionary:@{
1711 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1712 }];
Ewann570a6302021-08-17 07:22:421713 }
1714
Gauthier Ambard073eaa92021-11-22 15:24:131715 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521716 NSString* incognito_policy_key =
1717 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1718 NSInteger incognito_mode_availability =
1719 [defaults integerForKey:incognito_policy_key];
1720 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521721 [testing_policies addEntriesFromDictionary:@{
1722 incognito_policy_key : @(incognito_mode_availability),
1723 }];
1724 }
1725
Ewann40a8f8a2021-07-29 10:01:201726 NSString* restriction_pattern =
1727 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1728 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291729 NSString* restrict_key =
1730 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201731 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291732 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201733 }];
1734 }
1735
Vincent Boisselle19200bc2021-09-01 17:58:251736 // If the sign-in policy is set (not "None"), add the policy key to the list
1737 // of enabled experimental policies, and set the value.
1738 NSString* const kSigninPolicyKey = @"BrowserSignin";
1739 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1740 if (signin_policy_mode) {
1741 // Remove the mode offset that was used to represent the unset policy.
1742 --signin_policy_mode;
1743 DCHECK(signin_policy_mode >= 0);
1744
Vincent Boisselle19200bc2021-09-01 17:58:251745 [testing_policies addEntriesFromDictionary:@{
1746 kSigninPolicyKey : @(signin_policy_mode),
1747 }];
1748 }
1749
Veronique Nguyen9b1044f2022-01-11 14:41:131750 // If the New Tab Page URL is set (not empty) add the value to the list of
1751 // test policies.
1752 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1753 if ([ntp_location length] > 0) {
1754 NSString* ntp_location_key =
1755 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1756 [testing_policies
1757 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571758 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131759 }
1760
Ali Juma9ec36d22022-03-28 14:53:121761 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1762 NSString* allow_backups_key =
1763 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1764 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1765 [allowed_experimental_policies addObject:allow_backups_key];
1766 }
1767
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241768 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1769 NSString* password_manager_key =
1770 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1771 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1772 [allowed_experimental_policies addObject:password_manager_key];
1773 }
Vincent Boisselle003569a72023-09-11 16:03:121774
1775 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1776 NSString* user_policy_merge_key =
1777 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1778 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1779 [allowed_experimental_policies addObject:user_policy_merge_key];
1780 }
1781
Arthur Milchiorbb44f5c82023-03-14 16:14:461782 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1783 NSString* managed_bookmarks_key =
1784 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1785 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571786 @"["
1787 // The following gets filtered out from
1788 // the JSON string when parsed.
1789 " {"
1790 " \"toplevel_name\": \"Managed Bookmarks\""
1791 " },"
1792 " {"
1793 " \"name\": \"Google\","
1794 " \"url\": \"google.com\""
1795 " },"
1796 " {"
1797 " \"name\": \"Empty Folder\","
1798 " \"children\": []"
1799 " },"
1800 " {"
1801 " \"name\": \"Big Folder\","
1802 " \"children\": ["
1803 " {"
1804 " \"name\": \"Youtube\","
1805 " \"url\": \"youtube.com\""
1806 " },"
1807 " {"
1808 " \"name\": \"Chromium\","
1809 " \"url\": \"chromium.org\""
1810 " },"
1811 " {"
1812 " \"name\": \"More Stuff\","
1813 " \"children\": ["
1814 " {"
1815 " \"name\": \"Bugs\","
1816 " \"url\": \"crbug.com\""
1817 " }"
1818 " ]"
1819 " }"
1820 " ]"
1821 " }"
1822 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461823 [testing_policies addEntriesFromDictionary:@{
1824 managed_bookmarks_key : managed_bookmarks_value
1825 }];
1826 [allowed_experimental_policies addObject:managed_bookmarks_key];
1827 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241828
Guillaume Jenkins25e9bd72020-08-27 17:39:061829 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1830 // policy.
1831 if ([allowed_experimental_policies count] > 0) {
1832 [testing_policies setValue:allowed_experimental_policies
1833 forKey:base::SysUTF8ToNSString(
1834 policy::key::kEnableExperimentalPolicies)];
1835 }
1836
jlebel2eb40222022-05-06 11:15:421837 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1838 switch ([defaults integerForKey:metrics_reporting_key]) {
1839 case 1:
1840 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131841 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421842 break;
1843 case 2:
1844 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131845 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421846 break;
1847 default:
1848 // Metrics reporting not managed.
1849 break;
1850 }
1851
David Jean6f85d44f2021-08-19 08:08:451852 // Warning: Add new flags to TestingPoliciesHash() below.
1853
David Jean5ca263c2021-08-18 09:19:301854 return testing_policies;
1855}
David Jean6f85d44f2021-08-19 08:08:451856
David Jean5ca263c2021-08-18 09:19:301857} // namespace
1858
Gauthier Ambard02dbf022022-08-23 08:28:471859// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301860void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1861 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1862
1863 // Set the UA flag if UseMobileSafariUA is enabled.
1864 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1865 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1866 // Chrome puts its product token.
1867 int32_t major = 0;
1868 int32_t minor = 0;
1869 int32_t bugfix = 0;
1870 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1871 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1872
1873 command_line->AppendSwitchASCII(switches::kUserAgent,
1874 web::BuildMobileUserAgent(product));
1875 }
1876
1877 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341878 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301879
1880 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1881 // Management to enabled and add the token to the list of policies.
1882 NSString* token_key =
1883 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1884 NSString* token = [defaults stringForKey:token_key];
1885
1886 if ([token length] > 0) {
1887 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1888 [testing_policies setValue:token forKey:token_key];
1889 }
1890
Guillaume Jenkins57606d72020-08-13 17:32:551891 // If some policies were set, commit them to the app's registration defaults.
1892 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401893 NSDictionary* registration_defaults =
1894 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1895 [defaults registerDefaults:registration_defaults];
1896 }
1897
sdefresne14900ee2015-11-27 14:43:211898 // Freeform commandline flags. These are added last, so that any flags added
1899 // earlier in this function take precedence.
1900 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1901 base::CommandLine::StringVector flags;
1902 // Append an empty "program" argument.
1903 flags.push_back("");
1904
1905 // The number of flags corresponds to the number of text fields in
1906 // Experimental.plist.
1907 const int kNumFreeformFlags = 5;
1908 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1909 NSString* key =
1910 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1911 NSString* flag = [defaults stringForKey:key];
1912 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331913 // iOS keyboard replaces -- with —, so undo that.
1914 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1915 withString:@"--"
1916 options:0
1917 range:NSMakeRange(0, 1)];
1918 // To make things easier, allow flags with no dashes by prepending them
1919 // here. This also allows for flags that just have one dash if they
1920 // exist.
1921 if (![flag hasPrefix:@"-"]) {
1922 flag = [@"--" stringByAppendingString:flag];
1923 }
sdefresne14900ee2015-11-27 14:43:211924 flags.push_back(base::SysNSStringToUTF8(flag));
1925 }
1926 }
1927
1928 base::CommandLine temp_command_line(flags);
1929 command_line->AppendArguments(temp_command_line, false);
1930 }
msardafc76f662017-02-24 12:46:281931
justincohendacc85d2017-06-28 23:34:101932 // Populate command line flag for 3rd party keyboard omnibox workaround.
1933 NSString* enableThirdPartyKeyboardWorkaround =
1934 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1935 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1936 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1937 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1938 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1939 }
1940
Sylvain Defresned3cd8d92022-01-18 13:35:081941 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211942}
1943
sdefresne14900ee2015-11-27 14:43:211944void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1945 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181946 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111947 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531948 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211949}
1950
jkrcalbf073372016-07-29 07:21:311951std::vector<std::string> RegisterAllFeatureVariationParameters(
1952 flags_ui::FlagsStorage* flags_storage,
1953 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181954 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1955 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311956}
1957
sdefresne14900ee2015-11-27 14:43:211958void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1959 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501960 base::Value::List& supported_entries,
1961 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181962 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211963 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511964 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211965}
1966
1967void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1968 const std::string& internal_name,
1969 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181970 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1971 enable);
sdefresne14900ee2015-11-27 14:43:211972}
1973
1974void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181975 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211976}
1977
Nicolas MacBeth972e2592023-02-23 15:22:091978bool IsRestartNeededToCommitChanges() {
1979 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1980}
1981
sdefresne14900ee2015-11-27 14:43:211982namespace testing {
1983
Elly Fong-Jones323ab1092021-08-23 22:36:311984base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1985 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531986 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211987}
1988
1989} // namespace testing