blob: 6b9f0b0ee28555013e27b0c16d70be603d188e31 [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"
Benjamin Williams14233d72022-07-26 18:32:2084#import "ios/chrome/browser/promos_manager/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
Ed Chin91e44992022-07-27 13:42:34352#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26353// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01354const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04355 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
356 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01357 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04358 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01359const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04360 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
361 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01362 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04363 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01364const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04365 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
366 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01367 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04368 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01369const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04370 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
371 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01372 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04373 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01374const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04375 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
376 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01377 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
378 {kBackgroundRefreshIntervalInSeconds, "0"}};
379const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04380 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
381 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01382 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
383 {kBackgroundRefreshIntervalInSeconds, "0"}};
384const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
385 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
386 {kEnableRecurringBackgroundRefreshSchedule, "false"},
387 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
388 {kBackgroundRefreshIntervalInSeconds, "0"}};
389const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
390 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
391 {kEnableRecurringBackgroundRefreshSchedule, "true"},
392 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
393 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04394
Ed Chin178ec2a2023-02-10 22:21:26395// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04396const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01397 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
398 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
399 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
400 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
401 {"1hr Interval 1hr Max Age Recurring",
402 kOneHourIntervalOneHourMaxAgeRecurring,
403 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
404 {"4hr Interval 6hr Max Age Recurring",
405 kFourHourIntervalSixHourMaxAgeRecurring,
406 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
407 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
408 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
409 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
410 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
411 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
412 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
413 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
414 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04415};
Ed Chin91e44992022-07-27 13:42:34416#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04417
Raj T18a2c8c2023-03-15 17:20:15418const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
419 {"date", "true"}};
420const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
421 {"address", "true"}};
422const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
423 {"phonenumber", "true"}};
424const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
425 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50426const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
427 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15428const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
429 {"date", "true"},
430 {"address", "true"},
431 {"phonenumber", "true"},
432 {"email", "true"}};
433const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
434 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
435 std::size(kEnableExpKitTextClassifierAll), nullptr},
436 {"Enabled for date", kEnableExpKitTextClassifierDate,
437 std::size(kEnableExpKitTextClassifierDate), nullptr},
438 {"Enabled for address", kEnableExpKitTextClassifierAddress,
439 std::size(kEnableExpKitTextClassifierAddress), nullptr},
440 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
441 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
442 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50443 std::size(kEnableExpKitTextClassifierEmail), nullptr},
444 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
445 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15446
Louis Romero93e9b50a2023-01-26 01:46:12447const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
448 {kTabInactivityThresholdParameterName,
449 kTabInactivityThresholdOneWeekParam}};
450const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
451 {kTabInactivityThresholdParameterName,
452 kTabInactivityThresholdTwoWeeksParam}};
453const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
454 {kTabInactivityThresholdParameterName,
455 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58456const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
457 {kTabInactivityThresholdParameterName,
458 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12459
460const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
461 {"One week", kTabInactivityThresholdOneWeek,
462 std::size(kTabInactivityThresholdOneWeek), nullptr},
463 {"Two weeks", kTabInactivityThresholdTwoWeeks,
464 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
465 {"Three weeks", kTabInactivityThresholdThreeWeeks,
466 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58467 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
468 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12469};
470
Ewann Pelle6eecb8f2023-06-23 14:31:37471const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
472 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
473const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
474 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
475const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
476 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55477const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
478 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37479
480const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
481 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00482 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37483 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00484 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37485 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00486 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55487 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
488 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00489};
490
491const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
492 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
493const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
494 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48495const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
496 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00497
498const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
499 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
500 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48501 {"Most recent tab and last synced tab (12 hours threshold)",
502 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
503 {"Most recent tab and last synced tab (24 hours threshold)",
504 kTabResumptionAllTabsOneDayThreshold,
505 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37506};
507
Huiting Yud7d2a5322023-02-09 21:14:22508const FeatureEntry::FeatureParam
509 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
510 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
511const FeatureEntry::FeatureParam
512 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
513 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
514const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20515 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20516 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
517 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22518
519const FeatureEntry::FeatureVariation
520 kCredentialProviderExtensionPromoVariations[] = {
521 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
522 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
523 {"On password copied",
524 kCredentialProviderExtensionPromoOnPasswordCopied,
525 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20526 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30527 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22528
Olivier ROBINfd3887b72023-02-23 14:45:42529const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
530 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44531const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
532 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42533const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
534 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44535 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
536 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
537 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42538
Olivier ROBIN2613bcd02023-04-20 10:00:47539const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
540 {kIOSEditMenuSearchWithTitleParamTitle,
541 kIOSEditMenuSearchWithTitleSearchWithParam}};
542const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
543 {kIOSEditMenuSearchWithTitleParamTitle,
544 kIOSEditMenuSearchWithTitleSearchParam}};
545const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
546 {kIOSEditMenuSearchWithTitleParamTitle,
547 kIOSEditMenuSearchWithTitleWebSearchParam}};
548const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
549 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
550 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
551 {"Search", kIOSEditMenuSearchWithTitleSearch,
552 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
553 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
554 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
555};
556
Hira Mahmood6b0e5502023-06-12 21:51:43557const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
558 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
559const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
560 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
561const FeatureEntry::FeatureVariation
562 kPostRestoreDefaultBrowserPromoVariations[] = {
563 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
564 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
565 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
566 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
567};
568
Christian Xu07d600192023-07-24 12:29:52569const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
570 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
571const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
572 {kBottomOmniboxDefaultSettingParam,
573 kBottomOmniboxDefaultSettingParamBottom}};
574const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
575 {{kBottomOmniboxDefaultSettingParam,
576 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
577const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
578 {
579 {"Top", kBottomOmniboxDefaultSettingTop,
580 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
581 {"Bottom", kBottomOmniboxDefaultSettingBottom,
582 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
583 {"Bottom for Safari Switcher",
584 kBottomOmniboxDefaultSettingSafariSwitcher,
585 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
586};
587
Christian Xue72882d2023-11-20 17:10:48588const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
589 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
590const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
591 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
592 nullptr},
593};
594
Christian Xua3667352023-11-21 16:54:09595const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
596 {kBottomOmniboxPromoDefaultPositionParam,
597 kBottomOmniboxPromoDefaultPositionParamTop}};
598const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
599 {kBottomOmniboxPromoDefaultPositionParam,
600 kBottomOmniboxPromoDefaultPositionParamBottom}};
601const FeatureEntry::FeatureVariation
602 kBottomOmniboxPromoDefaultPositionVariations[] = {
603 {"Top", kBottomOmniboxPromoDefaultPositionTop,
604 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
605 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
606 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
607};
608
Marc Treib9bddebb2023-06-15 14:03:34609const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
610 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25611 {"Disabled", "disable-features",
612 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24613 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02614 "FeedBottomSyncStringRemoval,"
615 "SyncEnableContactInfoDataTypeInTransportMode,"
616 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
617 "SyncEnableBatchUploadLocalData,"
618 "SyncEnableWalletMetadataInTransportMode,"
619 "SyncEnableWalletOfferInTransportMode,"
620 "IOSPasswordSettingsBulkUploadLocalPasswords"},
621 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34622 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24623 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25624 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34625 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37626 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55627 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06628 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06629 "SyncEnableWalletOfferInTransportMode,"
630 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02631 {"Enabled with fast-follows", "enable-features",
632 "ReplaceSyncPromosWithSignInPromos,"
633 "ConsistencyNewAccountInterface,"
634 "FeedBottomSyncStringRemoval,"
635 "SyncEnableContactInfoDataTypeInTransportMode,"
636 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
637 "SyncEnableBatchUploadLocalData,"
638 "SyncEnableWalletMetadataInTransportMode,"
639 "SyncEnableWalletOfferInTransportMode,"
640 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33641 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07642 "EnableBatchUploadFromBookmarksManager,"
Jood Hajeerf1f3e8d2023-12-20 13:35:55643 "EnableReviewAccountSettingsPromo,"
644 "LinkAccountSettingsToPrivacyFooter,"
645 "IPH_iOSReplaceSyncPromosWithSignInPromos"},
Marc Treib9bddebb2023-06-15 14:03:34646};
647
Olivier ROBIN82b67002023-07-31 14:34:46648const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
649 {web::features::kOneTapForMapsConsentModeParamTitle,
650 web::features::kOneTapForMapsConsentModeDefaultParam}};
651const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
652 {web::features::kOneTapForMapsConsentModeParamTitle,
653 web::features::kOneTapForMapsConsentModeForcedParam}};
654const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
655 {web::features::kOneTapForMapsConsentModeParamTitle,
656 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31657const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
658 {web::features::kOneTapForMapsConsentModeParamTitle,
659 web::features::kOneTapForMapsConsentModeIPHParam}};
660const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
661 {web::features::kOneTapForMapsConsentModeParamTitle,
662 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46663const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
664 {"Consent Default", kOneTapForMapsConsentModeDefault,
665 std::size(kOneTapForMapsConsentModeDefault), nullptr},
666 {"Consent Forced", kOneTapForMapsConsentModeForced,
667 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31668 {"Consent IPH", kOneTapForMapsConsentModeIPH,
669 std::size(kOneTapForMapsConsentModeIPH), nullptr},
670 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
671 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46672 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
673 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
674};
675
Stepan Khapuginec68d5bb2023-10-16 13:35:25676constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
677 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19678 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25679constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
680 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19681 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25682constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
683 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19684 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25685constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
686 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19687 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25688
689constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
690 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
691 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
692 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
693 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
694 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
695 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
696 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
697 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
698};
699
Rafał Godlewskie75d12402023-10-25 15:31:53700const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
701 {"Default", "", ""},
702 {"Bootstraping Only", switches::kEnableFeatures,
703 "SharingOfferKeyPairBootstrap"},
704 {"Enabled", switches::kEnableFeatures,
705 "SharingOfferKeyPairBootstrap,SendPasswords,"
706 "PasswordManagerEnableSenderService,"
707 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
708};
709
Scott Yoderd781bd12023-10-25 20:47:15710const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
711 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
712const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
713 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
714 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
715};
716
Matt Jones79534392023-10-27 14:35:02717const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
718 {{commerce::kParcelTrackingTestDataParam,
719 commerce::kParcelTrackingTestDataParamDelivered}};
720const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
721 {{commerce::kParcelTrackingTestDataParam,
722 commerce::kParcelTrackingTestDataParamInProgress}};
723const flags_ui::FeatureEntry::FeatureParam
724 kParcelTrackingTestDataOutForDelivery[] = {
725 {commerce::kParcelTrackingTestDataParam,
726 commerce::kParcelTrackingTestDataParamOutForDelivery}};
727const flags_ui::FeatureEntry::FeatureVariation
728 kParcelTrackingTestDataVariations[] = {
729 {"Delivered", kParcelTrackingTestDataDelivered,
730 std::size(kParcelTrackingTestDataDelivered), nullptr},
731 {"In progress", kParcelTrackingTestDataInProgress,
732 std::size(kParcelTrackingTestDataInProgress), nullptr},
733 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
734 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
735};
736
Benjamin Williams1dc8f2342024-01-04 21:25:55737const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
738 {kIOSDockingPromoExperimentType, "0"}};
739const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
740 {kIOSDockingPromoExperimentType, "1"}};
741const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
742 {kIOSDockingPromoExperimentType, "2"}};
743
744const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
745 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
746 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
747 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
748 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
749 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
750 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
751
Cooper Knaak1e026562017-07-26 05:22:28752// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21753// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28754// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
755// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21756// macro for this type supplying the command line to the macro.
757// . MULTI_VALUE: a list of choices, the first of which should correspond to a
758// deactivated state for this lab (i.e. no command line option). To specify
759// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
760// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28761// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
762// either enabled, disabled, or uses the default value of the associated
763// base::Feature instance. To specify this type of entry use the macro
764// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
765// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
766// base::Feature instance. Choices corresponding to the default state, a
767// universally enabled state, and a universally disabled state are
768// automatically included. To specify this type of entry use the macro
769// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
770// the array of choices.
771//
sdefresne14900ee2015-11-27 14:43:21772// See the documentation of FeatureEntry for details on the fields.
773//
774// When adding a new choice, add it to the end of the list.
775const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28776 {"in-product-help-demo-mode-choice",
777 flag_descriptions::kInProductHelpDemoModeName,
778 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
779 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23780 feature_engagement::kIPHDemoMode,
781 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09782 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22783 {"enable-autofill-credit-card-upload",
784 flag_descriptions::kAutofillCreditCardUploadName,
785 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24786 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23787 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
788 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
789 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51790 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23791 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
792 {"wallet-service-use-sandbox",
793 flag_descriptions::kWalletServiceUseSandboxName,
794 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
795 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
796 autofill::switches::kWalletServiceUseSandbox,
797 "1",
798 autofill::switches::kWalletServiceUseSandbox,
799 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59800 {"show-autofill-type-predictions",
801 flag_descriptions::kShowAutofillTypePredictionsName,
802 flag_descriptions::kShowAutofillTypePredictionsDescription,
803 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50804 FEATURE_VALUE_TYPE(
805 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05806 {"fullscreen-promos-manager-skip-internal-limits",
807 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
808 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
809 flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14811 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53812 flag_descriptions::kFullscreenSmoothScrollingName,
813 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19814 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06815 {"webpage-default-zoom-from-dynamic-type",
816 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
817 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
818 flags_ui::kOsIos,
819 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56820 {"webpage-alternative-text-zoom",
821 flag_descriptions::kWebPageAlternativeTextZoomName,
822 flag_descriptions::kWebPageAlternativeTextZoomDescription,
823 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34824 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
825 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
826 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13827 {"omnibox-ui-max-autocomplete-matches",
828 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
829 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
830 flags_ui::kOsIos,
831 FEATURE_WITH_PARAMS_VALUE_TYPE(
832 omnibox::kUIExperimentMaxAutocompleteMatches,
833 kOmniboxUIMaxAutocompleteMatchesVariations,
834 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35835 {"omnibox-local-history-zero-suggest-beyond-ntp",
836 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
837 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
838 flags_ui::kOsIos,
839 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54840 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
841 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
842 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
843 kOmniboxMaxZPSMatchesVariations,
844 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25845 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
846 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
847 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
848 kOmniboxInspireMeVariants,
849 "OmniboxBundledExperimentV1")},
850 {"omnibox-inspire-me-signed-out",
851 flag_descriptions::kOmniboxInspireMeSignedOutName,
852 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
853 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48854 {"force-startup-signin-promo",
855 flag_descriptions::kForceStartupSigninPromoName,
856 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29857 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41858 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
859 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
860 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13861#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45862 {"screen-time-integration-ios",
863 flag_descriptions::kScreenTimeIntegrationName,
864 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
865 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13866#endif
Nazerke3e993f72020-09-21 13:00:06867 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
868 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
869 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11870 {"ios-shared-highlighting-color-change",
871 flag_descriptions::kIOSSharedHighlightingColorChangeName,
872 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07873 flags_ui::kOsIos,
874 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34875 {"ios-shared-highlighting-v2",
876 flag_descriptions::kIOSSharedHighlightingV2Name,
877 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51879 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
880 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(kIOSTipsNotifications)},
Stepan Khapugin04341202021-01-07 12:22:45882 {"omnibox-new-textfield-implementation",
883 flag_descriptions::kOmniboxNewImplementationName,
884 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19886 {"start-surface", flag_descriptions::kStartSurfaceName,
887 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23888 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
889 kStartSurfaceVariations,
890 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19891 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
892 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
893 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34894 {"wait-threshold-seconds-for-capabilities-api",
895 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
896 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
897 flags_ui::kOsIos,
898 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28899 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
900 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
901 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24902 {"content-push-notifications",
903 flag_descriptions::kContentPushNotificationsName,
904 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52905 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
906 kContentPushNotificationsVariations,
907 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57908 {"overflow-menu-customization",
909 flag_descriptions::kOverflowMenuCustomizationName,
910 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
911 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44912 {"enable-lens-in-omnibox-copied-image",
913 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
914 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
915 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40916 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23917 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
918 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40919 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23920 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03921 {"enable-disco-feed-endpoint",
922 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
923 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
924 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11925 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15926 {"enable-discover-feed-top-sync-promo",
927 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
928 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
929 flags_ui::kOsIos,
930 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
931 kDiscoverFeedTopSyncPromoVariations,
932 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14933 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
934 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
935 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
936 kFeedHeaderSettingsVariations,
937 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28938 {"shared-highlighting-amp",
939 flag_descriptions::kIOSSharedHighlightingAmpName,
940 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
941 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28942 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42943 commerce::flag_descriptions::kCommercePriceTrackingName,
944 commerce::flag_descriptions::kCommercePriceTrackingDescription,
945 flags_ui::kOsIos,
946 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
947 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15948 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06949 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
950 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
951 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54952 {"ntp-view-hierarchy-repair",
953 flag_descriptions::kNTPViewHierarchyRepairName,
954 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20955 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26956 {"autofill-enable-card-product-name",
957 flag_descriptions::kAutofillEnableCardProductNameName,
958 flag_descriptions::kAutofillEnableCardProductNameDescription,
959 flags_ui::kOsIos,
960 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52961 {"enable-download-service-foreground-session",
962 flag_descriptions::kDownloadServiceForegroundSessionName,
963 flag_descriptions::kDownloadServiceForegroundSessionDescription,
964 flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23966 {"enable-tflite-language-detection",
967 flag_descriptions::kTFLiteLanguageDetectionName,
968 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
969 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20970 {"optimization-guide-debug-logs",
971 flag_descriptions::kOptimizationGuideDebugLogsName,
972 flag_descriptions::kOptimizationGuideDebugLogsDescription,
973 flags_ui::kOsIos,
974 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55975 {"optimization-guide-push-notifications",
976 flag_descriptions::kOptimizationGuidePushNotificationClientName,
977 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
978 flags_ui::kOsIos,
979 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25980 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
981 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
982 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01983 {"suggestions-scrolling-ipad",
984 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
985 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
986 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00987 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
988 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
989 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25990 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
991 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:33992 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
David Jeanad303a92023-07-31 16:58:11993 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
994 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
995 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:22996 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
997 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
998 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:55999 {"experience-kit-apple-calendar",
1000 flag_descriptions::kAppleCalendarExperienceKitName,
1001 flag_descriptions::kAppleCalendarExperienceKitDescription,
1002 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081003 {"enable-expkit-text-classifier",
1004 flag_descriptions::kEnableExpKitTextClassifierName,
1005 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151006 flags_ui::kOsIos,
1007 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1008 kEnableExpKitTextClassifierVariations,
1009 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331010 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1011 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461012 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1013 kOneTapForMapsWithVariations,
1014 "OneTapForMaps")},
David Jean139ba1bf2023-08-31 15:59:321015 {"enable-annotations-language-detection",
1016 flag_descriptions::kUseAnnotationsForLanguageDetectionName,
1017 flag_descriptions::kUseAnnotationsForLanguageDetectionDescription,
1018 flags_ui::kOsIos,
1019 FEATURE_VALUE_TYPE(web::features::kUseAnnotationsForLanguageDetection)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251020 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1021 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1022 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301023 {"autofill-enable-ranking-formula-address-profiles",
1024 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1025 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1026 flags_ui::kOsIos,
1027 FEATURE_VALUE_TYPE(
1028 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391029 {"autofill-enable-ranking-formula-credit-cards",
1030 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1031 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1032 flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(
1034 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021035 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1036 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1037 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521038 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1039 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261040 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1041 kMagicStackVariations,
1042 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211043 {"ios-hide-feed-with-search-choice",
1044 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1045 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151046 flags_ui::kOsIos,
1047 FEATURE_WITH_PARAMS_VALUE_TYPE(
1048 kIOSHideFeedWithSearchChoice,
1049 kIOSHideFeedWithSearchChoiceVariations,
1050 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311051 {"ios-keyboard-accessory-upgrade",
1052 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1053 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1054 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261055 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1056 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1057 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291058 {"ios-magic-stack-segmentation-ranking",
1059 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1060 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1061 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301062 FEATURE_WITH_PARAMS_VALUE_TYPE(
1063 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1064 kSegmentationPlatformIosModuleRankerVariations,
1065 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061066 {"default-browser-intents-show-settings",
1067 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1068 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1069 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321070 {"ios-password-bottom-sheet",
1071 flag_descriptions::kIOSPasswordBottomSheetName,
1072 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1073 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281074 {"ios-password-bottom-sheet-autofocus",
1075 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1076 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1077 flags_ui::kOsIos,
1078 FEATURE_VALUE_TYPE(
1079 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Alexis Hétu459451a2023-06-01 17:05:311080 {"ios-payments-bottom-sheet",
1081 flag_descriptions::kIOSPaymentsBottomSheetName,
1082 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
Moe Ahmadi098519d82022-07-27 18:34:241084 {"omnibox-zero-suggest-prefetching",
1085 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1086 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1087 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451088 {"omnibox-zero-suggest-prefetching-on-srp",
1089 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1090 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1091 flags_ui::kOsIos,
1092 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1093 {"omnibox-zero-suggest-prefetching-on-web",
1094 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1095 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1096 flags_ui::kOsIos,
1097 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471098 {"omnibox-zero-suggest-in-memory-caching",
1099 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1100 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1101 flags_ui::kOsIos,
1102 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351103 {"omnibox-on-device-tail-suggestions",
1104 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1105 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1106 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361107 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1108 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1109 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1110 kOmniboxMaxURLMatchesVariations,
1111 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061112 {"metrickit-non-crash-reports",
1113 flag_descriptions::kMetrickitNonCrashReportName,
1114 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1115 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371116 {"autofill-enable-remade-downstream-metrics",
1117 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1118 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1119 flags_ui::kOsIos,
1120 FEATURE_VALUE_TYPE(
1121 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551122 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1123 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1124 flag_descriptions::
1125 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1126 flags_ui::kOsIos,
1127 FEATURE_VALUE_TYPE(
1128 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011129 {"default-browser-video-promo",
1130 flag_descriptions::kDefaultBrowserVideoPromoName,
1131 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1132 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1133 kDefaultBrowserVideoPromoVariations,
1134 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541135 {"default-browser-promo-force-show-promo",
1136 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1137 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1138 flags_ui::kOsIos,
1139 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171140 {"default-browser-promo-trigger-criteria-experiment",
1141 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1142 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1143 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501144 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441145 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211146 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1147 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1148 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501149 {"fullscreen-promo-on-omnibox-copy-paste",
1150 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1151 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1152 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341153#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1154 {"feed-background-refresh-ios",
1155 flag_descriptions::kFeedBackgroundRefreshName,
1156 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1157 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1158 kFeedBackgroundRefreshVariations,
1159 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261160#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191161 {"omnibox-keyboard-paste-button",
1162 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1163 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1164 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501165 {"enable-tflite-language-detection-ignore",
1166 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1167 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1168 flags_ui::kOsIos,
1169 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571170 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1171 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1172 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411173 {"credential-provider-extension-promo",
1174 flag_descriptions::kCredentialProviderExtensionPromoName,
1175 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221176 flags_ui::kOsIos,
1177 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1178 kCredentialProviderExtensionPromoVariations,
1179 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251180 {"iph-price-notifications-while-browsing",
1181 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1182 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1183 flags_ui::kOsIos,
1184 FEATURE_VALUE_TYPE(
1185 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501186 {"autofill-suggest-server-card-instead-of-local-card",
1187 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1188 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1189 flags_ui::kOsIos,
1190 FEATURE_VALUE_TYPE(
1191 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Matt Jonesc01327662023-08-02 16:34:291192 {"shopping-collection",
1193 commerce::flag_descriptions::kShoppingCollectionName,
1194 commerce::flag_descriptions::kShoppingCollectionDescription,
1195 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kShoppingCollection)},
Ewann Pelledec2d042023-01-25 15:28:391196 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1197 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1198 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481199 {"local-pdp-detection",
1200 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1201 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1202 flags_ui::kOsIos,
1203 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121204 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1205 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1206 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1207 kTabInactivityThresholdVariations,
1208 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181209 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1210 flag_descriptions::
1211 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1212 flag_descriptions::
1213 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1214 flags_ui::kOsIos,
1215 FEATURE_VALUE_TYPE(
1216 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361217 {"enable-friendlier-safe-browsing-settings-standard-protection",
1218 flag_descriptions::
1219 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1220 flag_descriptions::
1221 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521222 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361223 FEATURE_VALUE_TYPE(
1224 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291225 {"enable-red-interstitial-facelift",
1226 flag_descriptions::kEnableRedInterstitialFaceliftName,
1227 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1228 flags_ui::kOsIos,
1229 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421230 {"ios-edit-menu-partial-translate",
1231 flag_descriptions::kIOSEditMenuPartialTranslateName,
1232 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421233 flags_ui::kOsIos,
1234 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1235 kIOSEditMenuPartialTranslateVariations,
1236 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431237 {"notification-settings-menu-item",
1238 flag_descriptions::kNotificationSettingsMenuItemName,
1239 flag_descriptions::kNotificationSettingsMenuItemDescription,
1240 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061241 {"spotlight-reading-list-source",
1242 flag_descriptions::kSpotlightReadingListSourceName,
1243 flag_descriptions::kSpotlightReadingListSourceDescription,
1244 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481245 {"enable-policy-test-page-ios",
1246 flag_descriptions::kEnablePolicyTestPageName,
1247 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1248 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531249 {"web-feed-feedback-reroute",
1250 flag_descriptions::kWebFeedFeedbackRerouteName,
1251 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1252 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551253 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1254 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1255 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431256 {"enable-follow-IPH-exp-params",
1257 flag_descriptions::kEnableFollowIPHExpParamsName,
1258 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1259 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031260 {"enable-follow-management-instant-reload",
1261 flag_descriptions::kEnableFollowManagementInstantReloadName,
1262 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1263 flags_ui::kOsIos,
1264 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251265 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1266 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1267 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441268 {"mixed-content-autoupgrade-ios",
1269 flag_descriptions::kMixedContentAutoupgradeName,
1270 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1271 FEATURE_VALUE_TYPE(
1272 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421273 {"enable-preferences-account-storage",
1274 flag_descriptions::kEnablePreferencesAccountStorageName,
1275 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1276 flags_ui::kOsIos,
1277 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201278 {"ios-browser-edit-menu-metrics",
1279 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1280 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1281 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551282 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1283 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1284 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1285 kIOSDockingPromoVariations,
1286 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241287 {"omnibox-grouping-framework-zps",
1288 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1289 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1290 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1291 {"omnibox-grouping-framework-non-zps",
1292 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1293 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1294 flags_ui::kOsIos,
1295 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471296 {"enable-session-serialization-optimizations",
1297 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1298 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1299 flags_ui::kOsIos,
1300 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221301 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391302 {"only-access-clipboard-async",
1303 flag_descriptions::kOnlyAccessClipboardAsyncName,
1304 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1305 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191306 {"omnibox-improved-rtl-suggestions",
1307 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1308 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1309 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471310 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1311 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1312 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1313 kIOSEditMenuSearchWithVariations,
1314 "IOSEditMenuSearchWith")},
1315 {"ios-edit-menu-hide-search-web",
1316 flag_descriptions::kIOSEditMenuHideSearchWebName,
1317 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1318 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171319 {"autofill-enable-card-art-image",
1320 flag_descriptions::kAutofillEnableCardArtImageName,
1321 flag_descriptions::kAutofillEnableCardArtImageDescription,
1322 flags_ui::kOsIos,
1323 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451324 {"enable-signed-out-view-demotion",
1325 flag_descriptions::kEnableSignedOutViewDemotionName,
1326 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1327 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401328 {"enable-startup-latency-improvements",
1329 flag_descriptions::kEnableStartupImprovementsName,
1330 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1331 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251332 {"autofill-use-two-dots-for-last-four-digits",
1333 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1334 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1335 flags_ui::kOsIos,
1336 FEATURE_VALUE_TYPE(
1337 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241338 {"autofill-disable-profile-updates",
1339 flag_descriptions::kAutofillDisableProfileUpdatesName,
1340 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1341 flags_ui::kOsIos,
1342 FEATURE_VALUE_TYPE(
1343 autofill::features::test::kAutofillDisableProfileUpdates)},
1344 {"autofill-disable-silent-profile-updates",
1345 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1346 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(
1349 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1350 {"autofill-enable-admin-level-2",
1351 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1352 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1353 flags_ui::kOsIos,
1354 FEATURE_VALUE_TYPE(
1355 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1356 {"autofill-enable-between-streets",
1357 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1358 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1359 flags_ui::kOsIos,
1360 FEATURE_VALUE_TYPE(
1361 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1362 {"autofill-enable-landmark",
1363 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1364 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1365 flags_ui::kOsIos,
1366 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431367 {"post-restore-default-browser-promo",
1368 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1369 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1370 flags_ui::kOsIos,
1371 FEATURE_WITH_PARAMS_VALUE_TYPE(
1372 kPostRestoreDefaultBrowserPromo,
1373 kPostRestoreDefaultBrowserPromoVariations,
1374 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311375 {"spotlight-open-tabs-source",
1376 flag_descriptions::kSpotlightOpenTabsSourceName,
1377 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1378 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451379 {"spotlight-donate-new-intents",
1380 flag_descriptions::kSpotlightDonateNewIntentsName,
1381 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1382 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341383 {"replace-sync-promos-with-sign-in-promos",
1384 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1385 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1386 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301387 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571388 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1389 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1390 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371391 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1392 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1393 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1394 kTabPickupThresholdVariations,
1395 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321396 {"ios-iph-for-safari-switcher",
1397 flag_descriptions::kIPHForSafariSwitcherName,
1398 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1399 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071400 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1401 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1402 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011403 {"tab-resumption", flag_descriptions::kTabResumptionName,
1404 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001405 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1406 kTabResumptionVariations,
1407 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521408 {"bottom-omnibox-default-setting",
1409 flag_descriptions::kBottomOmniboxDefaultSettingName,
1410 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1411 flags_ui::kOsIos,
1412 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1413 kBottomOmniboxDefaultSettingVariations,
1414 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131415 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1416 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1417 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
Nohemi Fernandez64acf982023-08-04 09:27:151418 {"enable-family-link-controls",
1419 flag_descriptions::kEnableFamilyLinkControlsName,
1420 flag_descriptions::kEnableFamilyLinkControlsDescription, flags_ui::kOsIos,
1421 FEATURE_VALUE_TYPE(
1422 supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)},
adamta7be73b182023-08-08 22:30:351423 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1424 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1425 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501426 {"ios-password-auth-on-entry-v2",
1427 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1428 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1429 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281430 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1431 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1432 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131433 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1434 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1435 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021436 {"parcel-tracking-test-data",
1437 commerce::flag_descriptions::kParcelTrackingTestDataName,
1438 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1439 flags_ui::kOsIos,
1440 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1441 kParcelTrackingTestDataVariations,
1442 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111443 {"autofill-enable-merchant-domain-in-unmask-card-request",
1444 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1445 flag_descriptions::
1446 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1447 flags_ui::kOsIos,
1448 FEATURE_VALUE_TYPE(
1449 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331450 {"autofill-update-chrome-settings-link-to-gpay-web",
1451 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1452 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1453 flags_ui::kOsIos,
1454 FEATURE_VALUE_TYPE(
1455 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281456 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1457 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1458 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591459 {"iph-ios-promo-manager-widget-promo",
1460 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1461 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1462 flags_ui::kOsIos,
1463 FEATURE_VALUE_TYPE(
1464 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571465 {"autofill-enable-virtual-cards",
1466 flag_descriptions::kAutofillEnableVirtualCardsName,
1467 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1468 flags_ui::kOsIos,
1469 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551470 {"ios-incognito-downloads-warning",
1471 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1472 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1473 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571474 {"omnibox-shortcuts-database-ios",
1475 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1476 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211477 flags_ui::kOsIos,
1478 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021479 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1480 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1481 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Vasilii Sukhanov32b14452023-10-12 17:31:271482 {"delete-undecryptable-passwords",
1483 flag_descriptions::kClearUndecryptablePasswordsOnSyncName,
1484 flag_descriptions::kClearUndecryptablePasswordsOnSyncDescription,
1485 flags_ui::kOsIos,
1486 FEATURE_VALUE_TYPE(
1487 password_manager::features::kClearUndecryptablePasswordsOnSync)},
1488 {"ignore-undecryptable-passwords",
1489 flag_descriptions::kSkipUndecryptablePasswordsName,
1490 flag_descriptions::kSkipUndecryptablePasswordsDescription,
1491 flags_ui::kOsIos,
1492 FEATURE_VALUE_TYPE(
1493 password_manager::features::kSkipUndecryptablePasswords)},
Rubin Deliallisi072bc842023-10-19 12:00:411494 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1495 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1496 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121497 {"sync-session-on-visibility-changed",
1498 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1499 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1500 flags_ui::kOsIos,
1501 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451502 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1503 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1504 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531505 {"password-sharing", flag_descriptions::kPasswordSharingName,
1506 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1507 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511508 {"omnibox-company-entity-icon-adjustment",
1509 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1510 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1511 flags_ui::kOsIos,
1512 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1513 kOmniboxCompanyEntityAdjustmentVariations,
1514 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051515 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1516 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1517 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1518 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1519 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1520 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351521 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1522 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1523 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471524 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1525 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1526 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131527 {"autofill-enable-payments-mandatory-reauth",
1528 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1529 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1530 flags_ui::kOsIos,
1531 FEATURE_VALUE_TYPE(
1532 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231533 {"autofill-enable-card-benefits",
1534 flag_descriptions::kAutofillEnableCardBenefitsName,
1535 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1536 flags_ui::kOsIos,
1537 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201538 {"password-manager-signin-uff",
1539 flag_descriptions::kIOSPasswordSignInUffName,
1540 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1541 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011542 {"tab-grid-compositional-layout",
1543 flag_descriptions::kTabGridCompositionalLayoutName,
1544 flag_descriptions::kTabGridCompositionalLayoutDescription,
1545 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411546 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1547 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1548 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481549 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1550 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1551 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1552 kBottomOmniboxPromoVariations,
1553 "BottomOmniboxPromoFRE")},
1554 {"bottom-omnibox-promo-app-launch",
1555 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1556 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1557 flags_ui::kOsIos,
1558 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1559 kBottomOmniboxPromoVariations,
1560 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091561 {"bottom-omnibox-promo-default-position",
1562 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1563 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1564 flags_ui::kOsIos,
1565 FEATURE_WITH_PARAMS_VALUE_TYPE(
1566 kBottomOmniboxPromoDefaultPosition,
1567 kBottomOmniboxPromoDefaultPositionVariations,
1568 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251569 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1570 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1571 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171572 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1573 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1574 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Mike Dougherty330188d52023-12-20 16:33:241575 {"remove-old-web-state-restore",
1576 flag_descriptions::kRemoveOldWebStateRestoreName,
1577 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1578 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031579 {"share-in-web-context-menu-ios",
1580 flag_descriptions::kShareInWebContextMenuIOSName,
1581 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1582 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141583 {"migrate-syncing-user-to-signed-in",
1584 flag_descriptions::kMigrateSyncingUserToSignedInName,
1585 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1586 flags_ui::kOsIos,
1587 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1588 {"undo-migration-of-syncing-user-to-signed-in",
1589 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1590 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1591 flags_ui::kOsIos,
1592 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551593 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1594 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1595 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461596 {"contextual-panel", flag_descriptions::kContextualPanelName,
1597 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1598 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591599 {"omnibox-popup-row-content-configuration",
1600 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1601 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1602 flags_ui::kOsIos,
1603 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391604 {"contextual-panel-force-show-entrypoint",
1605 flag_descriptions::kContextualPanelForceShowEntrypointName,
1606 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1607 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321608 {"bottom-omnibox-promo-region-filter",
1609 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1610 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1611 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471612 {"enable-ipad-feed-ghost-cards",
1613 flag_descriptions::kEnableiPadFeedGhostCardsName,
1614 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1615 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Jood Hajeerbbbf1ac2024-01-26 12:50:451616 {"remember-custom-passphrase-after-signout",
1617 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutName,
1618 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutDescription,
1619 flags_ui::kOsIos,
1620 FEATURE_VALUE_TYPE(syncer::kSyncRememberCustomPassphraseAfterSignout)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301621};
sdefresne14900ee2015-11-27 14:43:211622
Rohit Raobed794c2020-04-27 15:27:451623bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1624 return false;
1625}
1626
1627flags_ui::FlagsState& GetGlobalFlagsState() {
1628 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1629 nullptr);
1630 return *flags_state;
1631}
David Jean5ca263c2021-08-18 09:19:301632// Creates the experimental test policies map, used by AsyncPolicyLoader and
1633// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341634NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211635 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1636
Guillaume Jenkins25e9bd72020-08-27 17:39:061637 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551638 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061639 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551640
Guillaume Jenkins25e9bd72020-08-27 17:39:061641 // Set some sample policy values for testing if EnableSamplePolicies is set to
1642 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401643 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551644 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011645 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1646
Guillaume Jenkinseeb7007c2020-06-25 22:55:401647 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1648
1649 // 2 = Disable all variations
1650 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1651
1652 // 2 = Do not allow any site to show popups
1653 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1654
Tina Wang5abee802020-07-29 23:09:521655 // Set default search engine.
1656 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1657 @YES,
1658 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1659 @"http://www.google.com/search?q={searchTerms}",
1660 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021661 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521662
Tina Wang89068c842020-10-29 15:51:501663 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1664
Gauthier Ambard21b23702021-04-16 16:11:271665 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1666
Tina Wang59d0b7e2020-08-11 04:41:011667 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531668
1669 // 2 = Enhanced safe browsing protection
1670 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1671
1672 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291673
1674 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551675 }];
1676 }
1677
Ewann227a3c02021-04-19 12:04:541678 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041679 NSString* sync_policy_key =
1680 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301681 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541682 }
Ewann227a3c02021-04-19 12:04:541683
Ewann570a6302021-08-17 07:22:421684 // SyncTypesListDisabled policy.
1685 NSString* Sync_types_list_disabled_key =
1686 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1687 NSMutableArray* Sync_types_list_disabled_values =
1688 [[NSMutableArray alloc] init];
1689 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1690 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1691 }
1692 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1693 [Sync_types_list_disabled_values addObject:@"readingList"];
1694 }
1695 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1696 [Sync_types_list_disabled_values addObject:@"preferences"];
1697 }
1698 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1699 [Sync_types_list_disabled_values addObject:@"passwords"];
1700 }
1701 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1702 [Sync_types_list_disabled_values addObject:@"autofill"];
1703 }
1704 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1705 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1706 }
1707 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1708 [Sync_types_list_disabled_values addObject:@"tabs"];
1709 }
1710 if ([Sync_types_list_disabled_values count]) {
1711 [testing_policies addEntriesFromDictionary:@{
1712 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1713 }];
Ewann570a6302021-08-17 07:22:421714 }
1715
Gauthier Ambard073eaa92021-11-22 15:24:131716 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521717 NSString* incognito_policy_key =
1718 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1719 NSInteger incognito_mode_availability =
1720 [defaults integerForKey:incognito_policy_key];
1721 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521722 [testing_policies addEntriesFromDictionary:@{
1723 incognito_policy_key : @(incognito_mode_availability),
1724 }];
1725 }
1726
Ewann40a8f8a2021-07-29 10:01:201727 NSString* restriction_pattern =
1728 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1729 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291730 NSString* restrict_key =
1731 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201732 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291733 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201734 }];
1735 }
1736
Vincent Boisselle19200bc2021-09-01 17:58:251737 // If the sign-in policy is set (not "None"), add the policy key to the list
1738 // of enabled experimental policies, and set the value.
1739 NSString* const kSigninPolicyKey = @"BrowserSignin";
1740 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1741 if (signin_policy_mode) {
1742 // Remove the mode offset that was used to represent the unset policy.
1743 --signin_policy_mode;
1744 DCHECK(signin_policy_mode >= 0);
1745
Vincent Boisselle19200bc2021-09-01 17:58:251746 [testing_policies addEntriesFromDictionary:@{
1747 kSigninPolicyKey : @(signin_policy_mode),
1748 }];
1749 }
1750
Veronique Nguyen9b1044f2022-01-11 14:41:131751 // If the New Tab Page URL is set (not empty) add the value to the list of
1752 // test policies.
1753 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1754 if ([ntp_location length] > 0) {
1755 NSString* ntp_location_key =
1756 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1757 [testing_policies
1758 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571759 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131760 }
1761
Ali Juma9ec36d22022-03-28 14:53:121762 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1763 NSString* allow_backups_key =
1764 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1765 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1766 [allowed_experimental_policies addObject:allow_backups_key];
1767 }
1768
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241769 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1770 NSString* password_manager_key =
1771 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1772 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1773 [allowed_experimental_policies addObject:password_manager_key];
1774 }
Vincent Boisselle003569a72023-09-11 16:03:121775
1776 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1777 NSString* user_policy_merge_key =
1778 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1779 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1780 [allowed_experimental_policies addObject:user_policy_merge_key];
1781 }
1782
Arthur Milchiorbb44f5c82023-03-14 16:14:461783 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1784 NSString* managed_bookmarks_key =
1785 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1786 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571787 @"["
1788 // The following gets filtered out from
1789 // the JSON string when parsed.
1790 " {"
1791 " \"toplevel_name\": \"Managed Bookmarks\""
1792 " },"
1793 " {"
1794 " \"name\": \"Google\","
1795 " \"url\": \"google.com\""
1796 " },"
1797 " {"
1798 " \"name\": \"Empty Folder\","
1799 " \"children\": []"
1800 " },"
1801 " {"
1802 " \"name\": \"Big Folder\","
1803 " \"children\": ["
1804 " {"
1805 " \"name\": \"Youtube\","
1806 " \"url\": \"youtube.com\""
1807 " },"
1808 " {"
1809 " \"name\": \"Chromium\","
1810 " \"url\": \"chromium.org\""
1811 " },"
1812 " {"
1813 " \"name\": \"More Stuff\","
1814 " \"children\": ["
1815 " {"
1816 " \"name\": \"Bugs\","
1817 " \"url\": \"crbug.com\""
1818 " }"
1819 " ]"
1820 " }"
1821 " ]"
1822 " }"
1823 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461824 [testing_policies addEntriesFromDictionary:@{
1825 managed_bookmarks_key : managed_bookmarks_value
1826 }];
1827 [allowed_experimental_policies addObject:managed_bookmarks_key];
1828 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241829
Guillaume Jenkins25e9bd72020-08-27 17:39:061830 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1831 // policy.
1832 if ([allowed_experimental_policies count] > 0) {
1833 [testing_policies setValue:allowed_experimental_policies
1834 forKey:base::SysUTF8ToNSString(
1835 policy::key::kEnableExperimentalPolicies)];
1836 }
1837
jlebel2eb40222022-05-06 11:15:421838 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1839 switch ([defaults integerForKey:metrics_reporting_key]) {
1840 case 1:
1841 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131842 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421843 break;
1844 case 2:
1845 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131846 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421847 break;
1848 default:
1849 // Metrics reporting not managed.
1850 break;
1851 }
1852
David Jean6f85d44f2021-08-19 08:08:451853 // Warning: Add new flags to TestingPoliciesHash() below.
1854
David Jean5ca263c2021-08-18 09:19:301855 return testing_policies;
1856}
David Jean6f85d44f2021-08-19 08:08:451857
David Jean5ca263c2021-08-18 09:19:301858} // namespace
1859
Gauthier Ambard02dbf022022-08-23 08:28:471860// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301861void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1862 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1863
1864 // Set the UA flag if UseMobileSafariUA is enabled.
1865 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1866 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1867 // Chrome puts its product token.
1868 int32_t major = 0;
1869 int32_t minor = 0;
1870 int32_t bugfix = 0;
1871 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1872 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1873
1874 command_line->AppendSwitchASCII(switches::kUserAgent,
1875 web::BuildMobileUserAgent(product));
1876 }
1877
1878 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341879 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301880
1881 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1882 // Management to enabled and add the token to the list of policies.
1883 NSString* token_key =
1884 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1885 NSString* token = [defaults stringForKey:token_key];
1886
1887 if ([token length] > 0) {
1888 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1889 [testing_policies setValue:token forKey:token_key];
1890 }
1891
Guillaume Jenkins57606d72020-08-13 17:32:551892 // If some policies were set, commit them to the app's registration defaults.
1893 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401894 NSDictionary* registration_defaults =
1895 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1896 [defaults registerDefaults:registration_defaults];
1897 }
1898
sdefresne14900ee2015-11-27 14:43:211899 // Freeform commandline flags. These are added last, so that any flags added
1900 // earlier in this function take precedence.
1901 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1902 base::CommandLine::StringVector flags;
1903 // Append an empty "program" argument.
1904 flags.push_back("");
1905
1906 // The number of flags corresponds to the number of text fields in
1907 // Experimental.plist.
1908 const int kNumFreeformFlags = 5;
1909 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1910 NSString* key =
1911 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1912 NSString* flag = [defaults stringForKey:key];
1913 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331914 // iOS keyboard replaces -- with —, so undo that.
1915 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1916 withString:@"--"
1917 options:0
1918 range:NSMakeRange(0, 1)];
1919 // To make things easier, allow flags with no dashes by prepending them
1920 // here. This also allows for flags that just have one dash if they
1921 // exist.
1922 if (![flag hasPrefix:@"-"]) {
1923 flag = [@"--" stringByAppendingString:flag];
1924 }
sdefresne14900ee2015-11-27 14:43:211925 flags.push_back(base::SysNSStringToUTF8(flag));
1926 }
1927 }
1928
1929 base::CommandLine temp_command_line(flags);
1930 command_line->AppendArguments(temp_command_line, false);
1931 }
msardafc76f662017-02-24 12:46:281932
justincohendacc85d2017-06-28 23:34:101933 // Populate command line flag for 3rd party keyboard omnibox workaround.
1934 NSString* enableThirdPartyKeyboardWorkaround =
1935 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1936 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1937 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1938 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1939 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1940 }
1941
Sylvain Defresned3cd8d92022-01-18 13:35:081942 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211943}
1944
sdefresne14900ee2015-11-27 14:43:211945void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1946 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181947 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111948 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531949 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211950}
1951
jkrcalbf073372016-07-29 07:21:311952std::vector<std::string> RegisterAllFeatureVariationParameters(
1953 flags_ui::FlagsStorage* flags_storage,
1954 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181955 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1956 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311957}
1958
sdefresne14900ee2015-11-27 14:43:211959void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1960 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501961 base::Value::List& supported_entries,
1962 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181963 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211964 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511965 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211966}
1967
1968void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1969 const std::string& internal_name,
1970 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181971 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1972 enable);
sdefresne14900ee2015-11-27 14:43:211973}
1974
1975void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181976 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211977}
1978
Nicolas MacBeth972e2592023-02-23 15:22:091979bool IsRestartNeededToCommitChanges() {
1980 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1981}
1982
sdefresne14900ee2015-11-27 14:43:211983namespace testing {
1984
Elly Fong-Jones323ab1092021-08-23 22:36:311985base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1986 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531987 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211988}
1989
1990} // namespace testing