blob: ca41fe612bf56d33202f15d5ad02fe3edf035dbb [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"
Vidhan Jain1199e202024-03-15 14:42:5927#import "components/autofill/ios/common/features.h"
Menghan YANGf3fe2de52023-02-27 16:38:5028#import "components/bookmarks/common/bookmark_features.h"
Marc Treib1f6c5db992024-01-04 20:25:1429#import "components/browser_sync/browser_sync_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5730#import "components/commerce/core/commerce_feature_list.h"
31#import "components/commerce/core/flag_descriptions.h"
32#import "components/content_settings/core/common/features.h"
33#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5234#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5735#import "components/enterprise/browser/enterprise_switches.h"
Salma Elmahallawye8a5df12024-01-15 19:33:4136#import "components/enterprise/idle/idle_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5737#import "components/feature_engagement/public/feature_constants.h"
38#import "components/feature_engagement/public/feature_list.h"
39#import "components/feed/feed_feature_list.h"
40#import "components/flags_ui/feature_entry.h"
41#import "components/flags_ui/feature_entry_macros.h"
42#import "components/flags_ui/flags_storage.h"
43#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2544#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5745#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0346#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5747#import "components/ntp_tiles/switches.h"
48#import "components/omnibox/browser/omnibox_field_trial.h"
49#import "components/omnibox/common/omnibox_features.h"
50#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2051#import "components/optimization_guide/core/optimization_guide_switches.h"
Vasilii Sukhanov32b14452023-10-12 17:31:2752#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5753#import "components/password_manager/core/common/password_manager_features.h"
54#import "components/payments/core/features.h"
55#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4056#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5757#import "components/policy/policy_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5758#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3059#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2960#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2561#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5762#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
63#import "components/signin/core/browser/account_reconcilor.h"
64#import "components/signin/ios/browser/features.h"
65#import "components/signin/public/base/signin_switches.h"
66#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1567#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5768#import "components/sync/base/command_line_switches.h"
69#import "components/sync/base/features.h"
70#import "components/sync/base/pref_names.h"
71#import "components/translate/core/browser/translate_prefs.h"
72#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3473#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3074#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5375#import "ios/chrome/browser/crash_report/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1176#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1477#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1778#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Vincent Boisselle8b321bb2023-11-28 13:58:3180#import "ios/chrome/browser/follow/model/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5881#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
Chris Lue687fc72023-10-27 02:42:1982#import "ios/chrome/browser/parcel_tracking/features.h"
mmrashadd0c7f952023-12-14 13:36:3883#import "ios/chrome/browser/policy/model/policy_util.h"
Stepan Khapugin5694d702024-01-31 13:23:0884#import "ios/chrome/browser/promos_manager/model/features.h"
mmrashadf158cad942023-10-03 09:15:4885#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Sylvain Defresneb81065002024-01-23 10:51:2286#import "ios/chrome/browser/sessions/features.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4687#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3588#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3689#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
90#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2891#import "ios/chrome/browser/text_selection/model/text_selection_util.h"
Hira Mahmood6b0e5502023-06-12 21:51:4392#import "ios/chrome/browser/ui/default_promo/post_restore/features.h"
Ewann1a9d33d2021-06-14 11:12:2493#import "ios/chrome/browser/ui/download/features.h"
adamta273568472020-12-04 23:53:5794#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0195#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Filipa Senra0bd07982023-12-19 10:56:2596#import "ios/chrome/browser/ui/page_info/features.h"
Robbie Gibson686c56732021-10-04 17:11:4597#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Rubin Deliallisi4170b1c2024-02-28 16:15:4298#import "ios/chrome/browser/ui/settings/google_services/features.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1599#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:41100#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:19101#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58102#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22103#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57104#import "ios/chrome/grit/ios_strings.h"
105#import "ios/components/security_interstitials/https_only_mode/feature.h"
106#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
107#import "ios/web/common/features.h"
108#import "ios/web/common/user_agent.h"
109#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21110
Sylvain Defresne9c107082020-10-27 16:39:13111#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48112#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13113#endif
114
sdefresne14900ee2015-11-27 14:43:21115#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57116#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22117#endif
stkhapuginc1be1792016-12-13 14:30:53118
elawrence816f6790e2017-06-16 18:19:28119using flags_ui::FeatureEntry;
120
sdefresne14900ee2015-11-27 14:43:21121namespace {
Emily Starkbafa9062017-12-27 15:22:46122
Nohemi Fernandezc00842a2021-07-26 11:47:34123const FeatureEntry::Choice
124 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
125 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
126 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
127 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
128 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
129};
130
Cheick Cisse8835611a2023-06-02 21:42:54131// Uses int values from DefaultPromoType enum.
132const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
133 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
134 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
135 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
136 "1"},
137 {"Show tailored made for ios promo",
138 "default-browser-promo-force-show-promo", "2"},
139 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
140 "3"},
141 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
142};
143
Stepan Khapugincc4e9842019-01-23 13:38:13144const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
145 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
158
159const FeatureEntry::FeatureVariation
160 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
161 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53162 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13163 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13175
Stepan Khapuginbac467e2022-05-06 21:11:54176const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
177 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
182
183const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
184 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
185 nullptr},
186 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
187 nullptr},
188 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
189 nullptr},
190};
191
Christian Xucf26d562022-07-06 09:28:36192const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
193 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
198
199const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
200 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
201 nullptr},
202 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
203 nullptr},
204 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
205 nullptr},
206};
207
Cheick Cissedc49dbe2023-08-09 13:33:52208const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51209 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
210 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
211const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
212 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
213const FeatureEntry::FeatureParam
214 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
215 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
216
217const FeatureEntry::FeatureVariation
218 kOmniboxCompanyEntityAdjustmentVariations[] = {
219 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
220 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
221 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
222 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
223 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
224 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
225};
226
Gayane Petrosyane3ee8b42024-02-02 18:48:12227const FeatureEntry::FeatureParam kDefaultBrowserVideoFullscreenPromo[] = {
228 {kDefaultBrowserVideoPromoVariant, kVideoFullscreenPromo}};
229const FeatureEntry::FeatureParam kDefaultBrowserVideoHalfscreenPromo[] = {
230 {kDefaultBrowserVideoPromoVariant, kVideoHalfscreenPromo}};
Cheick Cissedc49dbe2023-08-09 13:33:52231
Cheick Cisse2806f082b2023-04-25 14:20:01232const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Gayane Petrosyane3ee8b42024-02-02 18:48:12233 {"Show half screen ui", kDefaultBrowserVideoHalfscreenPromo,
234 std::size(kDefaultBrowserVideoHalfscreenPromo), nullptr},
235 {"Show full screen ui", kDefaultBrowserVideoFullscreenPromo,
236 std::size(kDefaultBrowserVideoFullscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01237};
238
adamta37c6b832023-03-10 20:04:09239// Uses int values from SigninPromoViewStyle enum.
240const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
241 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09242const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59243 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09244const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59245 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47246
Mohammad Refaatab6bee62022-05-16 16:31:15247const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09248 {"Standard", kDiscoverFeedTopSyncPromoStandard,
249 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09250 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
251 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
252 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
253 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15254
Guillem Perez40086ef2023-11-20 20:03:52255const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
256 {kContentPushNotificationsExperimentType, "1"}};
257const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
258 {{kContentPushNotificationsExperimentType, "2"}};
Guillem Perez222b5b22024-01-20 02:16:27259const FeatureEntry::FeatureParam kContentPushNotificationsEnabledProvisional[] =
260 {{kContentPushNotificationsExperimentType, "3"}};
Guillem Perez749b3fc2024-02-13 19:29:49261// TODO(b/322348322): Remove provisional notifications bypass conditions testing
262// flag param.
263const FeatureEntry::FeatureParam
264 kContentPushNotificationsEnabledProvisionalBypass[] = {
265 {kContentPushNotificationsExperimentType, "4"}};
Guillem Perez40086ef2023-11-20 20:03:52266
267const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
268 {"Promo", kContentPushNotificationsEnabledPromo,
269 std::size(kContentPushNotificationsEnabledPromo), nullptr},
270 {"Set up list", kContentPushNotificationsEnabledSetupLists,
Guillem Perez222b5b22024-01-20 02:16:27271 std::size(kContentPushNotificationsEnabledSetupLists), nullptr},
272 {"Provisional Notification", kContentPushNotificationsEnabledProvisional,
Guillem Perez749b3fc2024-02-13 19:29:49273 std::size(kContentPushNotificationsEnabledProvisional), nullptr},
274 {"Provisional Ignore Conditions",
275 kContentPushNotificationsEnabledProvisionalBypass,
276 std::size(kContentPushNotificationsEnabledProvisionalBypass), nullptr}};
Guillem Perez40086ef2023-11-20 20:03:52277
adamta4a6f2fd22023-02-13 17:37:14278const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
279 {kDisableStickyHeaderForFollowingFeed, "true"}};
280const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18281 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14282const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
283 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18284 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14285
286const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
287 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
288 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
289 {"Reduced header height", kFeedHeaderSettingReducedHeight,
290 std::size(kFeedHeaderSettingReducedHeight), nullptr},
291 {"All improvements", kFeedHeaderSettingAllImprovements,
292 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
293
Chris Ludca9ce32023-09-20 16:53:50294const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35295 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50296const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35297 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08298
gogerald0e39e3aa2021-02-10 18:41:23299const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50300 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
301 std::size(kStartSurfaceTenSeconds), nullptr},
302 {"1h:Show Home Surface", kStartSurfaceOneHour,
303 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08304};
gogerald0e39e3aa2021-02-10 18:41:23305
Chris Luce928eb2023-05-12 21:36:26306const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
307 {kMagicStackMostVisitedModuleParam, "true"},
308 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22309const FeatureEntry::FeatureParam
310 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
311 {kMagicStackMostVisitedModuleParam, "true"},
312 {kReducedSpaceParam, "-80"},
313 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13314const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26315 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13316 {kReducedSpaceParam, "20"}};
317const FeatureEntry::FeatureParam
318 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
319 {kMagicStackMostVisitedModuleParam, "false"},
320 {kReducedSpaceParam, "20"},
321 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26322
323const FeatureEntry::FeatureVariation kMagicStackVariations[]{
324 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
325 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22326 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
327 kMagicStackMostVisitedModuleHideIrrelevantModules,
328 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13329 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
330 std::size(kMagicStackReducedNTPTopSpace), nullptr},
331 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
332 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
333 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26334};
335
Chris Lu6fd4eaf2023-08-08 18:29:30336const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
337 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
338
339const FeatureEntry::FeatureVariation
340 kSegmentationPlatformIosModuleRankerVariations[]{
341 {"Enabled With Default Model Parameter (Must Set this!)",
342 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
343 };
344
Scott Yoderaf2bdf32024-01-30 20:26:15345const FeatureEntry::FeatureParam kIOSTipsNotifications5SecondTrigger[] = {
346 {kIOSTipsNotificationsTriggerTimeParam, "5s"},
347};
348const FeatureEntry::FeatureParam kIOSTipsNotifications10SecondTrigger[] = {
349 {kIOSTipsNotificationsTriggerTimeParam, "10s"},
350};
Scott Yoderd2dbc87f2024-03-07 18:23:37351const FeatureEntry::FeatureParam kIOSTipsNotifications30SecondTrigger[] = {
352 {kIOSTipsNotificationsTriggerTimeParam, "30s"},
353};
Scott Yoderaf2bdf32024-01-30 20:26:15354const FeatureEntry::FeatureVariation kIOSTipsNotificationsVariations[] = {
355 {"(5s trigger)", kIOSTipsNotifications5SecondTrigger,
356 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
357 {"(10s trigger)", kIOSTipsNotifications10SecondTrigger,
358 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
Scott Yoderd2dbc87f2024-03-07 18:23:37359 {"(30s trigger)", kIOSTipsNotifications30SecondTrigger,
360 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
Scott Yoderaf2bdf32024-01-30 20:26:15361};
362
Ed Chin91e44992022-07-27 13:42:34363#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26364// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01365const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04366 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
367 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01368 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04369 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01370const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04371 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
372 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01373 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04374 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01375const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04376 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
377 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01378 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04379 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01380const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04381 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
382 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01383 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04384 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01385const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04386 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
387 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01388 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
389 {kBackgroundRefreshIntervalInSeconds, "0"}};
390const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04391 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
392 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01393 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
394 {kBackgroundRefreshIntervalInSeconds, "0"}};
395const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
396 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
397 {kEnableRecurringBackgroundRefreshSchedule, "false"},
398 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
399 {kBackgroundRefreshIntervalInSeconds, "0"}};
400const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
401 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
402 {kEnableRecurringBackgroundRefreshSchedule, "true"},
403 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
404 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04405
Ed Chin178ec2a2023-02-10 22:21:26406// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04407const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01408 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
409 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
410 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
411 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
412 {"1hr Interval 1hr Max Age Recurring",
413 kOneHourIntervalOneHourMaxAgeRecurring,
414 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
415 {"4hr Interval 6hr Max Age Recurring",
416 kFourHourIntervalSixHourMaxAgeRecurring,
417 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
418 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
419 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
420 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
421 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
422 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
423 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
424 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
425 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04426};
Ed Chin91e44992022-07-27 13:42:34427#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04428
Raj T18a2c8c2023-03-15 17:20:15429const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
430 {"date", "true"}};
431const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
432 {"address", "true"}};
433const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
434 {"phonenumber", "true"}};
435const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
436 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50437const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
438 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15439const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
440 {"date", "true"},
441 {"address", "true"},
442 {"phonenumber", "true"},
443 {"email", "true"}};
444const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
445 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
446 std::size(kEnableExpKitTextClassifierAll), nullptr},
447 {"Enabled for date", kEnableExpKitTextClassifierDate,
448 std::size(kEnableExpKitTextClassifierDate), nullptr},
449 {"Enabled for address", kEnableExpKitTextClassifierAddress,
450 std::size(kEnableExpKitTextClassifierAddress), nullptr},
451 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
452 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
453 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50454 std::size(kEnableExpKitTextClassifierEmail), nullptr},
455 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
456 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15457
Louis Romero93e9b50a2023-01-26 01:46:12458const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
459 {kTabInactivityThresholdParameterName,
460 kTabInactivityThresholdOneWeekParam}};
461const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
462 {kTabInactivityThresholdParameterName,
463 kTabInactivityThresholdTwoWeeksParam}};
464const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
465 {kTabInactivityThresholdParameterName,
466 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58467const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
468 {kTabInactivityThresholdParameterName,
469 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12470
471const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
472 {"One week", kTabInactivityThresholdOneWeek,
473 std::size(kTabInactivityThresholdOneWeek), nullptr},
474 {"Two weeks", kTabInactivityThresholdTwoWeeks,
475 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
476 {"Three weeks", kTabInactivityThresholdThreeWeeks,
477 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58478 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
479 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12480};
481
Ewann Pelle6eecb8f2023-06-23 14:31:37482const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
483 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
484const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
485 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
486const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
487 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55488const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
489 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37490
491const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
492 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00493 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37494 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00495 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37496 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00497 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55498 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
499 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00500};
501
502const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
503 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
504const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
505 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48506const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
507 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00508
509const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
510 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
511 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48512 {"Most recent tab and last synced tab (12 hours threshold)",
513 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
514 {"Most recent tab and last synced tab (24 hours threshold)",
515 kTabResumptionAllTabsOneDayThreshold,
516 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37517};
518
Olivier ROBINfd3887b72023-02-23 14:45:42519const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
520 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44521const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
522 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42523const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
524 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44525 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
526 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
527 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42528
Olivier ROBIN2613bcd02023-04-20 10:00:47529const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
530 {kIOSEditMenuSearchWithTitleParamTitle,
531 kIOSEditMenuSearchWithTitleSearchWithParam}};
532const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
533 {kIOSEditMenuSearchWithTitleParamTitle,
534 kIOSEditMenuSearchWithTitleSearchParam}};
535const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
536 {kIOSEditMenuSearchWithTitleParamTitle,
537 kIOSEditMenuSearchWithTitleWebSearchParam}};
538const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
539 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
540 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
541 {"Search", kIOSEditMenuSearchWithTitleSearch,
542 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
543 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
544 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
545};
546
Hira Mahmood6b0e5502023-06-12 21:51:43547const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
548 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
549const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
550 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
551const FeatureEntry::FeatureVariation
552 kPostRestoreDefaultBrowserPromoVariations[] = {
553 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
554 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
555 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
556 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
557};
558
Christian Xu07d600192023-07-24 12:29:52559const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
560 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
561const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
562 {kBottomOmniboxDefaultSettingParam,
563 kBottomOmniboxDefaultSettingParamBottom}};
564const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
565 {{kBottomOmniboxDefaultSettingParam,
566 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
567const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
568 {
569 {"Top", kBottomOmniboxDefaultSettingTop,
570 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
571 {"Bottom", kBottomOmniboxDefaultSettingBottom,
572 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
573 {"Bottom for Safari Switcher",
574 kBottomOmniboxDefaultSettingSafariSwitcher,
575 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
576};
577
Christian Xue72882d2023-11-20 17:10:48578const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
579 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
580const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
581 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
582 nullptr},
583};
584
Christian Xua3667352023-11-21 16:54:09585const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
586 {kBottomOmniboxPromoDefaultPositionParam,
587 kBottomOmniboxPromoDefaultPositionParamTop}};
588const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
589 {kBottomOmniboxPromoDefaultPositionParam,
590 kBottomOmniboxPromoDefaultPositionParamBottom}};
591const FeatureEntry::FeatureVariation
592 kBottomOmniboxPromoDefaultPositionVariations[] = {
593 {"Top", kBottomOmniboxPromoDefaultPositionTop,
594 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
595 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
596 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
597};
598
Marc Treib9bddebb2023-06-15 14:03:34599const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
600 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25601 {"Disabled", "disable-features",
602 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24603 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02604 "FeedBottomSyncStringRemoval,"
605 "SyncEnableContactInfoDataTypeInTransportMode,"
606 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
607 "SyncEnableBatchUploadLocalData,"
608 "SyncEnableWalletMetadataInTransportMode,"
609 "SyncEnableWalletOfferInTransportMode,"
610 "IOSPasswordSettingsBulkUploadLocalPasswords"},
611 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34612 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24613 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25614 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34615 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37616 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55617 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06618 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06619 "SyncEnableWalletOfferInTransportMode,"
620 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02621 {"Enabled with fast-follows", "enable-features",
622 "ReplaceSyncPromosWithSignInPromos,"
623 "ConsistencyNewAccountInterface,"
624 "FeedBottomSyncStringRemoval,"
625 "SyncEnableContactInfoDataTypeInTransportMode,"
626 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
627 "SyncEnableBatchUploadLocalData,"
628 "SyncEnableWalletMetadataInTransportMode,"
629 "SyncEnableWalletOfferInTransportMode,"
630 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33631 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07632 "EnableBatchUploadFromBookmarksManager,"
Jood Hajeerf1f3e8d2023-12-20 13:35:55633 "EnableReviewAccountSettingsPromo,"
634 "LinkAccountSettingsToPrivacyFooter,"
635 "IPH_iOSReplaceSyncPromosWithSignInPromos"},
Marc Treib9bddebb2023-06-15 14:03:34636};
637
Olivier ROBIN82b67002023-07-31 14:34:46638const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
639 {web::features::kOneTapForMapsConsentModeParamTitle,
640 web::features::kOneTapForMapsConsentModeDefaultParam}};
641const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
642 {web::features::kOneTapForMapsConsentModeParamTitle,
643 web::features::kOneTapForMapsConsentModeForcedParam}};
644const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
645 {web::features::kOneTapForMapsConsentModeParamTitle,
646 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31647const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
648 {web::features::kOneTapForMapsConsentModeParamTitle,
649 web::features::kOneTapForMapsConsentModeIPHParam}};
650const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
651 {web::features::kOneTapForMapsConsentModeParamTitle,
652 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46653const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
654 {"Consent Default", kOneTapForMapsConsentModeDefault,
655 std::size(kOneTapForMapsConsentModeDefault), nullptr},
656 {"Consent Forced", kOneTapForMapsConsentModeForced,
657 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31658 {"Consent IPH", kOneTapForMapsConsentModeIPH,
659 std::size(kOneTapForMapsConsentModeIPH), nullptr},
660 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
661 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46662 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
663 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
664};
665
Stepan Khapuginec68d5bb2023-10-16 13:35:25666constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
667 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19668 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25669constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
670 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19671 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25672constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
673 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19674 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25675constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
676 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19677 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25678
679constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
680 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
681 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
682 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
683 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
684 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
685 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
686 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
687 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
688};
689
Rafał Godlewskie75d12402023-10-25 15:31:53690const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
691 {"Default", "", ""},
692 {"Bootstraping Only", switches::kEnableFeatures,
693 "SharingOfferKeyPairBootstrap"},
694 {"Enabled", switches::kEnableFeatures,
695 "SharingOfferKeyPairBootstrap,SendPasswords,"
696 "PasswordManagerEnableSenderService,"
697 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
698};
699
Scott Yoderd781bd12023-10-25 20:47:15700const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
701 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
702const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
703 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
704 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
705};
706
Matt Jones79534392023-10-27 14:35:02707const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
708 {{commerce::kParcelTrackingTestDataParam,
709 commerce::kParcelTrackingTestDataParamDelivered}};
710const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
711 {{commerce::kParcelTrackingTestDataParam,
712 commerce::kParcelTrackingTestDataParamInProgress}};
713const flags_ui::FeatureEntry::FeatureParam
714 kParcelTrackingTestDataOutForDelivery[] = {
715 {commerce::kParcelTrackingTestDataParam,
716 commerce::kParcelTrackingTestDataParamOutForDelivery}};
717const flags_ui::FeatureEntry::FeatureVariation
718 kParcelTrackingTestDataVariations[] = {
719 {"Delivered", kParcelTrackingTestDataDelivered,
720 std::size(kParcelTrackingTestDataDelivered), nullptr},
721 {"In progress", kParcelTrackingTestDataInProgress,
722 std::size(kParcelTrackingTestDataInProgress), nullptr},
723 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
724 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
725};
726
Benjamin Williams1dc8f2342024-01-04 21:25:55727const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
728 {kIOSDockingPromoExperimentType, "0"}};
729const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
730 {kIOSDockingPromoExperimentType, "1"}};
731const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
732 {kIOSDockingPromoExperimentType, "2"}};
733
734const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
735 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
736 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
737 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
738 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
739 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
740 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
741
Ewann Pellec8634ab2024-02-23 16:50:35742const FeatureEntry::FeatureParam kModernTabStripNTBDynamic[] = {
743 {kModernTabStripParameterName, kModernTabStripNTBDynamicParam}};
744const FeatureEntry::FeatureParam kModernTabStripNTBStatic[] = {
745 {kModernTabStripParameterName, kModernTabStripNTBStaticParam}};
746
747const FeatureEntry::FeatureVariation kModernTabStripVariations[] = {
748 {"New tab button dynamic", kModernTabStripNTBDynamic,
749 std::size(kModernTabStripNTBDynamic), nullptr},
750 {"New tab button static", kModernTabStripNTBStatic,
751 std::size(kModernTabStripNTBStatic), nullptr},
752};
753
Cooper Knaak1e026562017-07-26 05:22:28754// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21755// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28756// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
757// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21758// macro for this type supplying the command line to the macro.
759// . MULTI_VALUE: a list of choices, the first of which should correspond to a
760// deactivated state for this lab (i.e. no command line option). To specify
761// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
762// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28763// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
764// either enabled, disabled, or uses the default value of the associated
765// base::Feature instance. To specify this type of entry use the macro
766// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
767// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
768// base::Feature instance. Choices corresponding to the default state, a
769// universally enabled state, and a universally disabled state are
770// automatically included. To specify this type of entry use the macro
771// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
772// the array of choices.
773//
sdefresne14900ee2015-11-27 14:43:21774// See the documentation of FeatureEntry for details on the fields.
775//
776// When adding a new choice, add it to the end of the list.
777const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28778 {"in-product-help-demo-mode-choice",
779 flag_descriptions::kInProductHelpDemoModeName,
780 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
781 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23782 feature_engagement::kIPHDemoMode,
783 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09784 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22785 {"enable-autofill-credit-card-upload",
786 flag_descriptions::kAutofillCreditCardUploadName,
787 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24788 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23789 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
790 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
791 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51792 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23793 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
794 {"wallet-service-use-sandbox",
795 flag_descriptions::kWalletServiceUseSandboxName,
796 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
797 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
798 autofill::switches::kWalletServiceUseSandbox,
799 "1",
800 autofill::switches::kWalletServiceUseSandbox,
801 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59802 {"show-autofill-type-predictions",
803 flag_descriptions::kShowAutofillTypePredictionsName,
804 flag_descriptions::kShowAutofillTypePredictionsDescription,
805 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50806 FEATURE_VALUE_TYPE(
807 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05808 {"fullscreen-promos-manager-skip-internal-limits",
809 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
810 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
811 flags_ui::kOsIos,
812 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14813 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53814 flag_descriptions::kFullscreenSmoothScrollingName,
815 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19816 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06817 {"webpage-default-zoom-from-dynamic-type",
818 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
819 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
820 flags_ui::kOsIos,
821 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56822 {"webpage-alternative-text-zoom",
823 flag_descriptions::kWebPageAlternativeTextZoomName,
824 flag_descriptions::kWebPageAlternativeTextZoomDescription,
825 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34826 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
827 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
828 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13829 {"omnibox-ui-max-autocomplete-matches",
830 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
831 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
832 flags_ui::kOsIos,
833 FEATURE_WITH_PARAMS_VALUE_TYPE(
834 omnibox::kUIExperimentMaxAutocompleteMatches,
835 kOmniboxUIMaxAutocompleteMatchesVariations,
836 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35837 {"omnibox-local-history-zero-suggest-beyond-ntp",
838 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
839 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
840 flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54842 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
843 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
844 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
845 kOmniboxMaxZPSMatchesVariations,
846 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25847 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
848 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
849 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
850 kOmniboxInspireMeVariants,
851 "OmniboxBundledExperimentV1")},
852 {"omnibox-inspire-me-signed-out",
853 flag_descriptions::kOmniboxInspireMeSignedOutName,
854 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
855 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48856 {"force-startup-signin-promo",
857 flag_descriptions::kForceStartupSigninPromoName,
858 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29859 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41860 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
861 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
862 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13863#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45864 {"screen-time-integration-ios",
865 flag_descriptions::kScreenTimeIntegrationName,
866 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
867 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13868#endif
Nazerke3e993f72020-09-21 13:00:06869 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
870 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
Ewann Pellec8634ab2024-02-23 16:50:35871 FEATURE_WITH_PARAMS_VALUE_TYPE(kModernTabStrip,
872 kModernTabStripVariations,
873 "ModernTabStrip")},
Cheick Cisse76ade3d2020-12-16 00:15:11874 {"ios-shared-highlighting-color-change",
875 flag_descriptions::kIOSSharedHighlightingColorChangeName,
876 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07877 flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34879 {"ios-shared-highlighting-v2",
880 flag_descriptions::kIOSSharedHighlightingV2Name,
881 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
882 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51883 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
884 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
Scott Yoderaf2bdf32024-01-30 20:26:15885 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSTipsNotifications,
886 kIOSTipsNotificationsVariations,
887 "IOSTipsNotifications")},
Stepan Khapugin04341202021-01-07 12:22:45888 {"omnibox-new-textfield-implementation",
889 flag_descriptions::kOmniboxNewImplementationName,
890 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
891 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19892 {"start-surface", flag_descriptions::kStartSurfaceName,
893 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23894 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
895 kStartSurfaceVariations,
896 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19897 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
898 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
899 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34900 {"wait-threshold-seconds-for-capabilities-api",
901 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
902 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
903 flags_ui::kOsIos,
904 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Guillem Perez49e1df42023-08-23 22:15:24905 {"content-push-notifications",
906 flag_descriptions::kContentPushNotificationsName,
907 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52908 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
909 kContentPushNotificationsVariations,
910 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57911 {"overflow-menu-customization",
912 flag_descriptions::kOverflowMenuCustomizationName,
913 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
914 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44915 {"enable-lens-in-omnibox-copied-image",
916 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
917 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
918 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40919 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23920 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
921 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40922 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23923 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03924 {"enable-disco-feed-endpoint",
925 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
926 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
927 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11928 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15929 {"enable-discover-feed-top-sync-promo",
930 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
931 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
932 flags_ui::kOsIos,
933 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
934 kDiscoverFeedTopSyncPromoVariations,
935 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14936 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
937 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
938 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
939 kFeedHeaderSettingsVariations,
940 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28941 {"shared-highlighting-amp",
942 flag_descriptions::kIOSSharedHighlightingAmpName,
943 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
944 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28945 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42946 commerce::flag_descriptions::kCommercePriceTrackingName,
947 commerce::flag_descriptions::kCommercePriceTrackingDescription,
948 flags_ui::kOsIos,
949 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
950 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15951 "CommercePriceTracking")},
Matt Jones2e47b9692024-02-23 21:56:43952 {"track-by-default-mobile",
953 commerce::flag_descriptions::kTrackByDefaultOnMobileName,
954 commerce::flag_descriptions::kTrackByDefaultOnMobileDescription,
955 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kTrackByDefaultOnMobile)},
adamta250f4ad2023-08-02 15:26:06956 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
957 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
958 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54959 {"ntp-view-hierarchy-repair",
960 flag_descriptions::kNTPViewHierarchyRepairName,
961 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20962 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Mikel Astiz26795352024-03-15 08:51:10963 {"unified-bookmark-model", flag_descriptions::kUnifiedBookmarkModelName,
964 flag_descriptions::kUnifiedBookmarkModelDescription, flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(syncer::kEnableBookmarkFoldersForAccountStorage)},
Cheick Cisse7c03928d2024-03-11 23:27:38966 {"price-insights-ios", commerce::flag_descriptions::kPriceInsightsIosName,
967 commerce::flag_descriptions::kPriceInsightsIosDescription,
968 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kPriceInsightsIos)},
Vishwas Uppoor89303a92022-08-03 00:56:26969 {"autofill-enable-card-product-name",
970 flag_descriptions::kAutofillEnableCardProductNameName,
971 flag_descriptions::kAutofillEnableCardProductNameDescription,
972 flags_ui::kOsIos,
973 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52974 {"enable-download-service-foreground-session",
975 flag_descriptions::kDownloadServiceForegroundSessionName,
976 flag_descriptions::kDownloadServiceForegroundSessionDescription,
977 flags_ui::kOsIos,
978 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23979 {"enable-tflite-language-detection",
980 flag_descriptions::kTFLiteLanguageDetectionName,
981 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
982 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20983 {"optimization-guide-debug-logs",
984 flag_descriptions::kOptimizationGuideDebugLogsName,
985 flag_descriptions::kOptimizationGuideDebugLogsDescription,
986 flags_ui::kOsIos,
987 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55988 {"optimization-guide-push-notifications",
989 flag_descriptions::kOptimizationGuidePushNotificationClientName,
990 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
991 flags_ui::kOsIos,
992 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25993 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
994 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
995 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01996 {"suggestions-scrolling-ipad",
997 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
998 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
999 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001000 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1001 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jeanad303a92023-07-31 16:58:111003 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
1004 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
1005 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:221006 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
1007 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
1008 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
Raj T7db7a0e2022-11-17 16:33:081009 {"enable-expkit-text-classifier",
1010 flag_descriptions::kEnableExpKitTextClassifierName,
1011 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151012 flags_ui::kOsIos,
1013 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1014 kEnableExpKitTextClassifierVariations,
1015 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331016 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1017 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461018 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1019 kOneTapForMapsWithVariations,
1020 "OneTapForMaps")},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251021 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1022 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1023 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301024 {"autofill-enable-ranking-formula-address-profiles",
1025 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1026 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1027 flags_ui::kOsIos,
1028 FEATURE_VALUE_TYPE(
1029 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391030 {"autofill-enable-ranking-formula-credit-cards",
1031 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1032 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1033 flags_ui::kOsIos,
1034 FEATURE_VALUE_TYPE(
1035 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021036 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1037 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1038 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521039 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1040 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261041 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1042 kMagicStackVariations,
1043 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211044 {"ios-hide-feed-with-search-choice",
1045 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1046 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151047 flags_ui::kOsIos,
1048 FEATURE_WITH_PARAMS_VALUE_TYPE(
1049 kIOSHideFeedWithSearchChoice,
1050 kIOSHideFeedWithSearchChoiceVariations,
1051 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311052 {"ios-keyboard-accessory-upgrade",
1053 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1054 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1055 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261056 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1057 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1058 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291059 {"ios-magic-stack-segmentation-ranking",
1060 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1061 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1062 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301063 FEATURE_WITH_PARAMS_VALUE_TYPE(
1064 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1065 kSegmentationPlatformIosModuleRankerVariations,
1066 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061067 {"default-browser-intents-show-settings",
1068 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1069 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1070 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321071 {"ios-password-bottom-sheet",
1072 flag_descriptions::kIOSPasswordBottomSheetName,
1073 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1074 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281075 {"ios-password-bottom-sheet-autofocus",
1076 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1077 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1078 flags_ui::kOsIos,
1079 FEATURE_VALUE_TYPE(
1080 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Moe Ahmadi098519d82022-07-27 18:34:241081 {"omnibox-zero-suggest-prefetching",
1082 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1083 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1084 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451085 {"omnibox-zero-suggest-prefetching-on-srp",
1086 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1087 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1088 flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1090 {"omnibox-zero-suggest-prefetching-on-web",
1091 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1092 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1093 flags_ui::kOsIos,
1094 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471095 {"omnibox-zero-suggest-in-memory-caching",
1096 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1097 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1098 flags_ui::kOsIos,
1099 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351100 {"omnibox-on-device-tail-suggestions",
1101 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1102 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1103 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361104 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1105 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1106 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1107 kOmniboxMaxURLMatchesVariations,
1108 "OmniboxMaxURLMatches")},
Stepan Khapugin1f83c5ae2024-01-31 15:55:201109 {"omnibox-most-visited-tiles-horizontal-render-group",
1110 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupName,
1111 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupDescription,
1112 flags_ui::kOsIos,
1113 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTilesHorizontalRenderGroup)},
Olivier Robin60d3a062022-07-06 17:34:061114 {"metrickit-non-crash-reports",
1115 flag_descriptions::kMetrickitNonCrashReportName,
1116 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1117 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371118 {"autofill-enable-remade-downstream-metrics",
1119 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1120 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1121 flags_ui::kOsIos,
1122 FEATURE_VALUE_TYPE(
1123 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551124 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1125 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1126 flag_descriptions::
1127 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1128 flags_ui::kOsIos,
1129 FEATURE_VALUE_TYPE(
1130 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011131 {"default-browser-video-promo",
1132 flag_descriptions::kDefaultBrowserVideoPromoName,
1133 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1134 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1135 kDefaultBrowserVideoPromoVariations,
1136 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541137 {"default-browser-promo-force-show-promo",
1138 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1139 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1140 flags_ui::kOsIos,
1141 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171142 {"default-browser-promo-trigger-criteria-experiment",
1143 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1144 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1145 flags_ui::kOsIos,
Gayane Petrosyan01f711782024-02-21 23:00:211146 FEATURE_VALUE_TYPE(
1147 feature_engagement::kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441148 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211149 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1150 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1151 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Ed Chin91e44992022-07-27 13:42:341152#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1153 {"feed-background-refresh-ios",
1154 flag_descriptions::kFeedBackgroundRefreshName,
1155 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1156 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1157 kFeedBackgroundRefreshVariations,
1158 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261159#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191160 {"omnibox-keyboard-paste-button",
1161 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1162 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1163 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501164 {"enable-tflite-language-detection-ignore",
1165 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1166 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1167 flags_ui::kOsIos,
1168 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571169 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1170 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1171 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Daniel Whiteae1cb672022-12-14 18:25:251172 {"iph-price-notifications-while-browsing",
1173 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1174 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1175 flags_ui::kOsIos,
1176 FEATURE_VALUE_TYPE(
1177 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501178 {"autofill-suggest-server-card-instead-of-local-card",
1179 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1180 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1181 flags_ui::kOsIos,
1182 FEATURE_VALUE_TYPE(
1183 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Ewann Pelledec2d042023-01-25 15:28:391184 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1185 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1186 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481187 {"local-pdp-detection",
1188 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1189 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1190 flags_ui::kOsIos,
1191 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121192 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1193 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1194 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1195 kTabInactivityThresholdVariations,
1196 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181197 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1198 flag_descriptions::
1199 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1200 flag_descriptions::
1201 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1202 flags_ui::kOsIos,
1203 FEATURE_VALUE_TYPE(
1204 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361205 {"enable-friendlier-safe-browsing-settings-standard-protection",
1206 flag_descriptions::
1207 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1208 flag_descriptions::
1209 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521210 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361211 FEATURE_VALUE_TYPE(
1212 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291213 {"enable-red-interstitial-facelift",
1214 flag_descriptions::kEnableRedInterstitialFaceliftName,
1215 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1216 flags_ui::kOsIos,
1217 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421218 {"ios-edit-menu-partial-translate",
1219 flag_descriptions::kIOSEditMenuPartialTranslateName,
1220 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421221 flags_ui::kOsIos,
1222 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1223 kIOSEditMenuPartialTranslateVariations,
1224 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431225 {"notification-settings-menu-item",
1226 flag_descriptions::kNotificationSettingsMenuItemName,
1227 flag_descriptions::kNotificationSettingsMenuItemDescription,
1228 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061229 {"spotlight-reading-list-source",
1230 flag_descriptions::kSpotlightReadingListSourceName,
1231 flag_descriptions::kSpotlightReadingListSourceDescription,
1232 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481233 {"enable-policy-test-page-ios",
1234 flag_descriptions::kEnablePolicyTestPageName,
1235 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531237 {"web-feed-feedback-reroute",
1238 flag_descriptions::kWebFeedFeedbackRerouteName,
1239 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1240 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551241 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1242 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1243 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431244 {"enable-follow-IPH-exp-params",
1245 flag_descriptions::kEnableFollowIPHExpParamsName,
1246 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Guillem Perez3c139a822023-05-24 19:34:251248 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1249 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1250 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441251 {"mixed-content-autoupgrade-ios",
1252 flag_descriptions::kMixedContentAutoupgradeName,
1253 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1254 FEATURE_VALUE_TYPE(
1255 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421256 {"enable-preferences-account-storage",
1257 flag_descriptions::kEnablePreferencesAccountStorageName,
1258 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1259 flags_ui::kOsIos,
1260 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201261 {"ios-browser-edit-menu-metrics",
1262 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1263 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1264 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551265 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1266 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1267 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1268 kIOSDockingPromoVariations,
1269 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241270 {"omnibox-grouping-framework-zps",
1271 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1272 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1273 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1274 {"omnibox-grouping-framework-non-zps",
1275 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1276 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1277 flags_ui::kOsIos,
1278 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471279 {"enable-session-serialization-optimizations",
1280 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1281 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1282 flags_ui::kOsIos,
1283 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221284 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391285 {"only-access-clipboard-async",
1286 flag_descriptions::kOnlyAccessClipboardAsyncName,
1287 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1288 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191289 {"omnibox-improved-rtl-suggestions",
1290 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1291 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1292 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471293 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1294 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1295 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1296 kIOSEditMenuSearchWithVariations,
1297 "IOSEditMenuSearchWith")},
1298 {"ios-edit-menu-hide-search-web",
1299 flag_descriptions::kIOSEditMenuHideSearchWebName,
1300 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1301 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171302 {"autofill-enable-card-art-image",
1303 flag_descriptions::kAutofillEnableCardArtImageName,
1304 flag_descriptions::kAutofillEnableCardArtImageDescription,
1305 flags_ui::kOsIos,
1306 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451307 {"enable-signed-out-view-demotion",
1308 flag_descriptions::kEnableSignedOutViewDemotionName,
1309 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1310 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401311 {"enable-startup-latency-improvements",
1312 flag_descriptions::kEnableStartupImprovementsName,
1313 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1314 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251315 {"autofill-use-two-dots-for-last-four-digits",
1316 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1317 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1318 flags_ui::kOsIos,
1319 FEATURE_VALUE_TYPE(
1320 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241321 {"autofill-disable-profile-updates",
1322 flag_descriptions::kAutofillDisableProfileUpdatesName,
1323 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1324 flags_ui::kOsIos,
1325 FEATURE_VALUE_TYPE(
1326 autofill::features::test::kAutofillDisableProfileUpdates)},
1327 {"autofill-disable-silent-profile-updates",
1328 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1329 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1330 flags_ui::kOsIos,
1331 FEATURE_VALUE_TYPE(
1332 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1333 {"autofill-enable-admin-level-2",
1334 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1335 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1336 flags_ui::kOsIos,
1337 FEATURE_VALUE_TYPE(
1338 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1339 {"autofill-enable-between-streets",
1340 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1341 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1342 flags_ui::kOsIos,
1343 FEATURE_VALUE_TYPE(
1344 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1345 {"autofill-enable-landmark",
1346 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1347 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1348 flags_ui::kOsIos,
1349 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431350 {"post-restore-default-browser-promo",
1351 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1352 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1353 flags_ui::kOsIos,
1354 FEATURE_WITH_PARAMS_VALUE_TYPE(
1355 kPostRestoreDefaultBrowserPromo,
1356 kPostRestoreDefaultBrowserPromoVariations,
1357 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311358 {"spotlight-open-tabs-source",
1359 flag_descriptions::kSpotlightOpenTabsSourceName,
1360 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1361 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451362 {"spotlight-donate-new-intents",
1363 flag_descriptions::kSpotlightDonateNewIntentsName,
1364 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1365 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341366 {"replace-sync-promos-with-sign-in-promos",
1367 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1368 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1369 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301370 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571371 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1372 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1373 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371374 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1375 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1376 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1377 kTabPickupThresholdVariations,
1378 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321379 {"ios-iph-for-safari-switcher",
1380 flag_descriptions::kIPHForSafariSwitcherName,
1381 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1382 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071383 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1384 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1385 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011386 {"tab-resumption", flag_descriptions::kTabResumptionName,
1387 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001388 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1389 kTabResumptionVariations,
1390 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521391 {"bottom-omnibox-default-setting",
1392 flag_descriptions::kBottomOmniboxDefaultSettingName,
1393 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1394 flags_ui::kOsIos,
1395 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1396 kBottomOmniboxDefaultSettingVariations,
1397 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131398 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1399 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1400 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
adamta7be73b182023-08-08 22:30:351401 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1402 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1403 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501404 {"ios-password-auth-on-entry-v2",
1405 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1406 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1407 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281408 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1409 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1410 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131411 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1412 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1413 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021414 {"parcel-tracking-test-data",
1415 commerce::flag_descriptions::kParcelTrackingTestDataName,
1416 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1417 flags_ui::kOsIos,
1418 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1419 kParcelTrackingTestDataVariations,
1420 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111421 {"autofill-enable-merchant-domain-in-unmask-card-request",
1422 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1423 flag_descriptions::
1424 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1425 flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(
1427 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331428 {"autofill-update-chrome-settings-link-to-gpay-web",
1429 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1430 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1431 flags_ui::kOsIos,
1432 FEATURE_VALUE_TYPE(
1433 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281434 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1435 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1436 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591437 {"iph-ios-promo-manager-widget-promo",
1438 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1439 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1440 flags_ui::kOsIos,
1441 FEATURE_VALUE_TYPE(
1442 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571443 {"autofill-enable-virtual-cards",
1444 flag_descriptions::kAutofillEnableVirtualCardsName,
1445 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1446 flags_ui::kOsIos,
1447 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Christian Xuf211f632023-10-02 19:07:571448 {"omnibox-shortcuts-database-ios",
1449 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1450 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211451 flags_ui::kOsIos,
1452 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021453 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1454 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1455 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Rubin Deliallisi072bc842023-10-19 12:00:411456 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1457 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1458 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121459 {"sync-session-on-visibility-changed",
1460 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1461 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1462 flags_ui::kOsIos,
1463 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451464 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1465 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1466 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531467 {"password-sharing", flag_descriptions::kPasswordSharingName,
1468 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1469 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511470 {"omnibox-company-entity-icon-adjustment",
1471 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1472 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1473 flags_ui::kOsIos,
1474 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1475 kOmniboxCompanyEntityAdjustmentVariations,
1476 "OmniboxCompanyEntityAdjustment")},
Aliona DANGLA5971a8b2023-11-10 11:55:351477 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1478 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1479 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471480 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1481 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1482 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131483 {"autofill-enable-payments-mandatory-reauth",
1484 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1485 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1486 flags_ui::kOsIos,
1487 FEATURE_VALUE_TYPE(
1488 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231489 {"autofill-enable-card-benefits",
1490 flag_descriptions::kAutofillEnableCardBenefitsName,
1491 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1492 flags_ui::kOsIos,
1493 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vidhan Jain1199e202024-03-15 14:42:591494 {"autofill-enable-dynamically-loading-fields-on-input",
1495 flag_descriptions::
1496 kAutofillEnableDynamicallyLoadingFieldsForAddressInputName,
1497 flag_descriptions::
1498 kAutofillEnableDynamicallyLoadingFieldsForAddressInputDescription,
1499 flags_ui::kOsIos,
1500 FEATURE_VALUE_TYPE(kAutofillDynamicallyLoadsFieldsForAddressInput)},
Vincent Boisselle5af638da2023-11-16 17:38:201501 {"password-manager-signin-uff",
1502 flag_descriptions::kIOSPasswordSignInUffName,
1503 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1504 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011505 {"tab-grid-compositional-layout",
1506 flag_descriptions::kTabGridCompositionalLayoutName,
1507 flag_descriptions::kTabGridCompositionalLayoutDescription,
1508 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411509 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1510 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1511 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481512 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1513 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1514 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1515 kBottomOmniboxPromoVariations,
1516 "BottomOmniboxPromoFRE")},
1517 {"bottom-omnibox-promo-app-launch",
1518 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1519 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1520 flags_ui::kOsIos,
1521 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1522 kBottomOmniboxPromoVariations,
1523 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091524 {"bottom-omnibox-promo-default-position",
1525 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1526 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1527 flags_ui::kOsIos,
1528 FEATURE_WITH_PARAMS_VALUE_TYPE(
1529 kBottomOmniboxPromoDefaultPosition,
1530 kBottomOmniboxPromoDefaultPositionVariations,
1531 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251532 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1533 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1534 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171535 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1536 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1537 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Mike Dougherty330188d52023-12-20 16:33:241538 {"remove-old-web-state-restore",
1539 flag_descriptions::kRemoveOldWebStateRestoreName,
1540 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1541 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031542 {"share-in-web-context-menu-ios",
1543 flag_descriptions::kShareInWebContextMenuIOSName,
1544 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1545 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141546 {"migrate-syncing-user-to-signed-in",
1547 flag_descriptions::kMigrateSyncingUserToSignedInName,
1548 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1549 flags_ui::kOsIos,
1550 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1551 {"undo-migration-of-syncing-user-to-signed-in",
1552 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1553 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1554 flags_ui::kOsIos,
1555 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551556 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1557 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1558 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461559 {"contextual-panel", flag_descriptions::kContextualPanelName,
1560 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1561 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591562 {"omnibox-popup-row-content-configuration",
1563 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1564 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1565 flags_ui::kOsIos,
1566 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391567 {"contextual-panel-force-show-entrypoint",
1568 flag_descriptions::kContextualPanelForceShowEntrypointName,
1569 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1570 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321571 {"bottom-omnibox-promo-region-filter",
1572 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1573 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1574 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471575 {"enable-ipad-feed-ghost-cards",
1576 flag_descriptions::kEnableiPadFeedGhostCardsName,
1577 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1578 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Jood Hajeerbbbf1ac2024-01-26 12:50:451579 {"remember-custom-passphrase-after-signout",
1580 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutName,
1581 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutDescription,
1582 flags_ui::kOsIos,
1583 FEATURE_VALUE_TYPE(syncer::kSyncRememberCustomPassphraseAfterSignout)},
Louis Romerof3144822024-01-30 10:24:161584 {"tab-grid-always-bounce", flag_descriptions::kTabGridAlwaysBounceName,
1585 flag_descriptions::kTabGridAlwaysBounceDescription, flags_ui::kOsIos,
1586 FEATURE_VALUE_TYPE(kTabGridAlwaysBounce)},
Christian Xu11df0ae2024-02-08 16:07:511587 {"omnibox-rich-autocompletion",
1588 flag_descriptions::kOmniboxRichAutocompletionName,
1589 flag_descriptions::kOmniboxRichAutocompletionDescription, flags_ui::kOsIos,
1590 FEATURE_VALUE_TYPE(omnibox::kRichAutocompletion)},
Jason Hud445445f2024-02-02 18:28:121591 {"disable-lens-camera", flag_descriptions::kDisableLensCameraName,
1592 flag_descriptions::kDisableLensCameraDescription, flags_ui::kOsIos,
1593 FEATURE_VALUE_TYPE(kDisableLensCamera)},
Charles Yang30c90b92024-03-08 18:00:591594 {"omnibox-color-icons", flag_descriptions::kOmniboxColorIconsName,
1595 flag_descriptions::kOmniboxColorIconsDescription, flags_ui::kOsIos,
1596 FEATURE_VALUE_TYPE(kOmniboxColorIcons)},
Tomasz Jurkiewicze8ce0292024-02-13 13:06:251597 {"minor-mode-restrictions-for-history-sync-opt-in",
1598 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName,
1599 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription,
1600 flags_ui::kOsIos,
1601 FEATURE_VALUE_TYPE(::switches::kMinorModeRestrictionsForHistorySyncOptIn)},
ginnnnnnnydbaba6e42024-02-13 23:17:251602 {"ios-iph-pull-to-refresh",
1603 flag_descriptions::kIPHiOSPullToRefreshFeatureName,
1604 flag_descriptions::kIPHiOSPullToRefreshFeatureDescription,
1605 flags_ui::kOsIos,
1606 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSPullToRefreshFeature)},
1607 {"ios-iph-swipe-back-forward",
1608 flag_descriptions::kIPHiOSSwipeBackForwardFeatureName,
1609 flag_descriptions::kIPHiOSSwipeBackForwardFeatureDescription,
1610 flags_ui::kOsIos,
1611 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSSwipeBackForwardFeature)},
ginnnnnnny92d90742024-02-16 17:04:241612 {"ios-iph-swipe-toolbar-to-change-tab",
1613 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureName,
1614 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureDescription,
1615 flags_ui::kOsIos,
1616 FEATURE_VALUE_TYPE(
1617 feature_engagement::kIPHiOSSwipeToolbarToChangeTabFeature)},
ginnnnnnnydbaba6e42024-02-13 23:17:251618 {"ios-iph-tab-grid-swipe-right-for-incognito",
1619 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoName,
1620 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoDescription,
1621 flags_ui::kOsIos,
1622 FEATURE_VALUE_TYPE(
1623 feature_engagement::kIPHiOSTabGridSwipeRightForIncognito)},
Chris Lu93a507b2024-02-14 18:41:581624 {"ios-magic-stack-collection-view",
1625 flag_descriptions::kIOSMagicStackCollectionViewName,
1626 flag_descriptions::kIOSMagicStackCollectionViewDescription,
1627 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSMagicStackCollectionView)},
Alexander Tekleeebe42b92024-02-23 21:27:151628 {"autofill-enable-card-benefits-for-american-express",
1629 flag_descriptions::kAutofillEnableCardBenefitsForAmericanExpressName,
1630 flag_descriptions::
1631 kAutofillEnableCardBenefitsForAmericanExpressDescription,
1632 flags_ui::kOsIos,
1633 FEATURE_VALUE_TYPE(
1634 autofill::features::kAutofillEnableCardBenefitsForAmericanExpress)},
1635 {"autofill-enable-card-benefits-for-capital-one",
1636 flag_descriptions::kAutofillEnableCardBenefitsForCapitalOneName,
1637 flag_descriptions::kAutofillEnableCardBenefitsForCapitalOneDescription,
1638 flags_ui::kOsIos,
1639 FEATURE_VALUE_TYPE(
1640 autofill::features::kAutofillEnableCardBenefitsForCapitalOne)},
Yishui Liub88a38c2024-02-28 08:46:551641 {"autofill-enable-card-benefits-sync",
1642 flag_descriptions::kAutofillEnableCardBenefitsSyncName,
1643 flag_descriptions::kAutofillEnableCardBenefitsSyncDescription,
1644 flags_ui::kOsIos,
1645 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefitsSync)},
Rubin Deliallisi4170b1c2024-02-28 16:15:421646 {"linked-services-setting-ios",
1647 flag_descriptions::kLinkedServicesSettingIosName,
1648 flag_descriptions::kLinkedServicesSettingIosDescription, flags_ui::kOsIos,
1649 FEATURE_VALUE_TYPE(kLinkedServicesSettingIos)},
Aliona DANGLA52e69ff2024-02-29 12:22:281650 {"disable-fullscreen-scrolling",
1651 flag_descriptions::kDisableFullscreenScrollingName,
1652 flag_descriptions::kDisableFullscreenScrollingDescription,
1653 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDisableFullscreenScrolling)},
Ernesto Izquierdo Clua7a451b8e2024-03-11 15:01:011654 {"autofill-enable-xhr-submission-detection-ios",
1655 flag_descriptions::kAutofillEnableXHRSubmissionDetectionIOSName,
1656 flag_descriptions::kAutofillEnableXHRSubmissionDetectionIOSDescription,
1657 flags_ui::kOsIos,
1658 FEATURE_VALUE_TYPE(
1659 autofill::features::kAutofillEnableXHRSubmissionDetectionIOS)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301660};
sdefresne14900ee2015-11-27 14:43:211661
Rohit Raobed794c2020-04-27 15:27:451662bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1663 return false;
1664}
1665
1666flags_ui::FlagsState& GetGlobalFlagsState() {
1667 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1668 nullptr);
1669 return *flags_state;
1670}
David Jean5ca263c2021-08-18 09:19:301671// Creates the experimental test policies map, used by AsyncPolicyLoader and
1672// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341673NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211674 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1675
Guillaume Jenkins25e9bd72020-08-27 17:39:061676 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551677 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061678 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551679
Guillaume Jenkins25e9bd72020-08-27 17:39:061680 // Set some sample policy values for testing if EnableSamplePolicies is set to
1681 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401682 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551683 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011684 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1685
Guillaume Jenkinseeb7007c2020-06-25 22:55:401686 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1687
1688 // 2 = Disable all variations
1689 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1690
1691 // 2 = Do not allow any site to show popups
1692 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1693
Tina Wang5abee802020-07-29 23:09:521694 // Set default search engine.
1695 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1696 @YES,
1697 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1698 @"http://www.google.com/search?q={searchTerms}",
1699 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021700 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521701
Tina Wang89068c82020-10-29 15:51:501702 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1703
Gauthier Ambard21b23702021-04-16 16:11:271704 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1705
Tina Wang59d0b7e2020-08-11 04:41:011706 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531707
1708 // 2 = Enhanced safe browsing protection
1709 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1710
1711 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291712
1713 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551714 }];
1715 }
1716
Ewann227a3c02021-04-19 12:04:541717 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041718 NSString* sync_policy_key =
1719 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301720 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541721 }
Ewann227a3c02021-04-19 12:04:541722
Ewann570a6302021-08-17 07:22:421723 // SyncTypesListDisabled policy.
1724 NSString* Sync_types_list_disabled_key =
1725 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1726 NSMutableArray* Sync_types_list_disabled_values =
1727 [[NSMutableArray alloc] init];
1728 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1729 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1730 }
1731 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1732 [Sync_types_list_disabled_values addObject:@"readingList"];
1733 }
1734 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1735 [Sync_types_list_disabled_values addObject:@"preferences"];
1736 }
1737 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1738 [Sync_types_list_disabled_values addObject:@"passwords"];
1739 }
1740 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1741 [Sync_types_list_disabled_values addObject:@"autofill"];
1742 }
1743 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1744 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1745 }
1746 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1747 [Sync_types_list_disabled_values addObject:@"tabs"];
1748 }
1749 if ([Sync_types_list_disabled_values count]) {
1750 [testing_policies addEntriesFromDictionary:@{
1751 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1752 }];
Ewann570a6302021-08-17 07:22:421753 }
1754
Gauthier Ambard073eaa92021-11-22 15:24:131755 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521756 NSString* incognito_policy_key =
1757 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1758 NSInteger incognito_mode_availability =
1759 [defaults integerForKey:incognito_policy_key];
1760 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521761 [testing_policies addEntriesFromDictionary:@{
1762 incognito_policy_key : @(incognito_mode_availability),
1763 }];
1764 }
1765
Ewann40a8f8a2021-07-29 10:01:201766 NSString* restriction_pattern =
1767 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1768 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291769 NSString* restrict_key =
1770 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201771 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291772 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201773 }];
1774 }
1775
Vincent Boisselle19200bc2021-09-01 17:58:251776 // If the sign-in policy is set (not "None"), add the policy key to the list
1777 // of enabled experimental policies, and set the value.
1778 NSString* const kSigninPolicyKey = @"BrowserSignin";
1779 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1780 if (signin_policy_mode) {
1781 // Remove the mode offset that was used to represent the unset policy.
1782 --signin_policy_mode;
1783 DCHECK(signin_policy_mode >= 0);
1784
Vincent Boisselle19200bc2021-09-01 17:58:251785 [testing_policies addEntriesFromDictionary:@{
1786 kSigninPolicyKey : @(signin_policy_mode),
1787 }];
1788 }
1789
Veronique Nguyen9b1044f2022-01-11 14:41:131790 // If the New Tab Page URL is set (not empty) add the value to the list of
1791 // test policies.
1792 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1793 if ([ntp_location length] > 0) {
1794 NSString* ntp_location_key =
1795 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1796 [testing_policies
1797 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571798 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131799 }
1800
Ali Juma9ec36d2b2022-03-28 14:53:121801 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1802 NSString* allow_backups_key =
1803 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1804 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1805 [allowed_experimental_policies addObject:allow_backups_key];
1806 }
1807
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241808 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1809 NSString* password_manager_key =
1810 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1811 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1812 [allowed_experimental_policies addObject:password_manager_key];
1813 }
Vincent Boisselle003569a72023-09-11 16:03:121814
1815 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1816 NSString* user_policy_merge_key =
1817 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1818 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1819 [allowed_experimental_policies addObject:user_policy_merge_key];
1820 }
1821
Arthur Milchiorbb44f5c82023-03-14 16:14:461822 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1823 NSString* managed_bookmarks_key =
1824 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1825 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571826 @"["
1827 // The following gets filtered out from
1828 // the JSON string when parsed.
1829 " {"
1830 " \"toplevel_name\": \"Managed Bookmarks\""
1831 " },"
1832 " {"
1833 " \"name\": \"Google\","
1834 " \"url\": \"google.com\""
1835 " },"
1836 " {"
1837 " \"name\": \"Empty Folder\","
1838 " \"children\": []"
1839 " },"
1840 " {"
1841 " \"name\": \"Big Folder\","
1842 " \"children\": ["
1843 " {"
1844 " \"name\": \"Youtube\","
1845 " \"url\": \"youtube.com\""
1846 " },"
1847 " {"
1848 " \"name\": \"Chromium\","
1849 " \"url\": \"chromium.org\""
1850 " },"
1851 " {"
1852 " \"name\": \"More Stuff\","
1853 " \"children\": ["
1854 " {"
1855 " \"name\": \"Bugs\","
1856 " \"url\": \"crbug.com\""
1857 " }"
1858 " ]"
1859 " }"
1860 " ]"
1861 " }"
1862 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461863 [testing_policies addEntriesFromDictionary:@{
1864 managed_bookmarks_key : managed_bookmarks_value
1865 }];
1866 [allowed_experimental_policies addObject:managed_bookmarks_key];
1867 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241868
Guillaume Jenkins25e9bd72020-08-27 17:39:061869 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1870 // policy.
1871 if ([allowed_experimental_policies count] > 0) {
1872 [testing_policies setValue:allowed_experimental_policies
1873 forKey:base::SysUTF8ToNSString(
1874 policy::key::kEnableExperimentalPolicies)];
1875 }
1876
jlebel2eb40222022-05-06 11:15:421877 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1878 switch ([defaults integerForKey:metrics_reporting_key]) {
1879 case 1:
1880 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131881 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421882 break;
1883 case 2:
1884 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131885 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421886 break;
1887 default:
1888 // Metrics reporting not managed.
1889 break;
1890 }
1891
David Jean6f85d44f2021-08-19 08:08:451892 // Warning: Add new flags to TestingPoliciesHash() below.
1893
David Jean5ca263c2021-08-18 09:19:301894 return testing_policies;
1895}
David Jean6f85d44f2021-08-19 08:08:451896
David Jean5ca263c2021-08-18 09:19:301897} // namespace
1898
Gauthier Ambard02dbf022022-08-23 08:28:471899// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301900void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1901 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1902
1903 // Set the UA flag if UseMobileSafariUA is enabled.
1904 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1905 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1906 // Chrome puts its product token.
1907 int32_t major = 0;
1908 int32_t minor = 0;
1909 int32_t bugfix = 0;
1910 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1911 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1912
1913 command_line->AppendSwitchASCII(switches::kUserAgent,
1914 web::BuildMobileUserAgent(product));
1915 }
1916
1917 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341918 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301919
1920 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1921 // Management to enabled and add the token to the list of policies.
1922 NSString* token_key =
1923 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1924 NSString* token = [defaults stringForKey:token_key];
1925
1926 if ([token length] > 0) {
1927 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1928 [testing_policies setValue:token forKey:token_key];
1929 }
1930
Guillaume Jenkins57606d72020-08-13 17:32:551931 // If some policies were set, commit them to the app's registration defaults.
1932 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401933 NSDictionary* registration_defaults =
1934 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1935 [defaults registerDefaults:registration_defaults];
1936 }
1937
sdefresne14900ee2015-11-27 14:43:211938 // Freeform commandline flags. These are added last, so that any flags added
1939 // earlier in this function take precedence.
1940 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1941 base::CommandLine::StringVector flags;
1942 // Append an empty "program" argument.
1943 flags.push_back("");
1944
1945 // The number of flags corresponds to the number of text fields in
1946 // Experimental.plist.
1947 const int kNumFreeformFlags = 5;
1948 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1949 NSString* key =
1950 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1951 NSString* flag = [defaults stringForKey:key];
1952 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331953 // iOS keyboard replaces -- with —, so undo that.
1954 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1955 withString:@"--"
1956 options:0
1957 range:NSMakeRange(0, 1)];
1958 // To make things easier, allow flags with no dashes by prepending them
1959 // here. This also allows for flags that just have one dash if they
1960 // exist.
1961 if (![flag hasPrefix:@"-"]) {
1962 flag = [@"--" stringByAppendingString:flag];
1963 }
sdefresne14900ee2015-11-27 14:43:211964 flags.push_back(base::SysNSStringToUTF8(flag));
1965 }
1966 }
1967
1968 base::CommandLine temp_command_line(flags);
1969 command_line->AppendArguments(temp_command_line, false);
1970 }
msardafc76f662017-02-24 12:46:281971
justincohendacc85d2017-06-28 23:34:101972 // Populate command line flag for 3rd party keyboard omnibox workaround.
1973 NSString* enableThirdPartyKeyboardWorkaround =
1974 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1975 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1976 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1977 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1978 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1979 }
1980
Sylvain Defresned3cd8d92022-01-18 13:35:081981 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211982}
1983
sdefresne14900ee2015-11-27 14:43:211984void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1985 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181986 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111987 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531988 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211989}
1990
jkrcalbf073372016-07-29 07:21:311991std::vector<std::string> RegisterAllFeatureVariationParameters(
1992 flags_ui::FlagsStorage* flags_storage,
1993 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181994 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1995 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311996}
1997
sdefresne14900ee2015-11-27 14:43:211998void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1999 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:502000 base::Value::List& supported_entries,
2001 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:182002 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:212003 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:512004 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:212005}
2006
2007void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
2008 const std::string& internal_name,
2009 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:182010 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
2011 enable);
sdefresne14900ee2015-11-27 14:43:212012}
2013
2014void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:182015 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:212016}
2017
Nicolas MacBeth972e2592023-02-23 15:22:092018bool IsRestartNeededToCommitChanges() {
2019 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
2020}
2021
sdefresne14900ee2015-11-27 14:43:212022namespace testing {
2023
Elly Fong-Jones323ab1092021-08-23 22:36:312024base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
2025 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:532026 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:212027}
2028
2029} // namespace testing