blob: 0c8f1025270bc28adcba4a721f29e0dc47d2bcf7 [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"
Raj Tc66dd122024-04-01 18:48:3952#import "components/page_content_annotations/core/page_content_annotations_features.h"
Vasilii Sukhanov32b14452023-10-12 17:31:2753#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5754#import "components/password_manager/core/common/password_manager_features.h"
55#import "components/payments/core/features.h"
56#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4057#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5758#import "components/policy/policy_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5759#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3060#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2961#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2562#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5763#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
64#import "components/signin/core/browser/account_reconcilor.h"
65#import "components/signin/ios/browser/features.h"
66#import "components/signin/public/base/signin_switches.h"
67#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1568#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5769#import "components/sync/base/command_line_switches.h"
70#import "components/sync/base/features.h"
71#import "components/sync/base/pref_names.h"
72#import "components/translate/core/browser/translate_prefs.h"
73#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3474#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3075#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5376#import "ios/chrome/browser/crash_report/model/features.h"
Sebsgfcd5b0b2024-04-09 08:18:3277#import "ios/chrome/browser/credential_provider/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1178#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1479#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1780#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5781#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Vincent Boisselle8b321bb2023-11-28 13:58:3182#import "ios/chrome/browser/follow/model/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5883#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
mmrashadd0c7f952023-12-14 13:36:3884#import "ios/chrome/browser/policy/model/policy_util.h"
Stepan Khapugin5694d702024-01-31 13:23:0885#import "ios/chrome/browser/promos_manager/model/features.h"
mmrashadf158cad942023-10-03 09:15:4886#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Sylvain Defresneb81065002024-01-23 10:51:2287#import "ios/chrome/browser/sessions/features.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4688#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3589#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3690#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
91#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2892#import "ios/chrome/browser/text_selection/model/text_selection_util.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"
Filipa Senrabe00cbe2024-04-19 14:21:3398#import "ios/chrome/browser/ui/settings/clear_browsing_data/features.h"
Rubin Deliallisi4170b1c2024-02-28 16:15:4299#import "ios/chrome/browser/ui/settings/google_services/features.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:15100#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:41101#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:19102#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58103#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22104#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57105#import "ios/chrome/grit/ios_strings.h"
106#import "ios/components/security_interstitials/https_only_mode/feature.h"
Daniel White7867261f2024-04-02 19:08:12107#import "ios/components/security_interstitials/safe_browsing/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57108#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
109#import "ios/web/common/features.h"
110#import "ios/web/common/user_agent.h"
111#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21112
Sylvain Defresne9c107082020-10-27 16:39:13113#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48114#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13115#endif
116
sdefresne14900ee2015-11-27 14:43:21117#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57118#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22119#endif
stkhapuginc1be1792016-12-13 14:30:53120
elawrence816f6790e2017-06-16 18:19:28121using flags_ui::FeatureEntry;
122
sdefresne14900ee2015-11-27 14:43:21123namespace {
Emily Starkbafa9062017-12-27 15:22:46124
Nohemi Fernandezc00842a2021-07-26 11:47:34125const FeatureEntry::Choice
126 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
129 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
130 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
131};
132
Cheick Cisse8835611a2023-06-02 21:42:54133// Uses int values from DefaultPromoType enum.
134const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
135 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
136 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
137 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
138 "1"},
139 {"Show tailored made for ios promo",
140 "default-browser-promo-force-show-promo", "2"},
141 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
142 "3"},
143 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
144};
145
Stepan Khapugincc4e9842019-01-23 13:38:13146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
160
161const FeatureEntry::FeatureVariation
162 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
163 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13177
Stepan Khapuginbac467e2022-05-06 21:11:54178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
184
185const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
186 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
187 nullptr},
188 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
189 nullptr},
190 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
191 nullptr},
192};
193
Christian Xucf26d562022-07-06 09:28:36194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
200
201const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
202 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
203 nullptr},
204 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
205 nullptr},
206 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
207 nullptr},
208};
209
Cheick Cissedc49dbe2023-08-09 13:33:52210const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51211 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
212 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
213const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
214 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
215const FeatureEntry::FeatureParam
216 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
217 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
218
219const FeatureEntry::FeatureVariation
220 kOmniboxCompanyEntityAdjustmentVariations[] = {
221 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
222 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
223 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
224 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
225 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
226 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
227};
228
adamta37c6b832023-03-10 20:04:09229// Uses int values from SigninPromoViewStyle enum.
230const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
231 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09232const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59233 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09234const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59235 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47236
Mohammad Refaatab6bee62022-05-16 16:31:15237const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09238 {"Standard", kDiscoverFeedTopSyncPromoStandard,
239 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09240 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
241 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
242 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
243 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15244
Guillem Perez40086ef2023-11-20 20:03:52245const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
246 {kContentPushNotificationsExperimentType, "1"}};
247const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
248 {{kContentPushNotificationsExperimentType, "2"}};
Guillem Perez222b5b22024-01-20 02:16:27249const FeatureEntry::FeatureParam kContentPushNotificationsEnabledProvisional[] =
250 {{kContentPushNotificationsExperimentType, "3"}};
Guillem Perez749b3fc2024-02-13 19:29:49251// TODO(b/322348322): Remove provisional notifications bypass conditions testing
252// flag param.
253const FeatureEntry::FeatureParam
254 kContentPushNotificationsEnabledProvisionalBypass[] = {
255 {kContentPushNotificationsExperimentType, "4"}};
Guillem Perez40086ef2023-11-20 20:03:52256
257const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
258 {"Promo", kContentPushNotificationsEnabledPromo,
259 std::size(kContentPushNotificationsEnabledPromo), nullptr},
260 {"Set up list", kContentPushNotificationsEnabledSetupLists,
Guillem Perez222b5b22024-01-20 02:16:27261 std::size(kContentPushNotificationsEnabledSetupLists), nullptr},
262 {"Provisional Notification", kContentPushNotificationsEnabledProvisional,
Guillem Perez749b3fc2024-02-13 19:29:49263 std::size(kContentPushNotificationsEnabledProvisional), nullptr},
264 {"Provisional Ignore Conditions",
265 kContentPushNotificationsEnabledProvisionalBypass,
266 std::size(kContentPushNotificationsEnabledProvisionalBypass), nullptr}};
Guillem Perez40086ef2023-11-20 20:03:52267
adamta4a6f2fd22023-02-13 17:37:14268const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
269 {kDisableStickyHeaderForFollowingFeed, "true"}};
270const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18271 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14272const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
273 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18274 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14275
276const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
277 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
278 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
279 {"Reduced header height", kFeedHeaderSettingReducedHeight,
280 std::size(kFeedHeaderSettingReducedHeight), nullptr},
281 {"All improvements", kFeedHeaderSettingAllImprovements,
282 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
283
Chris Ludca9ce32023-09-20 16:53:50284const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35285 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50286const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35287 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08288
gogerald0e39e3aa2021-02-10 18:41:23289const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50290 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
291 std::size(kStartSurfaceTenSeconds), nullptr},
292 {"1h:Show Home Surface", kStartSurfaceOneHour,
293 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08294};
gogerald0e39e3aa2021-02-10 18:41:23295
Chris Luce928eb2023-05-12 21:36:26296const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
297 {kMagicStackMostVisitedModuleParam, "true"},
298 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22299const FeatureEntry::FeatureParam
300 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
301 {kMagicStackMostVisitedModuleParam, "true"},
302 {kReducedSpaceParam, "-80"},
303 {kHideIrrelevantModulesParam, "true"}};
Chris Lu8cf8ef82024-03-18 18:30:54304const FeatureEntry::FeatureParam kMagicStackHidIrrelevantModules[] = {
Chris Luce928eb2023-05-12 21:36:26305 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu8cf8ef82024-03-18 18:30:54306 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26307
308const FeatureEntry::FeatureVariation kMagicStackVariations[]{
309 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
310 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22311 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
312 kMagicStackMostVisitedModuleHideIrrelevantModules,
313 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu8cf8ef82024-03-18 18:30:54314 {"Hide irrelevant modules", kMagicStackHidIrrelevantModules,
315 std::size(kMagicStackHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26316};
317
Chris Lu6fd4eaf2023-08-08 18:29:30318const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
319 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
320
321const FeatureEntry::FeatureVariation
322 kSegmentationPlatformIosModuleRankerVariations[]{
323 {"Enabled With Default Model Parameter (Must Set this!)",
324 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
325 };
326
Scott Yoderaf2bdf32024-01-30 20:26:15327const FeatureEntry::FeatureParam kIOSTipsNotifications5SecondTrigger[] = {
328 {kIOSTipsNotificationsTriggerTimeParam, "5s"},
329};
330const FeatureEntry::FeatureParam kIOSTipsNotifications10SecondTrigger[] = {
331 {kIOSTipsNotificationsTriggerTimeParam, "10s"},
332};
Scott Yoderd2dbc87f2024-03-07 18:23:37333const FeatureEntry::FeatureParam kIOSTipsNotifications30SecondTrigger[] = {
334 {kIOSTipsNotificationsTriggerTimeParam, "30s"},
335};
Scott Yoderaf2bdf32024-01-30 20:26:15336const FeatureEntry::FeatureVariation kIOSTipsNotificationsVariations[] = {
337 {"(5s trigger)", kIOSTipsNotifications5SecondTrigger,
338 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
339 {"(10s trigger)", kIOSTipsNotifications10SecondTrigger,
340 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
Scott Yoderd2dbc87f2024-03-07 18:23:37341 {"(30s trigger)", kIOSTipsNotifications30SecondTrigger,
342 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
Scott Yoderaf2bdf32024-01-30 20:26:15343};
344
Ed Chin91e44992022-07-27 13:42:34345#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26346// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01347const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04348 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
349 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01350 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04351 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01352const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04353 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
354 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01355 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04356 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01357const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04358 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
359 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01360 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04361 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01362const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04363 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
364 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01365 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04366 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01367const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04368 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
369 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01370 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
371 {kBackgroundRefreshIntervalInSeconds, "0"}};
372const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04373 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
374 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01375 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
376 {kBackgroundRefreshIntervalInSeconds, "0"}};
377const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
378 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
379 {kEnableRecurringBackgroundRefreshSchedule, "false"},
380 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
381 {kBackgroundRefreshIntervalInSeconds, "0"}};
382const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
383 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
384 {kEnableRecurringBackgroundRefreshSchedule, "true"},
385 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
386 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04387
Ed Chin178ec2a2023-02-10 22:21:26388// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04389const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01390 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
391 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
392 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
393 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
394 {"1hr Interval 1hr Max Age Recurring",
395 kOneHourIntervalOneHourMaxAgeRecurring,
396 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
397 {"4hr Interval 6hr Max Age Recurring",
398 kFourHourIntervalSixHourMaxAgeRecurring,
399 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
400 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
401 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
402 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
403 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
404 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
405 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
406 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
407 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04408};
Ed Chin91e44992022-07-27 13:42:34409#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04410
David Jeanf361ae9d2024-04-09 08:19:47411const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddressOneTap[] = {
412 {kTextClassifierAddressParameterName, "true"}};
413const FeatureEntry::FeatureVariation
414 kEnableExpKitTextClassifierAddressVariations[] = {
415 {"Long-Press and One-Tap", kEnableExpKitTextClassifierAddressOneTap,
416 std::size(kEnableExpKitTextClassifierAddressOneTap), nullptr}};
417
418const FeatureEntry::FeatureParam
419 kEnableExpKitTextClassifierPhoneNumberOneTap[] = {
420 {kTextClassifierPhoneNumberParameterName, "true"}};
421const FeatureEntry::FeatureVariation
422 kEnableExpKitTextClassifierPhoneNumberVariations[] = {
423 {"Long-Press and One-Tap", kEnableExpKitTextClassifierPhoneNumberOneTap,
424 std::size(kEnableExpKitTextClassifierPhoneNumberOneTap), nullptr}};
425
426const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmailOneTap[] = {
427 {kTextClassifierEmailParameterName, "true"}};
428const FeatureEntry::FeatureVariation
429 kEnableExpKitTextClassifierEmailVariations[] = {
430 {"Long-Press and One-Tap", kEnableExpKitTextClassifierEmailOneTap,
431 std::size(kEnableExpKitTextClassifierEmailOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15432
Louis Romero93e9b50a2023-01-26 01:46:12433const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
434 {kTabInactivityThresholdParameterName,
435 kTabInactivityThresholdOneWeekParam}};
436const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
437 {kTabInactivityThresholdParameterName,
438 kTabInactivityThresholdTwoWeeksParam}};
439const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
440 {kTabInactivityThresholdParameterName,
441 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58442const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
443 {kTabInactivityThresholdParameterName,
444 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12445
446const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
447 {"One week", kTabInactivityThresholdOneWeek,
448 std::size(kTabInactivityThresholdOneWeek), nullptr},
449 {"Two weeks", kTabInactivityThresholdTwoWeeks,
450 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
451 {"Three weeks", kTabInactivityThresholdThreeWeeks,
452 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58453 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
454 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12455};
456
Ewann Pelle6eecb8f2023-06-23 14:31:37457const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
458 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
459const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
460 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
461const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
462 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55463const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
464 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37465
466const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
467 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00468 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37469 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00470 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37471 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00472 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55473 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
474 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00475};
476
477const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
478 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
479const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
480 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48481const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
482 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00483
484const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
485 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
486 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48487 {"Most recent tab and last synced tab (12 hours threshold)",
488 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
489 {"Most recent tab and last synced tab (24 hours threshold)",
490 kTabResumptionAllTabsOneDayThreshold,
491 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37492};
493
Olivier ROBINfd3887b72023-02-23 14:45:42494const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
495 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44496const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
497 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42498const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
499 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44500 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
501 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
502 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42503
Olivier ROBIN2613bcd02023-04-20 10:00:47504const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
505 {kIOSEditMenuSearchWithTitleParamTitle,
506 kIOSEditMenuSearchWithTitleSearchWithParam}};
507const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
508 {kIOSEditMenuSearchWithTitleParamTitle,
509 kIOSEditMenuSearchWithTitleSearchParam}};
510const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
511 {kIOSEditMenuSearchWithTitleParamTitle,
512 kIOSEditMenuSearchWithTitleWebSearchParam}};
513const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
514 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
515 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
516 {"Search", kIOSEditMenuSearchWithTitleSearch,
517 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
518 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
519 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
520};
521
Christian Xu07d600192023-07-24 12:29:52522const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
523 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
524const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
525 {kBottomOmniboxDefaultSettingParam,
526 kBottomOmniboxDefaultSettingParamBottom}};
527const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
528 {{kBottomOmniboxDefaultSettingParam,
529 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
530const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
531 {
532 {"Top", kBottomOmniboxDefaultSettingTop,
533 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
534 {"Bottom", kBottomOmniboxDefaultSettingBottom,
535 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
536 {"Bottom for Safari Switcher",
537 kBottomOmniboxDefaultSettingSafariSwitcher,
538 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
539};
540
Christian Xue72882d2023-11-20 17:10:48541const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
542 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
543const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
544 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
545 nullptr},
546};
547
Christian Xua3667352023-11-21 16:54:09548const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
549 {kBottomOmniboxPromoDefaultPositionParam,
550 kBottomOmniboxPromoDefaultPositionParamTop}};
551const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
552 {kBottomOmniboxPromoDefaultPositionParam,
553 kBottomOmniboxPromoDefaultPositionParamBottom}};
554const FeatureEntry::FeatureVariation
555 kBottomOmniboxPromoDefaultPositionVariations[] = {
556 {"Top", kBottomOmniboxPromoDefaultPositionTop,
557 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
558 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
559 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
560};
561
Christian Xu10b84d72024-04-09 17:12:33562const FeatureEntry::FeatureParam kRichAutocompletionImplementationLabel[] = {
563 {kRichAutocompletionParam, kRichAutocompletionParamLabel}};
564const FeatureEntry::FeatureParam kRichAutocompletionImplementationTextField[] =
565 {{kRichAutocompletionParam, kRichAutocompletionParamTextField}};
Christian Xua17f9b72024-04-22 10:22:31566const FeatureEntry::FeatureParam
567 kRichAutocompletionImplementationNoAdditionalText[] = {
568 {kRichAutocompletionParam, kRichAutocompletionParamNoAdditionalText}};
Christian Xu10b84d72024-04-09 17:12:33569const FeatureEntry::FeatureVariation
570 kRichAutocompletionImplementationVariations[] = {
571 {"In Label", kRichAutocompletionImplementationLabel,
572 std::size(kRichAutocompletionImplementationLabel), nullptr},
573 {"In TextField", kRichAutocompletionImplementationTextField,
574 std::size(kRichAutocompletionImplementationTextField), nullptr},
Christian Xua17f9b72024-04-22 10:22:31575 {"No Additional Text",
576 kRichAutocompletionImplementationNoAdditionalText,
577 std::size(kRichAutocompletionImplementationNoAdditionalText), nullptr},
Christian Xu10b84d72024-04-09 17:12:33578};
579
Olivier ROBIN82b67002023-07-31 14:34:46580const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
581 {web::features::kOneTapForMapsConsentModeParamTitle,
582 web::features::kOneTapForMapsConsentModeDefaultParam}};
583const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
584 {web::features::kOneTapForMapsConsentModeParamTitle,
585 web::features::kOneTapForMapsConsentModeForcedParam}};
586const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
587 {web::features::kOneTapForMapsConsentModeParamTitle,
588 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31589const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
590 {web::features::kOneTapForMapsConsentModeParamTitle,
591 web::features::kOneTapForMapsConsentModeIPHParam}};
592const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
593 {web::features::kOneTapForMapsConsentModeParamTitle,
594 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46595const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
596 {"Consent Default", kOneTapForMapsConsentModeDefault,
597 std::size(kOneTapForMapsConsentModeDefault), nullptr},
598 {"Consent Forced", kOneTapForMapsConsentModeForced,
599 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31600 {"Consent IPH", kOneTapForMapsConsentModeIPH,
601 std::size(kOneTapForMapsConsentModeIPH), nullptr},
602 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
603 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46604 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
605 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
606};
607
Rafał Godlewskie75d12402023-10-25 15:31:53608const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
609 {"Default", "", ""},
610 {"Bootstraping Only", switches::kEnableFeatures,
611 "SharingOfferKeyPairBootstrap"},
612 {"Enabled", switches::kEnableFeatures,
613 "SharingOfferKeyPairBootstrap,SendPasswords,"
614 "PasswordManagerEnableSenderService,"
615 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
616};
617
Matt Jones79534392023-10-27 14:35:02618const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
619 {{commerce::kParcelTrackingTestDataParam,
620 commerce::kParcelTrackingTestDataParamDelivered}};
621const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
622 {{commerce::kParcelTrackingTestDataParam,
623 commerce::kParcelTrackingTestDataParamInProgress}};
624const flags_ui::FeatureEntry::FeatureParam
625 kParcelTrackingTestDataOutForDelivery[] = {
626 {commerce::kParcelTrackingTestDataParam,
627 commerce::kParcelTrackingTestDataParamOutForDelivery}};
628const flags_ui::FeatureEntry::FeatureVariation
629 kParcelTrackingTestDataVariations[] = {
630 {"Delivered", kParcelTrackingTestDataDelivered,
631 std::size(kParcelTrackingTestDataDelivered), nullptr},
632 {"In progress", kParcelTrackingTestDataInProgress,
633 std::size(kParcelTrackingTestDataInProgress), nullptr},
634 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
635 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
636};
637
Benjamin Williams1dc8f2342024-01-04 21:25:55638const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
639 {kIOSDockingPromoExperimentType, "0"}};
640const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
641 {kIOSDockingPromoExperimentType, "1"}};
642const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
643 {kIOSDockingPromoExperimentType, "2"}};
644
645const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
646 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
647 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
648 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
649 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
650 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
651 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
652
Ewann Pellec8634ab2024-02-23 16:50:35653const FeatureEntry::FeatureParam kModernTabStripNTBDynamic[] = {
654 {kModernTabStripParameterName, kModernTabStripNTBDynamicParam}};
655const FeatureEntry::FeatureParam kModernTabStripNTBStatic[] = {
656 {kModernTabStripParameterName, kModernTabStripNTBStaticParam}};
657
658const FeatureEntry::FeatureVariation kModernTabStripVariations[] = {
659 {"New tab button dynamic", kModernTabStripNTBDynamic,
660 std::size(kModernTabStripNTBDynamic), nullptr},
661 {"New tab button static", kModernTabStripNTBStatic,
662 std::size(kModernTabStripNTBStatic), nullptr},
663};
664
Cooper Knaak1e026562017-07-26 05:22:28665// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21666// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28667// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
668// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21669// macro for this type supplying the command line to the macro.
670// . MULTI_VALUE: a list of choices, the first of which should correspond to a
671// deactivated state for this lab (i.e. no command line option). To specify
672// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
673// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28674// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
675// either enabled, disabled, or uses the default value of the associated
676// base::Feature instance. To specify this type of entry use the macro
677// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
678// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
679// base::Feature instance. Choices corresponding to the default state, a
680// universally enabled state, and a universally disabled state are
681// automatically included. To specify this type of entry use the macro
682// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
683// the array of choices.
684//
sdefresne14900ee2015-11-27 14:43:21685// See the documentation of FeatureEntry for details on the fields.
686//
687// When adding a new choice, add it to the end of the list.
688const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28689 {"in-product-help-demo-mode-choice",
690 flag_descriptions::kInProductHelpDemoModeName,
691 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
692 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23693 feature_engagement::kIPHDemoMode,
694 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09695 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22696 {"enable-autofill-credit-card-upload",
697 flag_descriptions::kAutofillCreditCardUploadName,
698 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24699 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23700 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
701 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
702 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51703 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23704 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
705 {"wallet-service-use-sandbox",
706 flag_descriptions::kWalletServiceUseSandboxName,
707 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
708 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
709 autofill::switches::kWalletServiceUseSandbox,
710 "1",
711 autofill::switches::kWalletServiceUseSandbox,
712 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59713 {"show-autofill-type-predictions",
714 flag_descriptions::kShowAutofillTypePredictionsName,
715 flag_descriptions::kShowAutofillTypePredictionsDescription,
716 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50717 FEATURE_VALUE_TYPE(
718 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05719 {"fullscreen-promos-manager-skip-internal-limits",
720 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
721 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
722 flags_ui::kOsIos,
723 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14724 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53725 flag_descriptions::kFullscreenSmoothScrollingName,
726 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19727 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06728 {"webpage-default-zoom-from-dynamic-type",
729 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
730 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
731 flags_ui::kOsIos,
732 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56733 {"webpage-alternative-text-zoom",
734 flag_descriptions::kWebPageAlternativeTextZoomName,
735 flag_descriptions::kWebPageAlternativeTextZoomDescription,
736 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34737 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
738 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
739 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13740 {"omnibox-ui-max-autocomplete-matches",
741 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
742 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
743 flags_ui::kOsIos,
744 FEATURE_WITH_PARAMS_VALUE_TYPE(
745 omnibox::kUIExperimentMaxAutocompleteMatches,
746 kOmniboxUIMaxAutocompleteMatchesVariations,
747 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35748 {"omnibox-local-history-zero-suggest-beyond-ntp",
749 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
750 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
751 flags_ui::kOsIos,
752 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54753 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
754 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
755 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
756 kOmniboxMaxZPSMatchesVariations,
757 "OmniboxMaxZPSVariations")},
Jérôme Lebelc374fdd2019-09-27 10:36:48758 {"force-startup-signin-promo",
759 flag_descriptions::kForceStartupSigninPromoName,
760 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29761 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41762 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
763 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
764 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13765#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45766 {"screen-time-integration-ios",
767 flag_descriptions::kScreenTimeIntegrationName,
768 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
769 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13770#endif
Nazerke3e993f72020-09-21 13:00:06771 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
772 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
Ewann Pellec8634ab2024-02-23 16:50:35773 FEATURE_WITH_PARAMS_VALUE_TYPE(kModernTabStrip,
774 kModernTabStripVariations,
775 "ModernTabStrip")},
Cheick Cisse76ade3d2020-12-16 00:15:11776 {"ios-shared-highlighting-color-change",
777 flag_descriptions::kIOSSharedHighlightingColorChangeName,
778 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07779 flags_ui::kOsIos,
780 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34781 {"ios-shared-highlighting-v2",
782 flag_descriptions::kIOSSharedHighlightingV2Name,
783 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
784 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51785 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
786 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
Scott Yoderaf2bdf32024-01-30 20:26:15787 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSTipsNotifications,
788 kIOSTipsNotificationsVariations,
789 "IOSTipsNotifications")},
Stepan Khapugin04341202021-01-07 12:22:45790 {"omnibox-new-textfield-implementation",
791 flag_descriptions::kOmniboxNewImplementationName,
792 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
793 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19794 {"start-surface", flag_descriptions::kStartSurfaceName,
795 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23796 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
797 kStartSurfaceVariations,
798 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19799 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
800 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
801 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34802 {"wait-threshold-seconds-for-capabilities-api",
803 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
804 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
805 flags_ui::kOsIos,
806 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Guillem Perez49e1df42023-08-23 22:15:24807 {"content-push-notifications",
808 flag_descriptions::kContentPushNotificationsName,
809 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52810 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
811 kContentPushNotificationsVariations,
812 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57813 {"overflow-menu-customization",
814 flag_descriptions::kOverflowMenuCustomizationName,
815 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
816 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44817 {"enable-lens-in-omnibox-copied-image",
818 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
819 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
820 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40821 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23822 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
823 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40824 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23825 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03826 {"enable-disco-feed-endpoint",
827 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
828 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
829 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11830 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15831 {"enable-discover-feed-top-sync-promo",
832 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
833 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
834 flags_ui::kOsIos,
835 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
836 kDiscoverFeedTopSyncPromoVariations,
837 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14838 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
839 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
840 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
841 kFeedHeaderSettingsVariations,
842 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28843 {"shared-highlighting-amp",
844 flag_descriptions::kIOSSharedHighlightingAmpName,
845 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28847 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42848 commerce::flag_descriptions::kCommercePriceTrackingName,
849 commerce::flag_descriptions::kCommercePriceTrackingDescription,
850 flags_ui::kOsIos,
851 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
852 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15853 "CommercePriceTracking")},
Matt Jones2e47b9692024-02-23 21:56:43854 {"track-by-default-mobile",
855 commerce::flag_descriptions::kTrackByDefaultOnMobileName,
856 commerce::flag_descriptions::kTrackByDefaultOnMobileDescription,
857 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kTrackByDefaultOnMobile)},
adamta250f4ad2023-08-02 15:26:06858 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
859 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
860 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54861 {"ntp-view-hierarchy-repair",
862 flag_descriptions::kNTPViewHierarchyRepairName,
863 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20864 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Mikel Astiz26795352024-03-15 08:51:10865 {"unified-bookmark-model", flag_descriptions::kUnifiedBookmarkModelName,
866 flag_descriptions::kUnifiedBookmarkModelDescription, flags_ui::kOsIos,
867 FEATURE_VALUE_TYPE(syncer::kEnableBookmarkFoldersForAccountStorage)},
Cheick Cisse7c03928d2024-03-11 23:27:38868 {"price-insights-ios", commerce::flag_descriptions::kPriceInsightsIosName,
869 commerce::flag_descriptions::kPriceInsightsIosDescription,
870 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kPriceInsightsIos)},
Vishwas Uppoor89303a92022-08-03 00:56:26871 {"autofill-enable-card-product-name",
872 flag_descriptions::kAutofillEnableCardProductNameName,
873 flag_descriptions::kAutofillEnableCardProductNameDescription,
874 flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52876 {"enable-download-service-foreground-session",
877 flag_descriptions::kDownloadServiceForegroundSessionName,
878 flag_descriptions::kDownloadServiceForegroundSessionDescription,
879 flags_ui::kOsIos,
880 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23881 {"enable-tflite-language-detection",
882 flag_descriptions::kTFLiteLanguageDetectionName,
883 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
884 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20885 {"optimization-guide-debug-logs",
886 flag_descriptions::kOptimizationGuideDebugLogsName,
887 flag_descriptions::kOptimizationGuideDebugLogsDescription,
888 flags_ui::kOsIos,
889 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55890 {"optimization-guide-push-notifications",
891 flag_descriptions::kOptimizationGuidePushNotificationClientName,
892 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
893 flags_ui::kOsIos,
894 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25895 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
896 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
897 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01898 {"suggestions-scrolling-ipad",
899 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
900 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
901 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00902 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
903 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
904 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jeanad303a92023-07-31 16:58:11905 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
906 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
907 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:22908 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
909 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
David Jeanf361ae9d2024-04-09 08:19:47911 {"enable-expkit-text-classifier-date",
912 flag_descriptions::kEnableExpKitTextClassifierDateName,
913 flag_descriptions::kEnableExpKitTextClassifierDateDescription,
914 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifierDate)},
915 {"enable-expkit-text-classifier-address",
916 flag_descriptions::kEnableExpKitTextClassifierAddressName,
917 flag_descriptions::kEnableExpKitTextClassifierAddressDescription,
Raj T18a2c8c2023-03-15 17:20:15918 flags_ui::kOsIos,
David Jeanf361ae9d2024-04-09 08:19:47919 FEATURE_WITH_PARAMS_VALUE_TYPE(
920 kEnableExpKitTextClassifierAddress,
921 kEnableExpKitTextClassifierAddressVariations,
922 "ExpKitTextClassifierAddress")},
923 {"enable-expkit-text-classifier-phonenumber",
924 flag_descriptions::kEnableExpKitTextClassifierPhoneNumberName,
925 flag_descriptions::kEnableExpKitTextClassifierPhoneNumberDescription,
926 flags_ui::kOsIos,
927 FEATURE_WITH_PARAMS_VALUE_TYPE(
928 kEnableExpKitTextClassifierPhoneNumber,
929 kEnableExpKitTextClassifierPhoneNumberVariations,
930 "ExpKitTextClassifierPhoneNumber")},
931 {"enable-expkit-text-classifier-email",
932 flag_descriptions::kEnableExpKitTextClassifierEmailName,
933 flag_descriptions::kEnableExpKitTextClassifierEmailDescription,
934 flags_ui::kOsIos,
935 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifierEmail,
936 kEnableExpKitTextClassifierEmailVariations,
937 "ExpKitTextClassifierEmail")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:33938 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
939 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:46940 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
941 kOneTapForMapsWithVariations,
942 "OneTapForMaps")},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:25943 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
944 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
945 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:30946 {"autofill-enable-ranking-formula-address-profiles",
947 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
948 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
949 flags_ui::kOsIos,
950 FEATURE_VALUE_TYPE(
951 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:39952 {"autofill-enable-ranking-formula-credit-cards",
953 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
954 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
955 flags_ui::kOsIos,
956 FEATURE_VALUE_TYPE(
957 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:02958 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
959 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
960 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:52961 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
962 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:26963 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
964 kMagicStackVariations,
965 flag_descriptions::kMagicStackName)},
Alexis Hetuec9d70c2023-11-13 16:27:31966 {"ios-keyboard-accessory-upgrade",
967 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
968 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
969 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:26970 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
971 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
972 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:29973 {"ios-magic-stack-segmentation-ranking",
974 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
975 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
976 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:30977 FEATURE_WITH_PARAMS_VALUE_TYPE(
978 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
979 kSegmentationPlatformIosModuleRankerVariations,
980 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:06981 {"default-browser-intents-show-settings",
982 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
983 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
984 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:32985 {"ios-password-bottom-sheet",
986 flag_descriptions::kIOSPasswordBottomSheetName,
987 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:28989 {"ios-password-bottom-sheet-autofocus",
990 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
991 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
992 flags_ui::kOsIos,
993 FEATURE_VALUE_TYPE(
994 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Alexis Hetu0677e182024-04-10 16:07:37995 {"sync-webauthn-credentials",
996 flag_descriptions::kSyncWebauthnCredentialsName,
997 flag_descriptions::kSyncWebauthnCredentialsDescription, flags_ui::kOsIos,
998 FEATURE_VALUE_TYPE(syncer::kSyncWebauthnCredentials)},
Moe Ahmadi098519d82022-07-27 18:34:24999 {"omnibox-zero-suggest-prefetching",
1000 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1001 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1002 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451003 {"omnibox-zero-suggest-prefetching-on-srp",
1004 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1005 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1006 flags_ui::kOsIos,
1007 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1008 {"omnibox-zero-suggest-prefetching-on-web",
1009 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1010 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1011 flags_ui::kOsIos,
1012 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471013 {"omnibox-zero-suggest-in-memory-caching",
1014 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1015 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1016 flags_ui::kOsIos,
1017 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351018 {"omnibox-on-device-tail-suggestions",
1019 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1020 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1021 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361022 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1023 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1024 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1025 kOmniboxMaxURLMatchesVariations,
1026 "OmniboxMaxURLMatches")},
Stepan Khapugin1f83c5ae2024-01-31 15:55:201027 {"omnibox-most-visited-tiles-horizontal-render-group",
1028 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupName,
1029 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupDescription,
1030 flags_ui::kOsIos,
1031 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTilesHorizontalRenderGroup)},
Olivier Robin60d3a062022-07-06 17:34:061032 {"metrickit-non-crash-reports",
1033 flag_descriptions::kMetrickitNonCrashReportName,
1034 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1035 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371036 {"autofill-enable-remade-downstream-metrics",
1037 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1038 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1039 flags_ui::kOsIos,
1040 FEATURE_VALUE_TYPE(
1041 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551042 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1043 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1044 flag_descriptions::
1045 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1046 flags_ui::kOsIos,
1047 FEATURE_VALUE_TYPE(
1048 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse8835611a2023-06-02 21:42:541049 {"default-browser-promo-force-show-promo",
1050 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1051 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1052 flags_ui::kOsIos,
1053 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171054 {"default-browser-promo-trigger-criteria-experiment",
1055 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1056 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1057 flags_ui::kOsIos,
Gayane Petrosyan01f711782024-02-21 23:00:211058 FEATURE_VALUE_TYPE(
1059 feature_engagement::kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441060 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211061 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1062 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1063 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Ed Chin91e44992022-07-27 13:42:341064#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1065 {"feed-background-refresh-ios",
1066 flag_descriptions::kFeedBackgroundRefreshName,
1067 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1068 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1069 kFeedBackgroundRefreshVariations,
1070 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261071#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191072 {"omnibox-keyboard-paste-button",
1073 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1074 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1075 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501076 {"enable-tflite-language-detection-ignore",
1077 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1078 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1079 flags_ui::kOsIos,
1080 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571081 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1082 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Daniel Whiteae1cb672022-12-14 18:25:251084 {"iph-price-notifications-while-browsing",
1085 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1086 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1087 flags_ui::kOsIos,
1088 FEATURE_VALUE_TYPE(
1089 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501090 {"autofill-suggest-server-card-instead-of-local-card",
1091 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1092 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1093 flags_ui::kOsIos,
1094 FEATURE_VALUE_TYPE(
1095 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Ewann Pelledec2d042023-01-25 15:28:391096 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1097 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1098 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481099 {"local-pdp-detection",
1100 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1101 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1102 flags_ui::kOsIos,
1103 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121104 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1105 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1106 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1107 kTabInactivityThresholdVariations,
1108 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181109 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1110 flag_descriptions::
1111 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1112 flag_descriptions::
1113 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1114 flags_ui::kOsIos,
1115 FEATURE_VALUE_TYPE(
1116 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361117 {"enable-friendlier-safe-browsing-settings-standard-protection",
1118 flag_descriptions::
1119 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1120 flag_descriptions::
1121 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521122 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361123 FEATURE_VALUE_TYPE(
1124 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Olivier ROBIN52eddbf32023-02-15 10:33:421125 {"ios-edit-menu-partial-translate",
1126 flag_descriptions::kIOSEditMenuPartialTranslateName,
1127 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421128 flags_ui::kOsIos,
1129 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1130 kIOSEditMenuPartialTranslateVariations,
1131 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431132 {"notification-settings-menu-item",
1133 flag_descriptions::kNotificationSettingsMenuItemName,
1134 flag_descriptions::kNotificationSettingsMenuItemDescription,
1135 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061136 {"spotlight-reading-list-source",
1137 flag_descriptions::kSpotlightReadingListSourceName,
1138 flag_descriptions::kSpotlightReadingListSourceDescription,
1139 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481140 {"enable-policy-test-page-ios",
1141 flag_descriptions::kEnablePolicyTestPageName,
1142 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1143 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531144 {"web-feed-feedback-reroute",
1145 flag_descriptions::kWebFeedFeedbackRerouteName,
1146 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1147 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551148 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1149 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1150 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431151 {"enable-follow-IPH-exp-params",
1152 flag_descriptions::kEnableFollowIPHExpParamsName,
1153 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1154 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Guillem Perez3c139a822023-05-24 19:34:251155 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1156 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1157 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Marc Treibe9f79ea72023-03-14 10:25:421158 {"enable-preferences-account-storage",
1159 flag_descriptions::kEnablePreferencesAccountStorageName,
1160 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1161 flags_ui::kOsIos,
1162 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201163 {"ios-browser-edit-menu-metrics",
1164 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1165 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1166 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551167 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1168 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1169 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1170 kIOSDockingPromoVariations,
1171 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241172 {"omnibox-grouping-framework-non-zps",
1173 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1174 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1175 flags_ui::kOsIos,
1176 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471177 {"enable-session-serialization-optimizations",
1178 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1179 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1180 flags_ui::kOsIos,
1181 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221182 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391183 {"only-access-clipboard-async",
1184 flag_descriptions::kOnlyAccessClipboardAsyncName,
1185 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1186 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191187 {"omnibox-improved-rtl-suggestions",
1188 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1189 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1190 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471191 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1192 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1193 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1194 kIOSEditMenuSearchWithVariations,
1195 "IOSEditMenuSearchWith")},
1196 {"ios-edit-menu-hide-search-web",
1197 flag_descriptions::kIOSEditMenuHideSearchWebName,
1198 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1199 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171200 {"autofill-enable-card-art-image",
1201 flag_descriptions::kAutofillEnableCardArtImageName,
1202 flag_descriptions::kAutofillEnableCardArtImageDescription,
1203 flags_ui::kOsIos,
1204 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451205 {"enable-signed-out-view-demotion",
1206 flag_descriptions::kEnableSignedOutViewDemotionName,
1207 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1208 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401209 {"enable-startup-latency-improvements",
1210 flag_descriptions::kEnableStartupImprovementsName,
1211 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1212 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251213 {"autofill-use-two-dots-for-last-four-digits",
1214 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1215 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1216 flags_ui::kOsIos,
1217 FEATURE_VALUE_TYPE(
1218 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241219 {"autofill-disable-profile-updates",
1220 flag_descriptions::kAutofillDisableProfileUpdatesName,
1221 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1222 flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(
1224 autofill::features::test::kAutofillDisableProfileUpdates)},
1225 {"autofill-disable-silent-profile-updates",
1226 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1227 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1228 flags_ui::kOsIos,
1229 FEATURE_VALUE_TYPE(
1230 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1231 {"autofill-enable-admin-level-2",
1232 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1233 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1234 flags_ui::kOsIos,
1235 FEATURE_VALUE_TYPE(
1236 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1237 {"autofill-enable-between-streets",
1238 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1239 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1240 flags_ui::kOsIos,
1241 FEATURE_VALUE_TYPE(
1242 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1243 {"autofill-enable-landmark",
1244 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1245 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1246 flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Ameur Hosnib40858a2023-06-12 17:27:311248 {"spotlight-open-tabs-source",
1249 flag_descriptions::kSpotlightOpenTabsSourceName,
1250 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451252 {"spotlight-donate-new-intents",
1253 flag_descriptions::kSpotlightDonateNewIntentsName,
1254 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1255 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Aliona DANGLA4326cad82023-06-20 16:32:571256 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1257 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1258 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371259 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1260 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1261 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1262 kTabPickupThresholdVariations,
1263 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321264 {"ios-iph-for-safari-switcher",
1265 flag_descriptions::kIPHForSafariSwitcherName,
1266 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1267 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071268 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1269 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1270 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011271 {"tab-resumption", flag_descriptions::kTabResumptionName,
1272 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001273 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1274 kTabResumptionVariations,
1275 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521276 {"bottom-omnibox-default-setting",
1277 flag_descriptions::kBottomOmniboxDefaultSettingName,
1278 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1279 flags_ui::kOsIos,
1280 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1281 kBottomOmniboxDefaultSettingVariations,
1282 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131283 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1284 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1285 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
adamta7be73b182023-08-08 22:30:351286 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1287 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1288 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501289 {"ios-password-auth-on-entry-v2",
1290 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1291 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1292 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281293 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1294 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1295 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Matt Jones79534392023-10-27 14:35:021296 {"parcel-tracking-test-data",
1297 commerce::flag_descriptions::kParcelTrackingTestDataName,
1298 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1299 flags_ui::kOsIos,
1300 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1301 kParcelTrackingTestDataVariations,
1302 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111303 {"autofill-enable-merchant-domain-in-unmask-card-request",
1304 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1305 flag_descriptions::
1306 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1307 flags_ui::kOsIos,
1308 FEATURE_VALUE_TYPE(
1309 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331310 {"autofill-update-chrome-settings-link-to-gpay-web",
1311 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1312 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1313 flags_ui::kOsIos,
1314 FEATURE_VALUE_TYPE(
1315 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281316 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1317 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1318 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Siyu263cf562023-09-25 20:59:571319 {"autofill-enable-virtual-cards",
1320 flag_descriptions::kAutofillEnableVirtualCardsName,
1321 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1322 flags_ui::kOsIos,
1323 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Christian Xuf211f632023-10-02 19:07:571324 {"omnibox-shortcuts-database-ios",
1325 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1326 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211327 flags_ui::kOsIos,
1328 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021329 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1330 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1331 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Rubin Deliallisi072bc842023-10-19 12:00:411332 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1333 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1334 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121335 {"sync-session-on-visibility-changed",
1336 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1337 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1338 flags_ui::kOsIos,
1339 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451340 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1341 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1342 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531343 {"password-sharing", flag_descriptions::kPasswordSharingName,
1344 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1345 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511346 {"omnibox-company-entity-icon-adjustment",
1347 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1348 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1349 flags_ui::kOsIos,
1350 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1351 kOmniboxCompanyEntityAdjustmentVariations,
1352 "OmniboxCompanyEntityAdjustment")},
Aliona DANGLA5971a8b2023-11-10 11:55:351353 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1354 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1355 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471356 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1357 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1358 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Gauthier Ambard8cca29a2024-04-10 08:27:361359 {"tab-groups-on-ipad", flag_descriptions::kTabGroupsIPadName,
1360 flag_descriptions::kTabGroupsIPadDescription, flags_ui::kOsIos,
1361 FEATURE_VALUE_TYPE(kTabGroupsIPad)},
Siyu9a925482023-11-14 19:16:131362 {"autofill-enable-payments-mandatory-reauth",
1363 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1364 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1365 flags_ui::kOsIos,
1366 FEATURE_VALUE_TYPE(
1367 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Vidhan Jain1199e202024-03-15 14:42:591368 {"autofill-enable-dynamically-loading-fields-on-input",
1369 flag_descriptions::
1370 kAutofillEnableDynamicallyLoadingFieldsForAddressInputName,
1371 flag_descriptions::
1372 kAutofillEnableDynamicallyLoadingFieldsForAddressInputDescription,
1373 flags_ui::kOsIos,
1374 FEATURE_VALUE_TYPE(kAutofillDynamicallyLoadsFieldsForAddressInput)},
Vincent Boisselle5af638da2023-11-16 17:38:201375 {"password-manager-signin-uff",
1376 flag_descriptions::kIOSPasswordSignInUffName,
1377 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1378 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011379 {"tab-grid-compositional-layout",
1380 flag_descriptions::kTabGridCompositionalLayoutName,
1381 flag_descriptions::kTabGridCompositionalLayoutDescription,
1382 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411383 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1384 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1385 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481386 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1387 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1388 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1389 kBottomOmniboxPromoVariations,
1390 "BottomOmniboxPromoFRE")},
1391 {"bottom-omnibox-promo-app-launch",
1392 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1393 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1394 flags_ui::kOsIos,
1395 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1396 kBottomOmniboxPromoVariations,
1397 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091398 {"bottom-omnibox-promo-default-position",
1399 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1400 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1401 flags_ui::kOsIos,
1402 FEATURE_WITH_PARAMS_VALUE_TYPE(
1403 kBottomOmniboxPromoDefaultPosition,
1404 kBottomOmniboxPromoDefaultPositionVariations,
1405 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251406 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1407 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1408 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Mike Dougherty330188d52023-12-20 16:33:241409 {"remove-old-web-state-restore",
1410 flag_descriptions::kRemoveOldWebStateRestoreName,
1411 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1412 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031413 {"share-in-web-context-menu-ios",
1414 flag_descriptions::kShareInWebContextMenuIOSName,
1415 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1416 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141417 {"migrate-syncing-user-to-signed-in",
1418 flag_descriptions::kMigrateSyncingUserToSignedInName,
1419 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1420 flags_ui::kOsIos,
1421 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1422 {"undo-migration-of-syncing-user-to-signed-in",
1423 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1424 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1425 flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551427 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1428 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1429 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461430 {"contextual-panel", flag_descriptions::kContextualPanelName,
1431 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1432 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591433 {"omnibox-popup-row-content-configuration",
1434 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1435 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1436 flags_ui::kOsIos,
1437 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391438 {"contextual-panel-force-show-entrypoint",
1439 flag_descriptions::kContextualPanelForceShowEntrypointName,
1440 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1441 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321442 {"bottom-omnibox-promo-region-filter",
1443 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1444 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1445 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471446 {"enable-ipad-feed-ghost-cards",
1447 flag_descriptions::kEnableiPadFeedGhostCardsName,
1448 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1449 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Louis Romerof3144822024-01-30 10:24:161450 {"tab-grid-always-bounce", flag_descriptions::kTabGridAlwaysBounceName,
1451 flag_descriptions::kTabGridAlwaysBounceDescription, flags_ui::kOsIos,
1452 FEATURE_VALUE_TYPE(kTabGridAlwaysBounce)},
Christian Xu11df0ae2024-02-08 16:07:511453 {"omnibox-rich-autocompletion",
1454 flag_descriptions::kOmniboxRichAutocompletionName,
1455 flag_descriptions::kOmniboxRichAutocompletionDescription, flags_ui::kOsIos,
Christian Xu10b84d72024-04-09 17:12:331456 FEATURE_WITH_PARAMS_VALUE_TYPE(
1457 omnibox::kRichAutocompletion,
1458 kRichAutocompletionImplementationVariations,
1459 "RichAutocompletionImplementationVariations")},
Jason Hud445445f2024-02-02 18:28:121460 {"disable-lens-camera", flag_descriptions::kDisableLensCameraName,
1461 flag_descriptions::kDisableLensCameraDescription, flags_ui::kOsIos,
1462 FEATURE_VALUE_TYPE(kDisableLensCamera)},
Charles Yang30c90b92024-03-08 18:00:591463 {"omnibox-color-icons", flag_descriptions::kOmniboxColorIconsName,
1464 flag_descriptions::kOmniboxColorIconsDescription, flags_ui::kOsIos,
1465 FEATURE_VALUE_TYPE(kOmniboxColorIcons)},
Charles Yang682634b2024-03-19 01:46:091466 {"enable-color-lens-and-voice-icons-in-home-screen-widget",
1467 flag_descriptions::kEnableColorLensAndVoiceIconsInHomeScreenWidgetName,
1468 flag_descriptions::
1469 kEnableColorLensAndVoiceIconsInHomeScreenWidgetDescription,
1470 flags_ui::kOsIos,
1471 FEATURE_VALUE_TYPE(kEnableColorLensAndVoiceIconsInHomeScreenWidget)},
Tomasz Jurkiewicze8ce0292024-02-13 13:06:251472 {"minor-mode-restrictions-for-history-sync-opt-in",
1473 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName,
1474 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription,
1475 flags_ui::kOsIos,
1476 FEATURE_VALUE_TYPE(::switches::kMinorModeRestrictionsForHistorySyncOptIn)},
ginnnnnnnydbaba6e42024-02-13 23:17:251477 {"ios-iph-pull-to-refresh",
1478 flag_descriptions::kIPHiOSPullToRefreshFeatureName,
1479 flag_descriptions::kIPHiOSPullToRefreshFeatureDescription,
1480 flags_ui::kOsIos,
1481 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSPullToRefreshFeature)},
1482 {"ios-iph-swipe-back-forward",
1483 flag_descriptions::kIPHiOSSwipeBackForwardFeatureName,
1484 flag_descriptions::kIPHiOSSwipeBackForwardFeatureDescription,
1485 flags_ui::kOsIos,
1486 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSSwipeBackForwardFeature)},
ginnnnnnny92d90742024-02-16 17:04:241487 {"ios-iph-swipe-toolbar-to-change-tab",
1488 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureName,
1489 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureDescription,
1490 flags_ui::kOsIos,
1491 FEATURE_VALUE_TYPE(
1492 feature_engagement::kIPHiOSSwipeToolbarToChangeTabFeature)},
ginnnnnnnydbaba6e42024-02-13 23:17:251493 {"ios-iph-tab-grid-swipe-right-for-incognito",
1494 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoName,
1495 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoDescription,
1496 flags_ui::kOsIos,
1497 FEATURE_VALUE_TYPE(
1498 feature_engagement::kIPHiOSTabGridSwipeRightForIncognito)},
Chris Lu93a507b2024-02-14 18:41:581499 {"ios-magic-stack-collection-view",
1500 flag_descriptions::kIOSMagicStackCollectionViewName,
1501 flag_descriptions::kIOSMagicStackCollectionViewDescription,
1502 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSMagicStackCollectionView)},
Alexander Tekleeebe42b92024-02-23 21:27:151503 {"autofill-enable-card-benefits-for-american-express",
1504 flag_descriptions::kAutofillEnableCardBenefitsForAmericanExpressName,
1505 flag_descriptions::
1506 kAutofillEnableCardBenefitsForAmericanExpressDescription,
1507 flags_ui::kOsIos,
1508 FEATURE_VALUE_TYPE(
1509 autofill::features::kAutofillEnableCardBenefitsForAmericanExpress)},
1510 {"autofill-enable-card-benefits-for-capital-one",
1511 flag_descriptions::kAutofillEnableCardBenefitsForCapitalOneName,
1512 flag_descriptions::kAutofillEnableCardBenefitsForCapitalOneDescription,
1513 flags_ui::kOsIos,
1514 FEATURE_VALUE_TYPE(
1515 autofill::features::kAutofillEnableCardBenefitsForCapitalOne)},
Yishui Liub88a38c2024-02-28 08:46:551516 {"autofill-enable-card-benefits-sync",
1517 flag_descriptions::kAutofillEnableCardBenefitsSyncName,
1518 flag_descriptions::kAutofillEnableCardBenefitsSyncDescription,
1519 flags_ui::kOsIos,
1520 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefitsSync)},
Rubin Deliallisi4170b1c2024-02-28 16:15:421521 {"linked-services-setting-ios",
1522 flag_descriptions::kLinkedServicesSettingIosName,
1523 flag_descriptions::kLinkedServicesSettingIosDescription, flags_ui::kOsIos,
1524 FEATURE_VALUE_TYPE(kLinkedServicesSettingIos)},
Aliona DANGLA52e69ff2024-02-29 12:22:281525 {"disable-fullscreen-scrolling",
1526 flag_descriptions::kDisableFullscreenScrollingName,
1527 flag_descriptions::kDisableFullscreenScrollingDescription,
1528 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDisableFullscreenScrolling)},
Ernesto Izquierdo Clua7a451b8e2024-03-11 15:01:011529 {"autofill-enable-xhr-submission-detection-ios",
1530 flag_descriptions::kAutofillEnableXHRSubmissionDetectionIOSName,
1531 flag_descriptions::kAutofillEnableXHRSubmissionDetectionIOSDescription,
1532 flags_ui::kOsIos,
1533 FEATURE_VALUE_TYPE(
1534 autofill::features::kAutofillEnableXHRSubmissionDetectionIOS)},
hvs7c6cb402024-03-27 02:39:001535 {"autofill-enable-prefetching-risk-data-for-retrieval",
1536 flag_descriptions::kAutofillEnablePrefetchingRiskDataForRetrievalName,
Vincent Boisselle2e95b882024-03-29 21:03:561537 flag_descriptions::
1538 kAutofillEnablePrefetchingRiskDataForRetrievalDescription,
hvs7c6cb402024-03-27 02:39:001539 flags_ui::kOsIos,
Vincent Boisselle2e95b882024-03-29 21:03:561540 FEATURE_VALUE_TYPE(
1541 autofill::features::kAutofillEnablePrefetchingRiskDataForRetrieval)},
1542 {"autofill-sticky-infobar", flag_descriptions::kAutofillStickyInfobarName,
1543 flag_descriptions::kAutofillStickyInfobarDescription, flags_ui::kOsIos,
1544 FEATURE_VALUE_TYPE(kAutofillStickyInfobarIos)},
Raj Tc66dd122024-04-01 18:48:391545 {"page-content-annotations", flag_descriptions::kPageContentAnnotationsName,
1546 flag_descriptions::kPageContentAnnotationsDescription, flags_ui::kOsIos,
1547 FEATURE_VALUE_TYPE(
1548 page_content_annotations::features::kPageContentAnnotations)},
1549 {"page-content-annotations-persist-salient-image-metadata",
1550 flag_descriptions::kPageContentAnnotationsPersistSalientImageMetadataName,
1551 flag_descriptions::
1552 kPageContentAnnotationsPersistSalientImageMetadataDescription,
1553 flags_ui::kOsIos,
1554 FEATURE_VALUE_TYPE(
1555 page_content_annotations::features::
1556 kPageContentAnnotationsPersistSalientImageMetadata)},
1557 {"page-content-annotations-remote-page-metadata",
1558 flag_descriptions::kPageContentAnnotationsRemotePageMetadataName,
1559 flag_descriptions::kPageContentAnnotationsRemotePageMetadataDescription,
1560 flags_ui::kOsIos,
1561 FEATURE_VALUE_TYPE(
1562 page_content_annotations::features::kRemotePageMetadata)},
1563 {"page-visibility-page-content-annotations",
1564 flag_descriptions::kPageVisibilityPageContentAnnotationsName,
1565 flag_descriptions::kPageVisibilityPageContentAnnotationsDescription,
1566 flags_ui::kOsIos,
1567 FEATURE_VALUE_TYPE(page_content_annotations::features::
1568 kPageVisibilityPageContentAnnotations)},
Daniel White7867261f2024-04-02 19:08:121569 {"enhanced-safe-browsing-promo",
1570 flag_descriptions::kEnhancedSafeBrowsingPromoName,
1571 flag_descriptions::kEnhancedSafeBrowsingPromoDescription, flags_ui::kOsIos,
1572 FEATURE_VALUE_TYPE(
1573 security_interstitials::features::kEnhancedSafeBrowsingPromo)},
Sebsgfcd5b0b2024-04-09 08:18:321574 {"cpe-performance-improvements",
1575 flag_descriptions::kCredentialProviderPerformanceImprovementsName,
1576 flag_descriptions::kCredentialProviderPerformanceImprovementsDescription,
1577 flags_ui::kOsIos,
1578 FEATURE_VALUE_TYPE(kCredentialProviderPerformanceImprovements)},
Vincent Boissellea1f27f322024-04-17 14:53:191579 {"password-manager-detect-username-in-uff",
1580 flag_descriptions::kIOSDetectUsernameInUffName,
1581 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1582 FEATURE_VALUE_TYPE(password_manager::features::kIosDetectUsernameInUff)},
Marc Treib5da778d2024-04-17 17:03:481583 {"identity-disc-account-switch",
1584 flag_descriptions::kIdentityDiscAccountSwitchName,
1585 flag_descriptions::kIdentityDiscAccountSwitchDescription, flags_ui::kOsIos,
1586 FEATURE_VALUE_TYPE(kIdentityDiscAccountSwitch)},
Filipa Senrabe00cbe2024-04-19 14:21:331587 {"ios-quick-delete", flag_descriptions::kIOSQuickDeleteName,
1588 flag_descriptions::kIOSQuickDeleteDescription, flags_ui::kOsIos,
1589 FEATURE_VALUE_TYPE(kIOSQuickDelete)},
Vipul Vinod Koul1629a192024-04-24 00:04:001590 {"autofill-enable-verve-card-support",
1591 flag_descriptions::kAutofillEnableVerveCardSupportName,
1592 flag_descriptions::kAutofillEnableVerveCardSupportDescription,
1593 flags_ui::kOsIos,
1594 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVerveCardSupport)},
Ameur Hosni20b75fe52024-04-24 16:36:021595 {"omnibox-actions-in-suggest",
1596 flag_descriptions::kOmniboxActionsInSuggestName,
1597 flag_descriptions::kOmniboxActionsInSuggestDescription, flags_ui::kOsIos,
1598 FEATURE_VALUE_TYPE(kOmniboxActionsInSuggest)},
Louis Romero5a84afc2024-04-25 10:29:201599 {"tab-group-sync", flag_descriptions::kTabGroupSync,
1600 flag_descriptions::kTabGroupSync, flags_ui::kOsIos,
1601 FEATURE_VALUE_TYPE(kTabGroupSync)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301602};
sdefresne14900ee2015-11-27 14:43:211603
Rohit Raobed794c2020-04-27 15:27:451604bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1605 return false;
1606}
1607
1608flags_ui::FlagsState& GetGlobalFlagsState() {
1609 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1610 nullptr);
1611 return *flags_state;
1612}
David Jean5ca263c2021-08-18 09:19:301613// Creates the experimental test policies map, used by AsyncPolicyLoader and
1614// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341615NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211616 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1617
Guillaume Jenkins25e9bd72020-08-27 17:39:061618 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551619 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061620 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551621
Guillaume Jenkins25e9bd72020-08-27 17:39:061622 // Set some sample policy values for testing if EnableSamplePolicies is set to
1623 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401624 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551625 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011626 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1627
Guillaume Jenkinseeb7007c2020-06-25 22:55:401628 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1629
1630 // 2 = Disable all variations
1631 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1632
1633 // 2 = Do not allow any site to show popups
1634 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1635
Tina Wang5abee802020-07-29 23:09:521636 // Set default search engine.
1637 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1638 @YES,
1639 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1640 @"http://www.google.com/search?q={searchTerms}",
1641 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021642 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521643
Tina Wang89068c82020-10-29 15:51:501644 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1645
Gauthier Ambard21b23702021-04-16 16:11:271646 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1647
Tina Wang59d0b7e2020-08-11 04:41:011648 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531649
1650 // 2 = Enhanced safe browsing protection
1651 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1652
1653 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291654
1655 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551656 }];
1657 }
1658
Ewann227a3c02021-04-19 12:04:541659 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041660 NSString* sync_policy_key =
1661 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301662 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541663 }
Ewann227a3c02021-04-19 12:04:541664
Ewann570a6302021-08-17 07:22:421665 // SyncTypesListDisabled policy.
1666 NSString* Sync_types_list_disabled_key =
1667 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1668 NSMutableArray* Sync_types_list_disabled_values =
1669 [[NSMutableArray alloc] init];
1670 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1671 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1672 }
1673 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1674 [Sync_types_list_disabled_values addObject:@"readingList"];
1675 }
1676 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1677 [Sync_types_list_disabled_values addObject:@"preferences"];
1678 }
1679 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1680 [Sync_types_list_disabled_values addObject:@"passwords"];
1681 }
1682 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1683 [Sync_types_list_disabled_values addObject:@"autofill"];
1684 }
1685 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1686 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1687 }
1688 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1689 [Sync_types_list_disabled_values addObject:@"tabs"];
1690 }
1691 if ([Sync_types_list_disabled_values count]) {
1692 [testing_policies addEntriesFromDictionary:@{
1693 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1694 }];
Ewann570a6302021-08-17 07:22:421695 }
1696
Gauthier Ambard073eaa92021-11-22 15:24:131697 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521698 NSString* incognito_policy_key =
1699 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1700 NSInteger incognito_mode_availability =
1701 [defaults integerForKey:incognito_policy_key];
1702 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521703 [testing_policies addEntriesFromDictionary:@{
1704 incognito_policy_key : @(incognito_mode_availability),
1705 }];
1706 }
1707
Ewann40a8f8a2021-07-29 10:01:201708 NSString* restriction_pattern =
1709 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1710 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291711 NSString* restrict_key =
1712 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201713 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291714 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201715 }];
1716 }
1717
Vincent Boisselle19200bc2021-09-01 17:58:251718 // If the sign-in policy is set (not "None"), add the policy key to the list
1719 // of enabled experimental policies, and set the value.
1720 NSString* const kSigninPolicyKey = @"BrowserSignin";
1721 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1722 if (signin_policy_mode) {
1723 // Remove the mode offset that was used to represent the unset policy.
1724 --signin_policy_mode;
1725 DCHECK(signin_policy_mode >= 0);
1726
Vincent Boisselle19200bc2021-09-01 17:58:251727 [testing_policies addEntriesFromDictionary:@{
1728 kSigninPolicyKey : @(signin_policy_mode),
1729 }];
1730 }
1731
Veronique Nguyen9b1044f2022-01-11 14:41:131732 // If the New Tab Page URL is set (not empty) add the value to the list of
1733 // test policies.
1734 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1735 if ([ntp_location length] > 0) {
1736 NSString* ntp_location_key =
1737 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1738 [testing_policies
1739 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571740 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131741 }
1742
Ali Juma9ec36d22022-03-28 14:53:121743 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1744 NSString* allow_backups_key =
1745 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1746 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1747 [allowed_experimental_policies addObject:allow_backups_key];
1748 }
1749
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241750 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1751 NSString* password_manager_key =
1752 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1753 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1754 [allowed_experimental_policies addObject:password_manager_key];
1755 }
Vincent Boisselle003569a72023-09-11 16:03:121756
1757 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1758 NSString* user_policy_merge_key =
1759 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1760 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1761 [allowed_experimental_policies addObject:user_policy_merge_key];
1762 }
1763
Arthur Milchiorbb44f5c82023-03-14 16:14:461764 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1765 NSString* managed_bookmarks_key =
1766 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1767 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571768 @"["
1769 // The following gets filtered out from
1770 // the JSON string when parsed.
1771 " {"
1772 " \"toplevel_name\": \"Managed Bookmarks\""
1773 " },"
1774 " {"
1775 " \"name\": \"Google\","
1776 " \"url\": \"google.com\""
1777 " },"
1778 " {"
1779 " \"name\": \"Empty Folder\","
1780 " \"children\": []"
1781 " },"
1782 " {"
1783 " \"name\": \"Big Folder\","
1784 " \"children\": ["
1785 " {"
1786 " \"name\": \"Youtube\","
1787 " \"url\": \"youtube.com\""
1788 " },"
1789 " {"
1790 " \"name\": \"Chromium\","
1791 " \"url\": \"chromium.org\""
1792 " },"
1793 " {"
1794 " \"name\": \"More Stuff\","
1795 " \"children\": ["
1796 " {"
1797 " \"name\": \"Bugs\","
1798 " \"url\": \"crbug.com\""
1799 " }"
1800 " ]"
1801 " }"
1802 " ]"
1803 " }"
1804 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461805 [testing_policies addEntriesFromDictionary:@{
1806 managed_bookmarks_key : managed_bookmarks_value
1807 }];
1808 [allowed_experimental_policies addObject:managed_bookmarks_key];
1809 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241810
Guillaume Jenkins25e9bd72020-08-27 17:39:061811 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1812 // policy.
1813 if ([allowed_experimental_policies count] > 0) {
1814 [testing_policies setValue:allowed_experimental_policies
1815 forKey:base::SysUTF8ToNSString(
1816 policy::key::kEnableExperimentalPolicies)];
1817 }
1818
jlebel2eb40222022-05-06 11:15:421819 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1820 switch ([defaults integerForKey:metrics_reporting_key]) {
1821 case 1:
1822 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131823 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421824 break;
1825 case 2:
1826 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131827 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421828 break;
1829 default:
1830 // Metrics reporting not managed.
1831 break;
1832 }
1833
David Jean6f85d44f2021-08-19 08:08:451834 // Warning: Add new flags to TestingPoliciesHash() below.
1835
David Jean5ca263c2021-08-18 09:19:301836 return testing_policies;
1837}
David Jean6f85d44f2021-08-19 08:08:451838
David Jean5ca263c2021-08-18 09:19:301839} // namespace
1840
Gauthier Ambard02dbf022022-08-23 08:28:471841// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301842void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1843 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1844
1845 // Set the UA flag if UseMobileSafariUA is enabled.
1846 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1847 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1848 // Chrome puts its product token.
1849 int32_t major = 0;
1850 int32_t minor = 0;
1851 int32_t bugfix = 0;
1852 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1853 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1854
1855 command_line->AppendSwitchASCII(switches::kUserAgent,
1856 web::BuildMobileUserAgent(product));
1857 }
1858
1859 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341860 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301861
1862 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1863 // Management to enabled and add the token to the list of policies.
1864 NSString* token_key =
1865 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1866 NSString* token = [defaults stringForKey:token_key];
1867
1868 if ([token length] > 0) {
1869 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1870 [testing_policies setValue:token forKey:token_key];
1871 }
1872
Guillaume Jenkins57606d72020-08-13 17:32:551873 // If some policies were set, commit them to the app's registration defaults.
1874 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401875 NSDictionary* registration_defaults =
1876 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1877 [defaults registerDefaults:registration_defaults];
1878 }
1879
sdefresne14900ee2015-11-27 14:43:211880 // Freeform commandline flags. These are added last, so that any flags added
1881 // earlier in this function take precedence.
1882 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1883 base::CommandLine::StringVector flags;
1884 // Append an empty "program" argument.
1885 flags.push_back("");
1886
1887 // The number of flags corresponds to the number of text fields in
1888 // Experimental.plist.
1889 const int kNumFreeformFlags = 5;
1890 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1891 NSString* key =
1892 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1893 NSString* flag = [defaults stringForKey:key];
1894 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331895 // iOS keyboard replaces -- with —, so undo that.
1896 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1897 withString:@"--"
1898 options:0
1899 range:NSMakeRange(0, 1)];
1900 // To make things easier, allow flags with no dashes by prepending them
1901 // here. This also allows for flags that just have one dash if they
1902 // exist.
1903 if (![flag hasPrefix:@"-"]) {
1904 flag = [@"--" stringByAppendingString:flag];
1905 }
sdefresne14900ee2015-11-27 14:43:211906 flags.push_back(base::SysNSStringToUTF8(flag));
1907 }
1908 }
1909
1910 base::CommandLine temp_command_line(flags);
1911 command_line->AppendArguments(temp_command_line, false);
1912 }
msardafc76f662017-02-24 12:46:281913
justincohendacc85d2017-06-28 23:34:101914 // Populate command line flag for 3rd party keyboard omnibox workaround.
1915 NSString* enableThirdPartyKeyboardWorkaround =
1916 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1917 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1918 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1919 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1920 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1921 }
1922
Sylvain Defresned3cd8d92022-01-18 13:35:081923 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211924}
1925
sdefresne14900ee2015-11-27 14:43:211926void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1927 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181928 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111929 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531930 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211931}
1932
jkrcalbf073372016-07-29 07:21:311933std::vector<std::string> RegisterAllFeatureVariationParameters(
1934 flags_ui::FlagsStorage* flags_storage,
1935 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181936 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1937 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311938}
1939
sdefresne14900ee2015-11-27 14:43:211940void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1941 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501942 base::Value::List& supported_entries,
1943 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181944 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211945 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511946 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211947}
1948
1949void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1950 const std::string& internal_name,
1951 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181952 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1953 enable);
sdefresne14900ee2015-11-27 14:43:211954}
1955
1956void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181957 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211958}
1959
Nicolas MacBeth972e2592023-02-23 15:22:091960bool IsRestartNeededToCommitChanges() {
1961 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1962}
1963
sdefresne14900ee2015-11-27 14:43:211964namespace testing {
1965
Elly Fong-Jones323ab1092021-08-23 22:36:311966base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1967 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531968 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211969}
1970
1971} // namespace testing