blob: 5ff62471de378829f12b09a41c9c21b26c508965 [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"
Marc Treib1f6c5db992024-01-04 20:25:1428#import "components/browser_sync/browser_sync_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
Salma Elmahallawye8a5df12024-01-15 19:33:4135#import "components/enterprise/idle/idle_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5736#import "components/feature_engagement/public/feature_constants.h"
37#import "components/feature_engagement/public/feature_list.h"
38#import "components/feed/feed_feature_list.h"
39#import "components/flags_ui/feature_entry.h"
40#import "components/flags_ui/feature_entry_macros.h"
41#import "components/flags_ui/flags_storage.h"
42#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2543#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0345#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5746#import "components/ntp_tiles/switches.h"
47#import "components/omnibox/browser/omnibox_field_trial.h"
48#import "components/omnibox/common/omnibox_features.h"
49#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2050#import "components/optimization_guide/core/optimization_guide_switches.h"
Vasilii Sukhanov32b14452023-10-12 17:31:2751#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5752#import "components/password_manager/core/common/password_manager_features.h"
53#import "components/payments/core/features.h"
54#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4055#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/policy/policy_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5757#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3058#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2959#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2560#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5761#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
62#import "components/signin/core/browser/account_reconcilor.h"
63#import "components/signin/ios/browser/features.h"
64#import "components/signin/public/base/signin_switches.h"
65#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1566#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "components/sync/base/command_line_switches.h"
68#import "components/sync/base/features.h"
69#import "components/sync/base/pref_names.h"
70#import "components/translate/core/browser/translate_prefs.h"
71#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3472#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3073#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5374#import "ios/chrome/browser/crash_report/model/features.h"
Aman Verma10315df62023-10-02 11:56:5675#import "ios/chrome/browser/credential_provider_promo/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1176#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1477#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1778#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Vincent Boisselle8b321bb2023-11-28 13:58:3180#import "ios/chrome/browser/follow/model/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5881#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
Chris Lue687fc72023-10-27 02:42:1982#import "ios/chrome/browser/parcel_tracking/features.h"
mmrashadd0c7f952023-12-14 13:36:3883#import "ios/chrome/browser/policy/model/policy_util.h"
Stepan Khapugin5694d702024-01-31 13:23:0884#import "ios/chrome/browser/promos_manager/model/features.h"
mmrashadf158cad942023-10-03 09:15:4885#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Sylvain Defresneb81065002024-01-23 10:51:2286#import "ios/chrome/browser/sessions/features.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4687#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3588#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3689#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
90#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2891#import "ios/chrome/browser/text_selection/model/text_selection_util.h"
Hira Mahmood6b0e5502023-06-12 21:51:4392#import "ios/chrome/browser/ui/default_promo/post_restore/features.h"
Ewann1a9d33d2021-06-14 11:12:2493#import "ios/chrome/browser/ui/download/features.h"
adamta273568472020-12-04 23:53:5794#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0195#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Filipa Senra0bd07982023-12-19 10:56:2596#import "ios/chrome/browser/ui/page_info/features.h"
Robbie Gibson686c56732021-10-04 17:11:4597#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1598#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:4199#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:19100#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58101#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22102#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48111#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
elawrence816f6790e2017-06-16 18:19:28118using flags_ui::FeatureEntry;
119
sdefresne14900ee2015-11-27 14:43:21120namespace {
Emily Starkbafa9062017-12-27 15:22:46121
Nohemi Fernandezc00842a2021-07-26 11:47:34122const FeatureEntry::Choice
123 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
124 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
125 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
126 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
127 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
128};
129
Cheick Cisse8835611a2023-06-02 21:42:54130// Uses int values from DefaultPromoType enum.
131const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
132 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
133 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
134 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
135 "1"},
136 {"Show tailored made for ios promo",
137 "default-browser-promo-force-show-promo", "2"},
138 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
139 "3"},
140 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
141};
142
Stepan Khapugincc4e9842019-01-23 13:38:13143const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
144 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
157
158const FeatureEntry::FeatureVariation
159 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
160 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53161 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13162 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13174
Stepan Khapuginbac467e2022-05-06 21:11:54175const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
176 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
181
182const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
183 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
184 nullptr},
185 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
186 nullptr},
187 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
188 nullptr},
189};
190
Christian Xucf26d562022-07-06 09:28:36191const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
192 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
197
198const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
199 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
200 nullptr},
201 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
202 nullptr},
203 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
204 nullptr},
205};
206
Cheick Cissedc49dbe2023-08-09 13:33:52207const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51208 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
209 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
210const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
211 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
212const FeatureEntry::FeatureParam
213 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
214 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
215
216const FeatureEntry::FeatureVariation
217 kOmniboxCompanyEntityAdjustmentVariations[] = {
218 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
219 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
220 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
221 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
222 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
223 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
224};
225
226const FeatureEntry::FeatureParam
Cheick Cissedc49dbe2023-08-09 13:33:52227 kDefaultBrowserVideoConditionsHalfscreenPromo[] = {
228 {kDefaultBrowserVideoPromoVariant, kVideoConditionsHalfscreenPromo}};
229const FeatureEntry::FeatureParam
230 kDefaultBrowserVideoConditionsFullscreenPromo[] = {
231 {kDefaultBrowserVideoPromoVariant, kVideoConditionsFullscreenPromo}};
232const FeatureEntry::FeatureParam
233 kDefaultBrowserGenericConsitionsFullscreenPromo[] = {
234 {kDefaultBrowserVideoPromoVariant, kGenericConditionsFullscreenPromo}};
235const FeatureEntry::FeatureParam
236 kDefaultBrowserGenericConditionsHalfscreenPromo[] = {
237 {kDefaultBrowserVideoPromoVariant, kGenericConditionsHalfscreenPromo}};
238
Cheick Cisse2806f082b2023-04-25 14:20:01239const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Cheick Cissedc49dbe2023-08-09 13:33:52240 {"Show half screen ui with video condtions",
241 kDefaultBrowserVideoConditionsHalfscreenPromo,
242 std::size(kDefaultBrowserVideoConditionsHalfscreenPromo), nullptr},
243 {"Show full screen ui with video condtions",
244 kDefaultBrowserVideoConditionsFullscreenPromo,
245 std::size(kDefaultBrowserVideoConditionsFullscreenPromo), nullptr},
246 {"Show full screen ui with generic condtions",
247 kDefaultBrowserGenericConsitionsFullscreenPromo,
248 std::size(kDefaultBrowserGenericConsitionsFullscreenPromo), nullptr},
249 {"Show half screen ui with generic condtions",
250 kDefaultBrowserGenericConditionsHalfscreenPromo,
251 std::size(kDefaultBrowserGenericConditionsHalfscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01252};
253
adamta37c6b832023-03-10 20:04:09254// Uses int values from SigninPromoViewStyle enum.
255const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
256 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09257const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59258 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09259const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59260 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47261
Mohammad Refaatab6bee62022-05-16 16:31:15262const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09263 {"Standard", kDiscoverFeedTopSyncPromoStandard,
264 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09265 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
266 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
267 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
268 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15269
Guillem Perez40086ef2023-11-20 20:03:52270const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
271 {kContentPushNotificationsExperimentType, "1"}};
272const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
273 {{kContentPushNotificationsExperimentType, "2"}};
Guillem Perez222b5b22024-01-20 02:16:27274const FeatureEntry::FeatureParam kContentPushNotificationsEnabledProvisional[] =
275 {{kContentPushNotificationsExperimentType, "3"}};
Guillem Perez40086ef2023-11-20 20:03:52276
277const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
278 {"Promo", kContentPushNotificationsEnabledPromo,
279 std::size(kContentPushNotificationsEnabledPromo), nullptr},
280 {"Set up list", kContentPushNotificationsEnabledSetupLists,
Guillem Perez222b5b22024-01-20 02:16:27281 std::size(kContentPushNotificationsEnabledSetupLists), nullptr},
282 {"Provisional Notification", kContentPushNotificationsEnabledProvisional,
283 std::size(kContentPushNotificationsEnabledProvisional), nullptr}};
Guillem Perez40086ef2023-11-20 20:03:52284
adamta4a6f2fd22023-02-13 17:37:14285const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
286 {kDisableStickyHeaderForFollowingFeed, "true"}};
287const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18288 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14289const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
290 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18291 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14292
293const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
294 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
295 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
296 {"Reduced header height", kFeedHeaderSettingReducedHeight,
297 std::size(kFeedHeaderSettingReducedHeight), nullptr},
298 {"All improvements", kFeedHeaderSettingAllImprovements,
299 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
300
Chris Ludca9ce32023-09-20 16:53:50301const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35302 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50303const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35304 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08305
gogerald0e39e3aa2021-02-10 18:41:23306const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50307 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
308 std::size(kStartSurfaceTenSeconds), nullptr},
309 {"1h:Show Home Surface", kStartSurfaceOneHour,
310 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08311};
gogerald0e39e3aa2021-02-10 18:41:23312
Chris Luce928eb2023-05-12 21:36:26313const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
314 {kMagicStackMostVisitedModuleParam, "true"},
315 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22316const FeatureEntry::FeatureParam
317 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
318 {kMagicStackMostVisitedModuleParam, "true"},
319 {kReducedSpaceParam, "-80"},
320 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13321const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26322 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13323 {kReducedSpaceParam, "20"}};
324const FeatureEntry::FeatureParam
325 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
326 {kMagicStackMostVisitedModuleParam, "false"},
327 {kReducedSpaceParam, "20"},
328 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26329
330const FeatureEntry::FeatureVariation kMagicStackVariations[]{
331 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
332 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22333 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
334 kMagicStackMostVisitedModuleHideIrrelevantModules,
335 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13336 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
337 std::size(kMagicStackReducedNTPTopSpace), nullptr},
338 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
339 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
340 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26341};
342
Chris Lu6fd4eaf2023-08-08 18:29:30343const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
344 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
345
346const FeatureEntry::FeatureVariation
347 kSegmentationPlatformIosModuleRankerVariations[]{
348 {"Enabled With Default Model Parameter (Must Set this!)",
349 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
350 };
351
Scott Yoderaf2bdf32024-01-30 20:26:15352const FeatureEntry::FeatureParam kIOSTipsNotifications5SecondTrigger[] = {
353 {kIOSTipsNotificationsTriggerTimeParam, "5s"},
354};
355const FeatureEntry::FeatureParam kIOSTipsNotifications10SecondTrigger[] = {
356 {kIOSTipsNotificationsTriggerTimeParam, "10s"},
357};
358const FeatureEntry::FeatureVariation kIOSTipsNotificationsVariations[] = {
359 {"(5s trigger)", kIOSTipsNotifications5SecondTrigger,
360 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
361 {"(10s trigger)", kIOSTipsNotifications10SecondTrigger,
362 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
363};
364
Ed Chin91e44992022-07-27 13:42:34365#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26366// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01367const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04368 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
369 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01370 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04371 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01372const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04373 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
374 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01375 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04376 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01377const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04378 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
379 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01380 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04381 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01382const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04383 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
384 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01385 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04386 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01387const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04388 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
389 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01390 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
391 {kBackgroundRefreshIntervalInSeconds, "0"}};
392const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04393 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
394 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01395 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
396 {kBackgroundRefreshIntervalInSeconds, "0"}};
397const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
398 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
399 {kEnableRecurringBackgroundRefreshSchedule, "false"},
400 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
401 {kBackgroundRefreshIntervalInSeconds, "0"}};
402const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
403 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
404 {kEnableRecurringBackgroundRefreshSchedule, "true"},
405 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
406 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04407
Ed Chin178ec2a2023-02-10 22:21:26408// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04409const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01410 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
411 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
412 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
413 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
414 {"1hr Interval 1hr Max Age Recurring",
415 kOneHourIntervalOneHourMaxAgeRecurring,
416 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
417 {"4hr Interval 6hr Max Age Recurring",
418 kFourHourIntervalSixHourMaxAgeRecurring,
419 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
420 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
421 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
422 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
423 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
424 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
425 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
426 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
427 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04428};
Ed Chin91e44992022-07-27 13:42:34429#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04430
Raj T18a2c8c2023-03-15 17:20:15431const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
432 {"date", "true"}};
433const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
434 {"address", "true"}};
435const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
436 {"phonenumber", "true"}};
437const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
438 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50439const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
440 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15441const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
442 {"date", "true"},
443 {"address", "true"},
444 {"phonenumber", "true"},
445 {"email", "true"}};
446const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
447 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
448 std::size(kEnableExpKitTextClassifierAll), nullptr},
449 {"Enabled for date", kEnableExpKitTextClassifierDate,
450 std::size(kEnableExpKitTextClassifierDate), nullptr},
451 {"Enabled for address", kEnableExpKitTextClassifierAddress,
452 std::size(kEnableExpKitTextClassifierAddress), nullptr},
453 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
454 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
455 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50456 std::size(kEnableExpKitTextClassifierEmail), nullptr},
457 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
458 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15459
Louis Romero93e9b50a2023-01-26 01:46:12460const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
461 {kTabInactivityThresholdParameterName,
462 kTabInactivityThresholdOneWeekParam}};
463const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
464 {kTabInactivityThresholdParameterName,
465 kTabInactivityThresholdTwoWeeksParam}};
466const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
467 {kTabInactivityThresholdParameterName,
468 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58469const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
470 {kTabInactivityThresholdParameterName,
471 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12472
473const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
474 {"One week", kTabInactivityThresholdOneWeek,
475 std::size(kTabInactivityThresholdOneWeek), nullptr},
476 {"Two weeks", kTabInactivityThresholdTwoWeeks,
477 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
478 {"Three weeks", kTabInactivityThresholdThreeWeeks,
479 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58480 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
481 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12482};
483
Ewann Pelle6eecb8f2023-06-23 14:31:37484const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
485 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
486const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
487 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
488const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
489 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55490const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
491 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37492
493const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
494 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00495 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37496 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00497 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37498 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00499 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55500 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
501 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00502};
503
504const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
505 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
506const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
507 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48508const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
509 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00510
511const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
512 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
513 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48514 {"Most recent tab and last synced tab (12 hours threshold)",
515 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
516 {"Most recent tab and last synced tab (24 hours threshold)",
517 kTabResumptionAllTabsOneDayThreshold,
518 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37519};
520
Huiting Yud7d2a5322023-02-09 21:14:22521const FeatureEntry::FeatureParam
522 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
523 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
524const FeatureEntry::FeatureParam
525 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
526 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
527const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20528 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20529 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
530 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22531
532const FeatureEntry::FeatureVariation
533 kCredentialProviderExtensionPromoVariations[] = {
534 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
535 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
536 {"On password copied",
537 kCredentialProviderExtensionPromoOnPasswordCopied,
538 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20539 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30540 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22541
Olivier ROBINfd3887b72023-02-23 14:45:42542const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
543 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44544const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
545 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42546const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
547 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44548 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
549 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
550 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42551
Olivier ROBIN2613bcd02023-04-20 10:00:47552const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
553 {kIOSEditMenuSearchWithTitleParamTitle,
554 kIOSEditMenuSearchWithTitleSearchWithParam}};
555const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
556 {kIOSEditMenuSearchWithTitleParamTitle,
557 kIOSEditMenuSearchWithTitleSearchParam}};
558const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
559 {kIOSEditMenuSearchWithTitleParamTitle,
560 kIOSEditMenuSearchWithTitleWebSearchParam}};
561const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
562 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
563 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
564 {"Search", kIOSEditMenuSearchWithTitleSearch,
565 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
566 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
567 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
568};
569
Hira Mahmood6b0e5502023-06-12 21:51:43570const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
571 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
572const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
573 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
574const FeatureEntry::FeatureVariation
575 kPostRestoreDefaultBrowserPromoVariations[] = {
576 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
577 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
578 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
579 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
580};
581
Christian Xu07d600192023-07-24 12:29:52582const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
583 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
584const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
585 {kBottomOmniboxDefaultSettingParam,
586 kBottomOmniboxDefaultSettingParamBottom}};
587const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
588 {{kBottomOmniboxDefaultSettingParam,
589 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
590const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
591 {
592 {"Top", kBottomOmniboxDefaultSettingTop,
593 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
594 {"Bottom", kBottomOmniboxDefaultSettingBottom,
595 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
596 {"Bottom for Safari Switcher",
597 kBottomOmniboxDefaultSettingSafariSwitcher,
598 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
599};
600
Christian Xue72882d2023-11-20 17:10:48601const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
602 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
603const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
604 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
605 nullptr},
606};
607
Christian Xua3667352023-11-21 16:54:09608const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
609 {kBottomOmniboxPromoDefaultPositionParam,
610 kBottomOmniboxPromoDefaultPositionParamTop}};
611const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
612 {kBottomOmniboxPromoDefaultPositionParam,
613 kBottomOmniboxPromoDefaultPositionParamBottom}};
614const FeatureEntry::FeatureVariation
615 kBottomOmniboxPromoDefaultPositionVariations[] = {
616 {"Top", kBottomOmniboxPromoDefaultPositionTop,
617 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
618 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
619 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
620};
621
Marc Treib9bddebb2023-06-15 14:03:34622const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
623 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25624 {"Disabled", "disable-features",
625 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24626 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02627 "FeedBottomSyncStringRemoval,"
628 "SyncEnableContactInfoDataTypeInTransportMode,"
629 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
630 "SyncEnableBatchUploadLocalData,"
631 "SyncEnableWalletMetadataInTransportMode,"
632 "SyncEnableWalletOfferInTransportMode,"
633 "IOSPasswordSettingsBulkUploadLocalPasswords"},
634 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34635 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24636 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25637 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34638 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37639 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55640 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06641 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06642 "SyncEnableWalletOfferInTransportMode,"
643 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02644 {"Enabled with fast-follows", "enable-features",
645 "ReplaceSyncPromosWithSignInPromos,"
646 "ConsistencyNewAccountInterface,"
647 "FeedBottomSyncStringRemoval,"
648 "SyncEnableContactInfoDataTypeInTransportMode,"
649 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
650 "SyncEnableBatchUploadLocalData,"
651 "SyncEnableWalletMetadataInTransportMode,"
652 "SyncEnableWalletOfferInTransportMode,"
653 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33654 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07655 "EnableBatchUploadFromBookmarksManager,"
Jood Hajeerf1f3e8d2023-12-20 13:35:55656 "EnableReviewAccountSettingsPromo,"
657 "LinkAccountSettingsToPrivacyFooter,"
658 "IPH_iOSReplaceSyncPromosWithSignInPromos"},
Marc Treib9bddebb2023-06-15 14:03:34659};
660
Olivier ROBIN82b67002023-07-31 14:34:46661const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
662 {web::features::kOneTapForMapsConsentModeParamTitle,
663 web::features::kOneTapForMapsConsentModeDefaultParam}};
664const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
665 {web::features::kOneTapForMapsConsentModeParamTitle,
666 web::features::kOneTapForMapsConsentModeForcedParam}};
667const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
668 {web::features::kOneTapForMapsConsentModeParamTitle,
669 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31670const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
671 {web::features::kOneTapForMapsConsentModeParamTitle,
672 web::features::kOneTapForMapsConsentModeIPHParam}};
673const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
674 {web::features::kOneTapForMapsConsentModeParamTitle,
675 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46676const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
677 {"Consent Default", kOneTapForMapsConsentModeDefault,
678 std::size(kOneTapForMapsConsentModeDefault), nullptr},
679 {"Consent Forced", kOneTapForMapsConsentModeForced,
680 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31681 {"Consent IPH", kOneTapForMapsConsentModeIPH,
682 std::size(kOneTapForMapsConsentModeIPH), nullptr},
683 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
684 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46685 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
686 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
687};
688
Stepan Khapuginec68d5bb2023-10-16 13:35:25689constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
690 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19691 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25692constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
693 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19694 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25695constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
696 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19697 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25698constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
699 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19700 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25701
702constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
703 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
704 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
705 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
706 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
707 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
708 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
709 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
710 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
711};
712
Rafał Godlewskie75d12402023-10-25 15:31:53713const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
714 {"Default", "", ""},
715 {"Bootstraping Only", switches::kEnableFeatures,
716 "SharingOfferKeyPairBootstrap"},
717 {"Enabled", switches::kEnableFeatures,
718 "SharingOfferKeyPairBootstrap,SendPasswords,"
719 "PasswordManagerEnableSenderService,"
720 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
721};
722
Scott Yoderd781bd12023-10-25 20:47:15723const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
724 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
725const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
726 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
727 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
728};
729
Matt Jones79534392023-10-27 14:35:02730const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
731 {{commerce::kParcelTrackingTestDataParam,
732 commerce::kParcelTrackingTestDataParamDelivered}};
733const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
734 {{commerce::kParcelTrackingTestDataParam,
735 commerce::kParcelTrackingTestDataParamInProgress}};
736const flags_ui::FeatureEntry::FeatureParam
737 kParcelTrackingTestDataOutForDelivery[] = {
738 {commerce::kParcelTrackingTestDataParam,
739 commerce::kParcelTrackingTestDataParamOutForDelivery}};
740const flags_ui::FeatureEntry::FeatureVariation
741 kParcelTrackingTestDataVariations[] = {
742 {"Delivered", kParcelTrackingTestDataDelivered,
743 std::size(kParcelTrackingTestDataDelivered), nullptr},
744 {"In progress", kParcelTrackingTestDataInProgress,
745 std::size(kParcelTrackingTestDataInProgress), nullptr},
746 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
747 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
748};
749
Benjamin Williams1dc8f2342024-01-04 21:25:55750const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
751 {kIOSDockingPromoExperimentType, "0"}};
752const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
753 {kIOSDockingPromoExperimentType, "1"}};
754const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
755 {kIOSDockingPromoExperimentType, "2"}};
756
757const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
758 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
759 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
760 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
761 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
762 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
763 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
764
Cooper Knaak1e026562017-07-26 05:22:28765// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21766// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28767// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
768// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21769// macro for this type supplying the command line to the macro.
770// . MULTI_VALUE: a list of choices, the first of which should correspond to a
771// deactivated state for this lab (i.e. no command line option). To specify
772// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
773// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28774// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
775// either enabled, disabled, or uses the default value of the associated
776// base::Feature instance. To specify this type of entry use the macro
777// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
778// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
779// base::Feature instance. Choices corresponding to the default state, a
780// universally enabled state, and a universally disabled state are
781// automatically included. To specify this type of entry use the macro
782// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
783// the array of choices.
784//
sdefresne14900ee2015-11-27 14:43:21785// See the documentation of FeatureEntry for details on the fields.
786//
787// When adding a new choice, add it to the end of the list.
788const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28789 {"in-product-help-demo-mode-choice",
790 flag_descriptions::kInProductHelpDemoModeName,
791 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
792 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23793 feature_engagement::kIPHDemoMode,
794 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09795 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22796 {"enable-autofill-credit-card-upload",
797 flag_descriptions::kAutofillCreditCardUploadName,
798 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24799 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23800 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
801 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
802 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51803 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23804 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
805 {"wallet-service-use-sandbox",
806 flag_descriptions::kWalletServiceUseSandboxName,
807 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
808 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
809 autofill::switches::kWalletServiceUseSandbox,
810 "1",
811 autofill::switches::kWalletServiceUseSandbox,
812 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59813 {"show-autofill-type-predictions",
814 flag_descriptions::kShowAutofillTypePredictionsName,
815 flag_descriptions::kShowAutofillTypePredictionsDescription,
816 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50817 FEATURE_VALUE_TYPE(
818 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05819 {"fullscreen-promos-manager-skip-internal-limits",
820 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
821 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
822 flags_ui::kOsIos,
823 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14824 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53825 flag_descriptions::kFullscreenSmoothScrollingName,
826 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19827 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06828 {"webpage-default-zoom-from-dynamic-type",
829 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
830 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
831 flags_ui::kOsIos,
832 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56833 {"webpage-alternative-text-zoom",
834 flag_descriptions::kWebPageAlternativeTextZoomName,
835 flag_descriptions::kWebPageAlternativeTextZoomDescription,
836 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34837 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
838 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
839 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13840 {"omnibox-ui-max-autocomplete-matches",
841 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
842 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
843 flags_ui::kOsIos,
844 FEATURE_WITH_PARAMS_VALUE_TYPE(
845 omnibox::kUIExperimentMaxAutocompleteMatches,
846 kOmniboxUIMaxAutocompleteMatchesVariations,
847 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35848 {"omnibox-local-history-zero-suggest-beyond-ntp",
849 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
850 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
851 flags_ui::kOsIos,
852 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54853 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
854 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
855 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
856 kOmniboxMaxZPSMatchesVariations,
857 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25858 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
859 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
860 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
861 kOmniboxInspireMeVariants,
862 "OmniboxBundledExperimentV1")},
863 {"omnibox-inspire-me-signed-out",
864 flag_descriptions::kOmniboxInspireMeSignedOutName,
865 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
866 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48867 {"force-startup-signin-promo",
868 flag_descriptions::kForceStartupSigninPromoName,
869 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29870 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41871 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
872 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
873 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13874#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45875 {"screen-time-integration-ios",
876 flag_descriptions::kScreenTimeIntegrationName,
877 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13879#endif
Nazerke3e993f72020-09-21 13:00:06880 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
881 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
882 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11883 {"ios-shared-highlighting-color-change",
884 flag_descriptions::kIOSSharedHighlightingColorChangeName,
885 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07886 flags_ui::kOsIos,
887 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34888 {"ios-shared-highlighting-v2",
889 flag_descriptions::kIOSSharedHighlightingV2Name,
890 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
891 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51892 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
893 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
Scott Yoderaf2bdf32024-01-30 20:26:15894 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSTipsNotifications,
895 kIOSTipsNotificationsVariations,
896 "IOSTipsNotifications")},
Stepan Khapugin04341202021-01-07 12:22:45897 {"omnibox-new-textfield-implementation",
898 flag_descriptions::kOmniboxNewImplementationName,
899 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19901 {"start-surface", flag_descriptions::kStartSurfaceName,
902 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23903 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
904 kStartSurfaceVariations,
905 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19906 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
907 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34909 {"wait-threshold-seconds-for-capabilities-api",
910 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
911 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
912 flags_ui::kOsIos,
913 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28914 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
915 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
916 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24917 {"content-push-notifications",
918 flag_descriptions::kContentPushNotificationsName,
919 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52920 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
921 kContentPushNotificationsVariations,
922 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57923 {"overflow-menu-customization",
924 flag_descriptions::kOverflowMenuCustomizationName,
925 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
926 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44927 {"enable-lens-in-omnibox-copied-image",
928 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
929 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
930 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40931 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23932 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
933 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40934 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23935 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03936 {"enable-disco-feed-endpoint",
937 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
938 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
939 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11940 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15941 {"enable-discover-feed-top-sync-promo",
942 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
943 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
944 flags_ui::kOsIos,
945 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
946 kDiscoverFeedTopSyncPromoVariations,
947 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14948 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
949 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
950 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
951 kFeedHeaderSettingsVariations,
952 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28953 {"shared-highlighting-amp",
954 flag_descriptions::kIOSSharedHighlightingAmpName,
955 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
956 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28957 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42958 commerce::flag_descriptions::kCommercePriceTrackingName,
959 commerce::flag_descriptions::kCommercePriceTrackingDescription,
960 flags_ui::kOsIos,
961 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
962 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15963 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06964 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
965 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
966 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54967 {"ntp-view-hierarchy-repair",
968 flag_descriptions::kNTPViewHierarchyRepairName,
969 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20970 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26971 {"autofill-enable-card-product-name",
972 flag_descriptions::kAutofillEnableCardProductNameName,
973 flag_descriptions::kAutofillEnableCardProductNameDescription,
974 flags_ui::kOsIos,
975 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52976 {"enable-download-service-foreground-session",
977 flag_descriptions::kDownloadServiceForegroundSessionName,
978 flag_descriptions::kDownloadServiceForegroundSessionDescription,
979 flags_ui::kOsIos,
980 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23981 {"enable-tflite-language-detection",
982 flag_descriptions::kTFLiteLanguageDetectionName,
983 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
984 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20985 {"optimization-guide-debug-logs",
986 flag_descriptions::kOptimizationGuideDebugLogsName,
987 flag_descriptions::kOptimizationGuideDebugLogsDescription,
988 flags_ui::kOsIos,
989 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55990 {"optimization-guide-push-notifications",
991 flag_descriptions::kOptimizationGuidePushNotificationClientName,
992 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
993 flags_ui::kOsIos,
994 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25995 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
996 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
997 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01998 {"suggestions-scrolling-ipad",
999 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1000 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1001 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001002 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1003 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1004 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jeanad303a92023-07-31 16:58:111005 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
1006 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
1007 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:221008 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
1009 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
1010 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
Raj T7db7a0e2022-11-17 16:33:081011 {"enable-expkit-text-classifier",
1012 flag_descriptions::kEnableExpKitTextClassifierName,
1013 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151014 flags_ui::kOsIos,
1015 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1016 kEnableExpKitTextClassifierVariations,
1017 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331018 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1019 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461020 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1021 kOneTapForMapsWithVariations,
1022 "OneTapForMaps")},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251023 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1024 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1025 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301026 {"autofill-enable-ranking-formula-address-profiles",
1027 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1028 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1029 flags_ui::kOsIos,
1030 FEATURE_VALUE_TYPE(
1031 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391032 {"autofill-enable-ranking-formula-credit-cards",
1033 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1034 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1035 flags_ui::kOsIos,
1036 FEATURE_VALUE_TYPE(
1037 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021038 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1039 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1040 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521041 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1042 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261043 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1044 kMagicStackVariations,
1045 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211046 {"ios-hide-feed-with-search-choice",
1047 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1048 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151049 flags_ui::kOsIos,
1050 FEATURE_WITH_PARAMS_VALUE_TYPE(
1051 kIOSHideFeedWithSearchChoice,
1052 kIOSHideFeedWithSearchChoiceVariations,
1053 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311054 {"ios-keyboard-accessory-upgrade",
1055 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1056 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1057 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261058 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1059 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1060 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291061 {"ios-magic-stack-segmentation-ranking",
1062 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1063 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1064 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301065 FEATURE_WITH_PARAMS_VALUE_TYPE(
1066 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1067 kSegmentationPlatformIosModuleRankerVariations,
1068 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061069 {"default-browser-intents-show-settings",
1070 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1071 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1072 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321073 {"ios-password-bottom-sheet",
1074 flag_descriptions::kIOSPasswordBottomSheetName,
1075 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1076 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281077 {"ios-password-bottom-sheet-autofocus",
1078 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1079 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1080 flags_ui::kOsIos,
1081 FEATURE_VALUE_TYPE(
1082 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Alexis Hétu459451a2023-06-01 17:05:311083 {"ios-payments-bottom-sheet",
1084 flag_descriptions::kIOSPaymentsBottomSheetName,
1085 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1086 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
Moe Ahmadi098519d82022-07-27 18:34:241087 {"omnibox-zero-suggest-prefetching",
1088 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1089 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1090 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451091 {"omnibox-zero-suggest-prefetching-on-srp",
1092 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1093 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1094 flags_ui::kOsIos,
1095 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1096 {"omnibox-zero-suggest-prefetching-on-web",
1097 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1098 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1099 flags_ui::kOsIos,
1100 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471101 {"omnibox-zero-suggest-in-memory-caching",
1102 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1103 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1104 flags_ui::kOsIos,
1105 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351106 {"omnibox-on-device-tail-suggestions",
1107 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1108 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1109 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361110 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1111 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1112 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1113 kOmniboxMaxURLMatchesVariations,
1114 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061115 {"metrickit-non-crash-reports",
1116 flag_descriptions::kMetrickitNonCrashReportName,
1117 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1118 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371119 {"autofill-enable-remade-downstream-metrics",
1120 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1121 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1122 flags_ui::kOsIos,
1123 FEATURE_VALUE_TYPE(
1124 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551125 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1126 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1127 flag_descriptions::
1128 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1129 flags_ui::kOsIos,
1130 FEATURE_VALUE_TYPE(
1131 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011132 {"default-browser-video-promo",
1133 flag_descriptions::kDefaultBrowserVideoPromoName,
1134 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1135 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1136 kDefaultBrowserVideoPromoVariations,
1137 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541138 {"default-browser-promo-force-show-promo",
1139 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1140 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1141 flags_ui::kOsIos,
1142 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171143 {"default-browser-promo-trigger-criteria-experiment",
1144 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1145 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1146 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501147 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441148 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211149 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1150 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1151 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501152 {"fullscreen-promo-on-omnibox-copy-paste",
1153 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1154 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1155 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341156#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1157 {"feed-background-refresh-ios",
1158 flag_descriptions::kFeedBackgroundRefreshName,
1159 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1160 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1161 kFeedBackgroundRefreshVariations,
1162 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261163#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191164 {"omnibox-keyboard-paste-button",
1165 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1166 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1167 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501168 {"enable-tflite-language-detection-ignore",
1169 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1170 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1171 flags_ui::kOsIos,
1172 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571173 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1174 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1175 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411176 {"credential-provider-extension-promo",
1177 flag_descriptions::kCredentialProviderExtensionPromoName,
1178 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221179 flags_ui::kOsIos,
1180 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1181 kCredentialProviderExtensionPromoVariations,
1182 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251183 {"iph-price-notifications-while-browsing",
1184 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1185 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1186 flags_ui::kOsIos,
1187 FEATURE_VALUE_TYPE(
1188 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501189 {"autofill-suggest-server-card-instead-of-local-card",
1190 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1191 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1192 flags_ui::kOsIos,
1193 FEATURE_VALUE_TYPE(
1194 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Ewann Pelledec2d042023-01-25 15:28:391195 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1196 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1197 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481198 {"local-pdp-detection",
1199 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1200 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1201 flags_ui::kOsIos,
1202 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121203 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1204 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1205 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1206 kTabInactivityThresholdVariations,
1207 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181208 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1209 flag_descriptions::
1210 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1211 flag_descriptions::
1212 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1213 flags_ui::kOsIos,
1214 FEATURE_VALUE_TYPE(
1215 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361216 {"enable-friendlier-safe-browsing-settings-standard-protection",
1217 flag_descriptions::
1218 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1219 flag_descriptions::
1220 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521221 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361222 FEATURE_VALUE_TYPE(
1223 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291224 {"enable-red-interstitial-facelift",
1225 flag_descriptions::kEnableRedInterstitialFaceliftName,
1226 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1227 flags_ui::kOsIos,
1228 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421229 {"ios-edit-menu-partial-translate",
1230 flag_descriptions::kIOSEditMenuPartialTranslateName,
1231 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421232 flags_ui::kOsIos,
1233 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1234 kIOSEditMenuPartialTranslateVariations,
1235 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431236 {"notification-settings-menu-item",
1237 flag_descriptions::kNotificationSettingsMenuItemName,
1238 flag_descriptions::kNotificationSettingsMenuItemDescription,
1239 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061240 {"spotlight-reading-list-source",
1241 flag_descriptions::kSpotlightReadingListSourceName,
1242 flag_descriptions::kSpotlightReadingListSourceDescription,
1243 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481244 {"enable-policy-test-page-ios",
1245 flag_descriptions::kEnablePolicyTestPageName,
1246 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531248 {"web-feed-feedback-reroute",
1249 flag_descriptions::kWebFeedFeedbackRerouteName,
1250 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551252 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1253 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1254 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431255 {"enable-follow-IPH-exp-params",
1256 flag_descriptions::kEnableFollowIPHExpParamsName,
1257 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1258 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031259 {"enable-follow-management-instant-reload",
1260 flag_descriptions::kEnableFollowManagementInstantReloadName,
1261 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1262 flags_ui::kOsIos,
1263 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251264 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1265 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1266 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441267 {"mixed-content-autoupgrade-ios",
1268 flag_descriptions::kMixedContentAutoupgradeName,
1269 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1270 FEATURE_VALUE_TYPE(
1271 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421272 {"enable-preferences-account-storage",
1273 flag_descriptions::kEnablePreferencesAccountStorageName,
1274 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1275 flags_ui::kOsIos,
1276 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201277 {"ios-browser-edit-menu-metrics",
1278 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1279 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1280 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551281 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1282 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1283 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1284 kIOSDockingPromoVariations,
1285 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241286 {"omnibox-grouping-framework-zps",
1287 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1288 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1289 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1290 {"omnibox-grouping-framework-non-zps",
1291 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1292 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1293 flags_ui::kOsIos,
1294 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471295 {"enable-session-serialization-optimizations",
1296 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1297 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1298 flags_ui::kOsIos,
1299 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221300 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391301 {"only-access-clipboard-async",
1302 flag_descriptions::kOnlyAccessClipboardAsyncName,
1303 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191305 {"omnibox-improved-rtl-suggestions",
1306 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1307 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1308 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471309 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1310 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1311 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1312 kIOSEditMenuSearchWithVariations,
1313 "IOSEditMenuSearchWith")},
1314 {"ios-edit-menu-hide-search-web",
1315 flag_descriptions::kIOSEditMenuHideSearchWebName,
1316 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1317 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171318 {"autofill-enable-card-art-image",
1319 flag_descriptions::kAutofillEnableCardArtImageName,
1320 flag_descriptions::kAutofillEnableCardArtImageDescription,
1321 flags_ui::kOsIos,
1322 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451323 {"enable-signed-out-view-demotion",
1324 flag_descriptions::kEnableSignedOutViewDemotionName,
1325 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1326 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401327 {"enable-startup-latency-improvements",
1328 flag_descriptions::kEnableStartupImprovementsName,
1329 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1330 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251331 {"autofill-use-two-dots-for-last-four-digits",
1332 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1333 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1334 flags_ui::kOsIos,
1335 FEATURE_VALUE_TYPE(
1336 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241337 {"autofill-disable-profile-updates",
1338 flag_descriptions::kAutofillDisableProfileUpdatesName,
1339 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1340 flags_ui::kOsIos,
1341 FEATURE_VALUE_TYPE(
1342 autofill::features::test::kAutofillDisableProfileUpdates)},
1343 {"autofill-disable-silent-profile-updates",
1344 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1345 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1346 flags_ui::kOsIos,
1347 FEATURE_VALUE_TYPE(
1348 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1349 {"autofill-enable-admin-level-2",
1350 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1351 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1352 flags_ui::kOsIos,
1353 FEATURE_VALUE_TYPE(
1354 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1355 {"autofill-enable-between-streets",
1356 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1357 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1358 flags_ui::kOsIos,
1359 FEATURE_VALUE_TYPE(
1360 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1361 {"autofill-enable-landmark",
1362 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1363 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1364 flags_ui::kOsIos,
1365 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431366 {"post-restore-default-browser-promo",
1367 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1368 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1369 flags_ui::kOsIos,
1370 FEATURE_WITH_PARAMS_VALUE_TYPE(
1371 kPostRestoreDefaultBrowserPromo,
1372 kPostRestoreDefaultBrowserPromoVariations,
1373 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311374 {"spotlight-open-tabs-source",
1375 flag_descriptions::kSpotlightOpenTabsSourceName,
1376 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1377 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451378 {"spotlight-donate-new-intents",
1379 flag_descriptions::kSpotlightDonateNewIntentsName,
1380 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1381 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341382 {"replace-sync-promos-with-sign-in-promos",
1383 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1384 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1385 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301386 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571387 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1388 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1389 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371390 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1391 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1392 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1393 kTabPickupThresholdVariations,
1394 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321395 {"ios-iph-for-safari-switcher",
1396 flag_descriptions::kIPHForSafariSwitcherName,
1397 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1398 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071399 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1400 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1401 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011402 {"tab-resumption", flag_descriptions::kTabResumptionName,
1403 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001404 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1405 kTabResumptionVariations,
1406 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521407 {"bottom-omnibox-default-setting",
1408 flag_descriptions::kBottomOmniboxDefaultSettingName,
1409 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1410 flags_ui::kOsIos,
1411 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1412 kBottomOmniboxDefaultSettingVariations,
1413 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131414 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1415 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1416 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
adamta7be73b182023-08-08 22:30:351417 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1418 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1419 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501420 {"ios-password-auth-on-entry-v2",
1421 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1422 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1423 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281424 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1425 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131427 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1428 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1429 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021430 {"parcel-tracking-test-data",
1431 commerce::flag_descriptions::kParcelTrackingTestDataName,
1432 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1433 flags_ui::kOsIos,
1434 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1435 kParcelTrackingTestDataVariations,
1436 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111437 {"autofill-enable-merchant-domain-in-unmask-card-request",
1438 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1439 flag_descriptions::
1440 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1441 flags_ui::kOsIos,
1442 FEATURE_VALUE_TYPE(
1443 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331444 {"autofill-update-chrome-settings-link-to-gpay-web",
1445 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1446 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1447 flags_ui::kOsIos,
1448 FEATURE_VALUE_TYPE(
1449 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281450 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1451 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1452 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591453 {"iph-ios-promo-manager-widget-promo",
1454 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1455 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1456 flags_ui::kOsIos,
1457 FEATURE_VALUE_TYPE(
1458 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571459 {"autofill-enable-virtual-cards",
1460 flag_descriptions::kAutofillEnableVirtualCardsName,
1461 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1462 flags_ui::kOsIos,
1463 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551464 {"ios-incognito-downloads-warning",
1465 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1466 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1467 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571468 {"omnibox-shortcuts-database-ios",
1469 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1470 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211471 flags_ui::kOsIos,
1472 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021473 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1474 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1475 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Rubin Deliallisi072bc842023-10-19 12:00:411476 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1477 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1478 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121479 {"sync-session-on-visibility-changed",
1480 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1481 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1482 flags_ui::kOsIos,
1483 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451484 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1485 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1486 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531487 {"password-sharing", flag_descriptions::kPasswordSharingName,
1488 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1489 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511490 {"omnibox-company-entity-icon-adjustment",
1491 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1492 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1493 flags_ui::kOsIos,
1494 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1495 kOmniboxCompanyEntityAdjustmentVariations,
1496 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051497 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1498 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1499 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1500 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1501 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1502 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351503 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1504 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1505 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471506 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1507 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1508 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131509 {"autofill-enable-payments-mandatory-reauth",
1510 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1511 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1512 flags_ui::kOsIos,
1513 FEATURE_VALUE_TYPE(
1514 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231515 {"autofill-enable-card-benefits",
1516 flag_descriptions::kAutofillEnableCardBenefitsName,
1517 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1518 flags_ui::kOsIos,
1519 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201520 {"password-manager-signin-uff",
1521 flag_descriptions::kIOSPasswordSignInUffName,
1522 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1523 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011524 {"tab-grid-compositional-layout",
1525 flag_descriptions::kTabGridCompositionalLayoutName,
1526 flag_descriptions::kTabGridCompositionalLayoutDescription,
1527 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411528 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1529 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1530 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481531 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1532 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1533 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1534 kBottomOmniboxPromoVariations,
1535 "BottomOmniboxPromoFRE")},
1536 {"bottom-omnibox-promo-app-launch",
1537 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1538 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1539 flags_ui::kOsIos,
1540 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1541 kBottomOmniboxPromoVariations,
1542 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091543 {"bottom-omnibox-promo-default-position",
1544 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1545 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1546 flags_ui::kOsIos,
1547 FEATURE_WITH_PARAMS_VALUE_TYPE(
1548 kBottomOmniboxPromoDefaultPosition,
1549 kBottomOmniboxPromoDefaultPositionVariations,
1550 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251551 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1552 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1553 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171554 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1555 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1556 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Mike Dougherty330188d52023-12-20 16:33:241557 {"remove-old-web-state-restore",
1558 flag_descriptions::kRemoveOldWebStateRestoreName,
1559 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1560 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031561 {"share-in-web-context-menu-ios",
1562 flag_descriptions::kShareInWebContextMenuIOSName,
1563 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1564 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141565 {"migrate-syncing-user-to-signed-in",
1566 flag_descriptions::kMigrateSyncingUserToSignedInName,
1567 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1568 flags_ui::kOsIos,
1569 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1570 {"undo-migration-of-syncing-user-to-signed-in",
1571 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1572 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1573 flags_ui::kOsIos,
1574 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551575 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1576 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1577 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461578 {"contextual-panel", flag_descriptions::kContextualPanelName,
1579 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1580 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591581 {"omnibox-popup-row-content-configuration",
1582 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1583 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1584 flags_ui::kOsIos,
1585 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391586 {"contextual-panel-force-show-entrypoint",
1587 flag_descriptions::kContextualPanelForceShowEntrypointName,
1588 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1589 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321590 {"bottom-omnibox-promo-region-filter",
1591 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1592 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1593 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471594 {"enable-ipad-feed-ghost-cards",
1595 flag_descriptions::kEnableiPadFeedGhostCardsName,
1596 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1597 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Jood Hajeerbbbf1ac2024-01-26 12:50:451598 {"remember-custom-passphrase-after-signout",
1599 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutName,
1600 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutDescription,
1601 flags_ui::kOsIos,
1602 FEATURE_VALUE_TYPE(syncer::kSyncRememberCustomPassphraseAfterSignout)},
Louis Romerof3144822024-01-30 10:24:161603 {"tab-grid-always-bounce", flag_descriptions::kTabGridAlwaysBounceName,
1604 flag_descriptions::kTabGridAlwaysBounceDescription, flags_ui::kOsIos,
1605 FEATURE_VALUE_TYPE(kTabGridAlwaysBounce)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301606};
sdefresne14900ee2015-11-27 14:43:211607
Rohit Raobed794c2020-04-27 15:27:451608bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1609 return false;
1610}
1611
1612flags_ui::FlagsState& GetGlobalFlagsState() {
1613 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1614 nullptr);
1615 return *flags_state;
1616}
David Jean5ca263c2021-08-18 09:19:301617// Creates the experimental test policies map, used by AsyncPolicyLoader and
1618// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341619NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211620 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1621
Guillaume Jenkins25e9bd72020-08-27 17:39:061622 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551623 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061624 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551625
Guillaume Jenkins25e9bd72020-08-27 17:39:061626 // Set some sample policy values for testing if EnableSamplePolicies is set to
1627 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401628 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551629 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011630 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1631
Guillaume Jenkinseeb7007c2020-06-25 22:55:401632 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1633
1634 // 2 = Disable all variations
1635 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1636
1637 // 2 = Do not allow any site to show popups
1638 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1639
Tina Wang5abee802020-07-29 23:09:521640 // Set default search engine.
1641 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1642 @YES,
1643 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1644 @"http://www.google.com/search?q={searchTerms}",
1645 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021646 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521647
Tina Wang89068c82020-10-29 15:51:501648 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1649
Gauthier Ambard21b23702021-04-16 16:11:271650 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1651
Tina Wang59d0b7e2020-08-11 04:41:011652 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531653
1654 // 2 = Enhanced safe browsing protection
1655 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1656
1657 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291658
1659 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551660 }];
1661 }
1662
Ewann227a3c02021-04-19 12:04:541663 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041664 NSString* sync_policy_key =
1665 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301666 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541667 }
Ewann227a3c02021-04-19 12:04:541668
Ewann570a6302021-08-17 07:22:421669 // SyncTypesListDisabled policy.
1670 NSString* Sync_types_list_disabled_key =
1671 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1672 NSMutableArray* Sync_types_list_disabled_values =
1673 [[NSMutableArray alloc] init];
1674 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1675 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1676 }
1677 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1678 [Sync_types_list_disabled_values addObject:@"readingList"];
1679 }
1680 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1681 [Sync_types_list_disabled_values addObject:@"preferences"];
1682 }
1683 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1684 [Sync_types_list_disabled_values addObject:@"passwords"];
1685 }
1686 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1687 [Sync_types_list_disabled_values addObject:@"autofill"];
1688 }
1689 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1690 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1691 }
1692 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1693 [Sync_types_list_disabled_values addObject:@"tabs"];
1694 }
1695 if ([Sync_types_list_disabled_values count]) {
1696 [testing_policies addEntriesFromDictionary:@{
1697 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1698 }];
Ewann570a6302021-08-17 07:22:421699 }
1700
Gauthier Ambard073eaa92021-11-22 15:24:131701 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521702 NSString* incognito_policy_key =
1703 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1704 NSInteger incognito_mode_availability =
1705 [defaults integerForKey:incognito_policy_key];
1706 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521707 [testing_policies addEntriesFromDictionary:@{
1708 incognito_policy_key : @(incognito_mode_availability),
1709 }];
1710 }
1711
Ewann40a8f8a2021-07-29 10:01:201712 NSString* restriction_pattern =
1713 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1714 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291715 NSString* restrict_key =
1716 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201717 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291718 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201719 }];
1720 }
1721
Vincent Boisselle19200bc2021-09-01 17:58:251722 // If the sign-in policy is set (not "None"), add the policy key to the list
1723 // of enabled experimental policies, and set the value.
1724 NSString* const kSigninPolicyKey = @"BrowserSignin";
1725 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1726 if (signin_policy_mode) {
1727 // Remove the mode offset that was used to represent the unset policy.
1728 --signin_policy_mode;
1729 DCHECK(signin_policy_mode >= 0);
1730
Vincent Boisselle19200bc2021-09-01 17:58:251731 [testing_policies addEntriesFromDictionary:@{
1732 kSigninPolicyKey : @(signin_policy_mode),
1733 }];
1734 }
1735
Veronique Nguyen9b1044f2022-01-11 14:41:131736 // If the New Tab Page URL is set (not empty) add the value to the list of
1737 // test policies.
1738 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1739 if ([ntp_location length] > 0) {
1740 NSString* ntp_location_key =
1741 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1742 [testing_policies
1743 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571744 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131745 }
1746
Ali Juma9ec36d2b2022-03-28 14:53:121747 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1748 NSString* allow_backups_key =
1749 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1750 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1751 [allowed_experimental_policies addObject:allow_backups_key];
1752 }
1753
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241754 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1755 NSString* password_manager_key =
1756 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1757 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1758 [allowed_experimental_policies addObject:password_manager_key];
1759 }
Vincent Boisselle003569a72023-09-11 16:03:121760
1761 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1762 NSString* user_policy_merge_key =
1763 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1764 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1765 [allowed_experimental_policies addObject:user_policy_merge_key];
1766 }
1767
Arthur Milchiorbb44f5c82023-03-14 16:14:461768 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1769 NSString* managed_bookmarks_key =
1770 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1771 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571772 @"["
1773 // The following gets filtered out from
1774 // the JSON string when parsed.
1775 " {"
1776 " \"toplevel_name\": \"Managed Bookmarks\""
1777 " },"
1778 " {"
1779 " \"name\": \"Google\","
1780 " \"url\": \"google.com\""
1781 " },"
1782 " {"
1783 " \"name\": \"Empty Folder\","
1784 " \"children\": []"
1785 " },"
1786 " {"
1787 " \"name\": \"Big Folder\","
1788 " \"children\": ["
1789 " {"
1790 " \"name\": \"Youtube\","
1791 " \"url\": \"youtube.com\""
1792 " },"
1793 " {"
1794 " \"name\": \"Chromium\","
1795 " \"url\": \"chromium.org\""
1796 " },"
1797 " {"
1798 " \"name\": \"More Stuff\","
1799 " \"children\": ["
1800 " {"
1801 " \"name\": \"Bugs\","
1802 " \"url\": \"crbug.com\""
1803 " }"
1804 " ]"
1805 " }"
1806 " ]"
1807 " }"
1808 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461809 [testing_policies addEntriesFromDictionary:@{
1810 managed_bookmarks_key : managed_bookmarks_value
1811 }];
1812 [allowed_experimental_policies addObject:managed_bookmarks_key];
1813 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241814
Guillaume Jenkins25e9bd72020-08-27 17:39:061815 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1816 // policy.
1817 if ([allowed_experimental_policies count] > 0) {
1818 [testing_policies setValue:allowed_experimental_policies
1819 forKey:base::SysUTF8ToNSString(
1820 policy::key::kEnableExperimentalPolicies)];
1821 }
1822
jlebel2eb40222022-05-06 11:15:421823 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1824 switch ([defaults integerForKey:metrics_reporting_key]) {
1825 case 1:
1826 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131827 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421828 break;
1829 case 2:
1830 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131831 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421832 break;
1833 default:
1834 // Metrics reporting not managed.
1835 break;
1836 }
1837
David Jean6f85d44f2021-08-19 08:08:451838 // Warning: Add new flags to TestingPoliciesHash() below.
1839
David Jean5ca263c2021-08-18 09:19:301840 return testing_policies;
1841}
David Jean6f85d44f2021-08-19 08:08:451842
David Jean5ca263c2021-08-18 09:19:301843} // namespace
1844
Gauthier Ambard02dbf022022-08-23 08:28:471845// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301846void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1847 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1848
1849 // Set the UA flag if UseMobileSafariUA is enabled.
1850 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1851 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1852 // Chrome puts its product token.
1853 int32_t major = 0;
1854 int32_t minor = 0;
1855 int32_t bugfix = 0;
1856 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1857 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1858
1859 command_line->AppendSwitchASCII(switches::kUserAgent,
1860 web::BuildMobileUserAgent(product));
1861 }
1862
1863 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341864 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301865
1866 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1867 // Management to enabled and add the token to the list of policies.
1868 NSString* token_key =
1869 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1870 NSString* token = [defaults stringForKey:token_key];
1871
1872 if ([token length] > 0) {
1873 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1874 [testing_policies setValue:token forKey:token_key];
1875 }
1876
Guillaume Jenkins57606d72020-08-13 17:32:551877 // If some policies were set, commit them to the app's registration defaults.
1878 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401879 NSDictionary* registration_defaults =
1880 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1881 [defaults registerDefaults:registration_defaults];
1882 }
1883
sdefresne14900ee2015-11-27 14:43:211884 // Freeform commandline flags. These are added last, so that any flags added
1885 // earlier in this function take precedence.
1886 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1887 base::CommandLine::StringVector flags;
1888 // Append an empty "program" argument.
1889 flags.push_back("");
1890
1891 // The number of flags corresponds to the number of text fields in
1892 // Experimental.plist.
1893 const int kNumFreeformFlags = 5;
1894 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1895 NSString* key =
1896 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1897 NSString* flag = [defaults stringForKey:key];
1898 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331899 // iOS keyboard replaces -- with —, so undo that.
1900 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1901 withString:@"--"
1902 options:0
1903 range:NSMakeRange(0, 1)];
1904 // To make things easier, allow flags with no dashes by prepending them
1905 // here. This also allows for flags that just have one dash if they
1906 // exist.
1907 if (![flag hasPrefix:@"-"]) {
1908 flag = [@"--" stringByAppendingString:flag];
1909 }
sdefresne14900ee2015-11-27 14:43:211910 flags.push_back(base::SysNSStringToUTF8(flag));
1911 }
1912 }
1913
1914 base::CommandLine temp_command_line(flags);
1915 command_line->AppendArguments(temp_command_line, false);
1916 }
msardafc76f662017-02-24 12:46:281917
justincohendacc85d2017-06-28 23:34:101918 // Populate command line flag for 3rd party keyboard omnibox workaround.
1919 NSString* enableThirdPartyKeyboardWorkaround =
1920 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1921 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1922 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1923 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1924 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1925 }
1926
Sylvain Defresned3cd8d92022-01-18 13:35:081927 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211928}
1929
sdefresne14900ee2015-11-27 14:43:211930void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1931 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181932 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111933 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531934 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211935}
1936
jkrcalbf073372016-07-29 07:21:311937std::vector<std::string> RegisterAllFeatureVariationParameters(
1938 flags_ui::FlagsStorage* flags_storage,
1939 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181940 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1941 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311942}
1943
sdefresne14900ee2015-11-27 14:43:211944void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1945 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501946 base::Value::List& supported_entries,
1947 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181948 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211949 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511950 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211951}
1952
1953void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1954 const std::string& internal_name,
1955 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181956 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1957 enable);
sdefresne14900ee2015-11-27 14:43:211958}
1959
1960void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181961 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211962}
1963
Nicolas MacBeth972e2592023-02-23 15:22:091964bool IsRestartNeededToCommitChanges() {
1965 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1966}
1967
sdefresne14900ee2015-11-27 14:43:211968namespace testing {
1969
Elly Fong-Jones323ab1092021-08-23 22:36:311970base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1971 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531972 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211973}
1974
1975} // namespace testing