blob: ef928815cd62f88273e7e8306935d6ced454b053 [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Avi Drissmaneac566b02023-08-18 02:56:2114#import "base/apple/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5716#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3617#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4118#import "base/functional/bind.h"
19#import "base/functional/callback_helpers.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
Menghan YANGf3fe2de52023-02-27 16:38:5027#import "components/bookmarks/common/bookmark_features.h"
Marc Treib1f6c5db992024-01-04 20:25:1428#import "components/browser_sync/browser_sync_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
Salma Elmahallawye8a5df12024-01-15 19:33:4135#import "components/enterprise/idle/idle_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5736#import "components/feature_engagement/public/feature_constants.h"
37#import "components/feature_engagement/public/feature_list.h"
38#import "components/feed/feed_feature_list.h"
39#import "components/flags_ui/feature_entry.h"
40#import "components/flags_ui/feature_entry_macros.h"
41#import "components/flags_ui/flags_storage.h"
42#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2543#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0345#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5746#import "components/ntp_tiles/switches.h"
47#import "components/omnibox/browser/omnibox_field_trial.h"
48#import "components/omnibox/common/omnibox_features.h"
49#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2050#import "components/optimization_guide/core/optimization_guide_switches.h"
Vasilii Sukhanov32b14452023-10-12 17:31:2751#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5752#import "components/password_manager/core/common/password_manager_features.h"
53#import "components/payments/core/features.h"
54#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4055#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/policy/policy_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5757#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3058#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2959#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2560#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5761#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
62#import "components/signin/core/browser/account_reconcilor.h"
63#import "components/signin/ios/browser/features.h"
64#import "components/signin/public/base/signin_switches.h"
65#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1566#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "components/sync/base/command_line_switches.h"
68#import "components/sync/base/features.h"
69#import "components/sync/base/pref_names.h"
70#import "components/translate/core/browser/translate_prefs.h"
71#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3472#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3073#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5374#import "ios/chrome/browser/crash_report/model/features.h"
Aman Verma10315df62023-10-02 11:56:5675#import "ios/chrome/browser/credential_provider_promo/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1176#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1477#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1778#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Vincent Boisselle8b321bb2023-11-28 13:58:3180#import "ios/chrome/browser/follow/model/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5881#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
Chris Lue687fc72023-10-27 02:42:1982#import "ios/chrome/browser/parcel_tracking/features.h"
mmrashadd0c7f952023-12-14 13:36:3883#import "ios/chrome/browser/policy/model/policy_util.h"
Stepan Khapugin5694d702024-01-31 13:23:0884#import "ios/chrome/browser/promos_manager/model/features.h"
mmrashadf158cad942023-10-03 09:15:4885#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Sylvain Defresneb81065002024-01-23 10:51:2286#import "ios/chrome/browser/sessions/features.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4687#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3588#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3689#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
90#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2891#import "ios/chrome/browser/text_selection/model/text_selection_util.h"
Hira Mahmood6b0e5502023-06-12 21:51:4392#import "ios/chrome/browser/ui/default_promo/post_restore/features.h"
Ewann1a9d33d2021-06-14 11:12:2493#import "ios/chrome/browser/ui/download/features.h"
adamta273568472020-12-04 23:53:5794#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0195#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Filipa Senra0bd07982023-12-19 10:56:2596#import "ios/chrome/browser/ui/page_info/features.h"
Robbie Gibson686c56732021-10-04 17:11:4597#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1598#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:4199#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:19100#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58101#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Weizhong Xia8b908bda2023-12-05 16:00:22102#import "ios/chrome/browser/web/model/features.h"
Gauthier Ambard999088c2022-09-13 08:36:57103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48111#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
elawrence816f6790e2017-06-16 18:19:28118using flags_ui::FeatureEntry;
119
sdefresne14900ee2015-11-27 14:43:21120namespace {
Emily Starkbafa9062017-12-27 15:22:46121
Nohemi Fernandezc00842a2021-07-26 11:47:34122const FeatureEntry::Choice
123 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
124 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
125 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
126 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
127 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
128};
129
Cheick Cisse8835611a2023-06-02 21:42:54130// Uses int values from DefaultPromoType enum.
131const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
132 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
133 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
134 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
135 "1"},
136 {"Show tailored made for ios promo",
137 "default-browser-promo-force-show-promo", "2"},
138 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
139 "3"},
140 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
141};
142
Stepan Khapugincc4e9842019-01-23 13:38:13143const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
144 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
157
158const FeatureEntry::FeatureVariation
159 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
160 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53161 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13162 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13174
Stepan Khapuginbac467e2022-05-06 21:11:54175const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
176 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
181
182const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
183 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
184 nullptr},
185 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
186 nullptr},
187 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
188 nullptr},
189};
190
Christian Xucf26d562022-07-06 09:28:36191const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
192 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
197
198const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
199 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
200 nullptr},
201 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
202 nullptr},
203 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
204 nullptr},
205};
206
Cheick Cissedc49dbe2023-08-09 13:33:52207const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51208 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
209 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
210const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
211 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
212const FeatureEntry::FeatureParam
213 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
214 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
215
216const FeatureEntry::FeatureVariation
217 kOmniboxCompanyEntityAdjustmentVariations[] = {
218 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
219 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
220 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
221 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
222 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
223 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
224};
225
Gayane Petrosyane3ee8b42024-02-02 18:48:12226const FeatureEntry::FeatureParam kDefaultBrowserVideoFullscreenPromo[] = {
227 {kDefaultBrowserVideoPromoVariant, kVideoFullscreenPromo}};
228const FeatureEntry::FeatureParam kDefaultBrowserVideoHalfscreenPromo[] = {
229 {kDefaultBrowserVideoPromoVariant, kVideoHalfscreenPromo}};
Cheick Cissedc49dbe2023-08-09 13:33:52230
Cheick Cisse2806f082b2023-04-25 14:20:01231const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Gayane Petrosyane3ee8b42024-02-02 18:48:12232 {"Show half screen ui", kDefaultBrowserVideoHalfscreenPromo,
233 std::size(kDefaultBrowserVideoHalfscreenPromo), nullptr},
234 {"Show full screen ui", kDefaultBrowserVideoFullscreenPromo,
235 std::size(kDefaultBrowserVideoFullscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01236};
237
adamta37c6b832023-03-10 20:04:09238// Uses int values from SigninPromoViewStyle enum.
239const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
240 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09241const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59242 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09243const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59244 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47245
Mohammad Refaatab6bee62022-05-16 16:31:15246const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09247 {"Standard", kDiscoverFeedTopSyncPromoStandard,
248 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09249 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
250 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
251 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
252 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15253
Guillem Perez40086ef2023-11-20 20:03:52254const FeatureEntry::FeatureParam kContentPushNotificationsEnabledPromo[] = {
255 {kContentPushNotificationsExperimentType, "1"}};
256const FeatureEntry::FeatureParam kContentPushNotificationsEnabledSetupLists[] =
257 {{kContentPushNotificationsExperimentType, "2"}};
Guillem Perez222b5b22024-01-20 02:16:27258const FeatureEntry::FeatureParam kContentPushNotificationsEnabledProvisional[] =
259 {{kContentPushNotificationsExperimentType, "3"}};
Guillem Perez40086ef2023-11-20 20:03:52260
261const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
262 {"Promo", kContentPushNotificationsEnabledPromo,
263 std::size(kContentPushNotificationsEnabledPromo), nullptr},
264 {"Set up list", kContentPushNotificationsEnabledSetupLists,
Guillem Perez222b5b22024-01-20 02:16:27265 std::size(kContentPushNotificationsEnabledSetupLists), nullptr},
266 {"Provisional Notification", kContentPushNotificationsEnabledProvisional,
267 std::size(kContentPushNotificationsEnabledProvisional), nullptr}};
Guillem Perez40086ef2023-11-20 20:03:52268
adamta4a6f2fd22023-02-13 17:37:14269const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
270 {kDisableStickyHeaderForFollowingFeed, "true"}};
271const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18272 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14273const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
274 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18275 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14276
277const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
278 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
279 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
280 {"Reduced header height", kFeedHeaderSettingReducedHeight,
281 std::size(kFeedHeaderSettingReducedHeight), nullptr},
282 {"All improvements", kFeedHeaderSettingAllImprovements,
283 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
284
Chris Ludca9ce32023-09-20 16:53:50285const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35286 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50287const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35288 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08289
gogerald0e39e3aa2021-02-10 18:41:23290const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50291 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
292 std::size(kStartSurfaceTenSeconds), nullptr},
293 {"1h:Show Home Surface", kStartSurfaceOneHour,
294 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08295};
gogerald0e39e3aa2021-02-10 18:41:23296
Chris Luce928eb2023-05-12 21:36:26297const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
298 {kMagicStackMostVisitedModuleParam, "true"},
299 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22300const FeatureEntry::FeatureParam
301 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
302 {kMagicStackMostVisitedModuleParam, "true"},
303 {kReducedSpaceParam, "-80"},
304 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13305const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26306 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13307 {kReducedSpaceParam, "20"}};
308const FeatureEntry::FeatureParam
309 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
310 {kMagicStackMostVisitedModuleParam, "false"},
311 {kReducedSpaceParam, "20"},
312 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26313
314const FeatureEntry::FeatureVariation kMagicStackVariations[]{
315 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
316 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22317 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
318 kMagicStackMostVisitedModuleHideIrrelevantModules,
319 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13320 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
321 std::size(kMagicStackReducedNTPTopSpace), nullptr},
322 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
323 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
324 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26325};
326
Chris Lu6fd4eaf2023-08-08 18:29:30327const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
328 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
329
330const FeatureEntry::FeatureVariation
331 kSegmentationPlatformIosModuleRankerVariations[]{
332 {"Enabled With Default Model Parameter (Must Set this!)",
333 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
334 };
335
Scott Yoderaf2bdf32024-01-30 20:26:15336const FeatureEntry::FeatureParam kIOSTipsNotifications5SecondTrigger[] = {
337 {kIOSTipsNotificationsTriggerTimeParam, "5s"},
338};
339const FeatureEntry::FeatureParam kIOSTipsNotifications10SecondTrigger[] = {
340 {kIOSTipsNotificationsTriggerTimeParam, "10s"},
341};
342const FeatureEntry::FeatureVariation kIOSTipsNotificationsVariations[] = {
343 {"(5s trigger)", kIOSTipsNotifications5SecondTrigger,
344 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
345 {"(10s trigger)", kIOSTipsNotifications10SecondTrigger,
346 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
347};
348
Ed Chin91e44992022-07-27 13:42:34349#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26350// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01351const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04352 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
353 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01354 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04355 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01356const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04357 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
358 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01359 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04360 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01361const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04362 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
363 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01364 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04365 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01366const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
368 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04370 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01371const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04372 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
373 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01374 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
375 {kBackgroundRefreshIntervalInSeconds, "0"}};
376const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04377 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
378 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01379 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
380 {kBackgroundRefreshIntervalInSeconds, "0"}};
381const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
382 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
383 {kEnableRecurringBackgroundRefreshSchedule, "false"},
384 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
385 {kBackgroundRefreshIntervalInSeconds, "0"}};
386const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
387 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
388 {kEnableRecurringBackgroundRefreshSchedule, "true"},
389 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
390 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04391
Ed Chin178ec2a2023-02-10 22:21:26392// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04393const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01394 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
395 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
396 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
397 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
398 {"1hr Interval 1hr Max Age Recurring",
399 kOneHourIntervalOneHourMaxAgeRecurring,
400 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
401 {"4hr Interval 6hr Max Age Recurring",
402 kFourHourIntervalSixHourMaxAgeRecurring,
403 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
404 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
405 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
406 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
407 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
408 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
409 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
410 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
411 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04412};
Ed Chin91e44992022-07-27 13:42:34413#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04414
Raj T18a2c8c2023-03-15 17:20:15415const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
416 {"date", "true"}};
417const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
418 {"address", "true"}};
419const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
420 {"phonenumber", "true"}};
421const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
422 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50423const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
424 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15425const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
426 {"date", "true"},
427 {"address", "true"},
428 {"phonenumber", "true"},
429 {"email", "true"}};
430const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
431 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
432 std::size(kEnableExpKitTextClassifierAll), nullptr},
433 {"Enabled for date", kEnableExpKitTextClassifierDate,
434 std::size(kEnableExpKitTextClassifierDate), nullptr},
435 {"Enabled for address", kEnableExpKitTextClassifierAddress,
436 std::size(kEnableExpKitTextClassifierAddress), nullptr},
437 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
438 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
439 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50440 std::size(kEnableExpKitTextClassifierEmail), nullptr},
441 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
442 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15443
Louis Romero93e9b50a2023-01-26 01:46:12444const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
445 {kTabInactivityThresholdParameterName,
446 kTabInactivityThresholdOneWeekParam}};
447const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
448 {kTabInactivityThresholdParameterName,
449 kTabInactivityThresholdTwoWeeksParam}};
450const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
451 {kTabInactivityThresholdParameterName,
452 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58453const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
454 {kTabInactivityThresholdParameterName,
455 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12456
457const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
458 {"One week", kTabInactivityThresholdOneWeek,
459 std::size(kTabInactivityThresholdOneWeek), nullptr},
460 {"Two weeks", kTabInactivityThresholdTwoWeeks,
461 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
462 {"Three weeks", kTabInactivityThresholdThreeWeeks,
463 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58464 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
465 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12466};
467
Ewann Pelle6eecb8f2023-06-23 14:31:37468const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
469 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
470const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
471 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
472const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
473 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55474const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
475 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37476
477const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
478 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00479 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37480 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00481 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37482 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00483 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55484 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
485 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00486};
487
488const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
489 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
490const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
491 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48492const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
493 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00494
495const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
496 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
497 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48498 {"Most recent tab and last synced tab (12 hours threshold)",
499 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
500 {"Most recent tab and last synced tab (24 hours threshold)",
501 kTabResumptionAllTabsOneDayThreshold,
502 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37503};
504
Huiting Yud7d2a5322023-02-09 21:14:22505const FeatureEntry::FeatureParam
506 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
507 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
508const FeatureEntry::FeatureParam
509 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
510 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
511const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20512 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20513 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
514 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22515
516const FeatureEntry::FeatureVariation
517 kCredentialProviderExtensionPromoVariations[] = {
518 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
519 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
520 {"On password copied",
521 kCredentialProviderExtensionPromoOnPasswordCopied,
522 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20523 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30524 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22525
Olivier ROBINfd3887b72023-02-23 14:45:42526const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
527 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44528const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
529 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42530const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
531 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44532 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
533 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
534 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42535
Olivier ROBIN2613bcd02023-04-20 10:00:47536const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
537 {kIOSEditMenuSearchWithTitleParamTitle,
538 kIOSEditMenuSearchWithTitleSearchWithParam}};
539const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
540 {kIOSEditMenuSearchWithTitleParamTitle,
541 kIOSEditMenuSearchWithTitleSearchParam}};
542const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
543 {kIOSEditMenuSearchWithTitleParamTitle,
544 kIOSEditMenuSearchWithTitleWebSearchParam}};
545const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
546 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
547 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
548 {"Search", kIOSEditMenuSearchWithTitleSearch,
549 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
550 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
551 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
552};
553
Hira Mahmood6b0e5502023-06-12 21:51:43554const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
555 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
556const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
557 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
558const FeatureEntry::FeatureVariation
559 kPostRestoreDefaultBrowserPromoVariations[] = {
560 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
561 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
562 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
563 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
564};
565
Christian Xu07d600192023-07-24 12:29:52566const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
567 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
568const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
569 {kBottomOmniboxDefaultSettingParam,
570 kBottomOmniboxDefaultSettingParamBottom}};
571const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
572 {{kBottomOmniboxDefaultSettingParam,
573 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
574const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
575 {
576 {"Top", kBottomOmniboxDefaultSettingTop,
577 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
578 {"Bottom", kBottomOmniboxDefaultSettingBottom,
579 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
580 {"Bottom for Safari Switcher",
581 kBottomOmniboxDefaultSettingSafariSwitcher,
582 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
583};
584
Christian Xue72882d2023-11-20 17:10:48585const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
586 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
587const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
588 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
589 nullptr},
590};
591
Christian Xua3667352023-11-21 16:54:09592const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
593 {kBottomOmniboxPromoDefaultPositionParam,
594 kBottomOmniboxPromoDefaultPositionParamTop}};
595const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
596 {kBottomOmniboxPromoDefaultPositionParam,
597 kBottomOmniboxPromoDefaultPositionParamBottom}};
598const FeatureEntry::FeatureVariation
599 kBottomOmniboxPromoDefaultPositionVariations[] = {
600 {"Top", kBottomOmniboxPromoDefaultPositionTop,
601 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
602 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
603 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
604};
605
Marc Treib9bddebb2023-06-15 14:03:34606const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
607 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25608 {"Disabled", "disable-features",
609 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24610 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02611 "FeedBottomSyncStringRemoval,"
612 "SyncEnableContactInfoDataTypeInTransportMode,"
613 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
614 "SyncEnableBatchUploadLocalData,"
615 "SyncEnableWalletMetadataInTransportMode,"
616 "SyncEnableWalletOfferInTransportMode,"
617 "IOSPasswordSettingsBulkUploadLocalPasswords"},
618 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34619 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24620 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25621 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34622 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37623 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55624 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06625 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06626 "SyncEnableWalletOfferInTransportMode,"
627 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02628 {"Enabled with fast-follows", "enable-features",
629 "ReplaceSyncPromosWithSignInPromos,"
630 "ConsistencyNewAccountInterface,"
631 "FeedBottomSyncStringRemoval,"
632 "SyncEnableContactInfoDataTypeInTransportMode,"
633 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
634 "SyncEnableBatchUploadLocalData,"
635 "SyncEnableWalletMetadataInTransportMode,"
636 "SyncEnableWalletOfferInTransportMode,"
637 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33638 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07639 "EnableBatchUploadFromBookmarksManager,"
Jood Hajeerf1f3e8d2023-12-20 13:35:55640 "EnableReviewAccountSettingsPromo,"
641 "LinkAccountSettingsToPrivacyFooter,"
642 "IPH_iOSReplaceSyncPromosWithSignInPromos"},
Marc Treib9bddebb2023-06-15 14:03:34643};
644
Olivier ROBIN82b67002023-07-31 14:34:46645const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
646 {web::features::kOneTapForMapsConsentModeParamTitle,
647 web::features::kOneTapForMapsConsentModeDefaultParam}};
648const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
649 {web::features::kOneTapForMapsConsentModeParamTitle,
650 web::features::kOneTapForMapsConsentModeForcedParam}};
651const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
652 {web::features::kOneTapForMapsConsentModeParamTitle,
653 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31654const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
655 {web::features::kOneTapForMapsConsentModeParamTitle,
656 web::features::kOneTapForMapsConsentModeIPHParam}};
657const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
658 {web::features::kOneTapForMapsConsentModeParamTitle,
659 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46660const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
661 {"Consent Default", kOneTapForMapsConsentModeDefault,
662 std::size(kOneTapForMapsConsentModeDefault), nullptr},
663 {"Consent Forced", kOneTapForMapsConsentModeForced,
664 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31665 {"Consent IPH", kOneTapForMapsConsentModeIPH,
666 std::size(kOneTapForMapsConsentModeIPH), nullptr},
667 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
668 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46669 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
670 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
671};
672
Stepan Khapuginec68d5bb2023-10-16 13:35:25673constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
674 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19675 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25676constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
677 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19678 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25679constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
680 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19681 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25682constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
683 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19684 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25685
686constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
687 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
688 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
689 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
690 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
691 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
692 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
693 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
694 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
695};
696
Rafał Godlewskie75d12402023-10-25 15:31:53697const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
698 {"Default", "", ""},
699 {"Bootstraping Only", switches::kEnableFeatures,
700 "SharingOfferKeyPairBootstrap"},
701 {"Enabled", switches::kEnableFeatures,
702 "SharingOfferKeyPairBootstrap,SendPasswords,"
703 "PasswordManagerEnableSenderService,"
704 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
705};
706
Scott Yoderd781bd12023-10-25 20:47:15707const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
708 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
709const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
710 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
711 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
712};
713
Matt Jones79534392023-10-27 14:35:02714const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
715 {{commerce::kParcelTrackingTestDataParam,
716 commerce::kParcelTrackingTestDataParamDelivered}};
717const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
718 {{commerce::kParcelTrackingTestDataParam,
719 commerce::kParcelTrackingTestDataParamInProgress}};
720const flags_ui::FeatureEntry::FeatureParam
721 kParcelTrackingTestDataOutForDelivery[] = {
722 {commerce::kParcelTrackingTestDataParam,
723 commerce::kParcelTrackingTestDataParamOutForDelivery}};
724const flags_ui::FeatureEntry::FeatureVariation
725 kParcelTrackingTestDataVariations[] = {
726 {"Delivered", kParcelTrackingTestDataDelivered,
727 std::size(kParcelTrackingTestDataDelivered), nullptr},
728 {"In progress", kParcelTrackingTestDataInProgress,
729 std::size(kParcelTrackingTestDataInProgress), nullptr},
730 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
731 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
732};
733
Benjamin Williams1dc8f2342024-01-04 21:25:55734const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
735 {kIOSDockingPromoExperimentType, "0"}};
736const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
737 {kIOSDockingPromoExperimentType, "1"}};
738const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
739 {kIOSDockingPromoExperimentType, "2"}};
740
741const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
742 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
743 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
744 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
745 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
746 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
747 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
748
Cooper Knaak1e026562017-07-26 05:22:28749// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21750// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28751// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
752// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21753// macro for this type supplying the command line to the macro.
754// . MULTI_VALUE: a list of choices, the first of which should correspond to a
755// deactivated state for this lab (i.e. no command line option). To specify
756// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
757// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28758// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
759// either enabled, disabled, or uses the default value of the associated
760// base::Feature instance. To specify this type of entry use the macro
761// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
762// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
763// base::Feature instance. Choices corresponding to the default state, a
764// universally enabled state, and a universally disabled state are
765// automatically included. To specify this type of entry use the macro
766// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
767// the array of choices.
768//
sdefresne14900ee2015-11-27 14:43:21769// See the documentation of FeatureEntry for details on the fields.
770//
771// When adding a new choice, add it to the end of the list.
772const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28773 {"in-product-help-demo-mode-choice",
774 flag_descriptions::kInProductHelpDemoModeName,
775 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
776 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23777 feature_engagement::kIPHDemoMode,
778 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09779 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22780 {"enable-autofill-credit-card-upload",
781 flag_descriptions::kAutofillCreditCardUploadName,
782 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24783 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23784 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
785 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
786 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51787 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23788 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
789 {"wallet-service-use-sandbox",
790 flag_descriptions::kWalletServiceUseSandboxName,
791 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
792 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
793 autofill::switches::kWalletServiceUseSandbox,
794 "1",
795 autofill::switches::kWalletServiceUseSandbox,
796 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59797 {"show-autofill-type-predictions",
798 flag_descriptions::kShowAutofillTypePredictionsName,
799 flag_descriptions::kShowAutofillTypePredictionsDescription,
800 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50801 FEATURE_VALUE_TYPE(
802 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05803 {"fullscreen-promos-manager-skip-internal-limits",
804 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
805 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
806 flags_ui::kOsIos,
807 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14808 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53809 flag_descriptions::kFullscreenSmoothScrollingName,
810 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19811 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06812 {"webpage-default-zoom-from-dynamic-type",
813 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
814 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
815 flags_ui::kOsIos,
816 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56817 {"webpage-alternative-text-zoom",
818 flag_descriptions::kWebPageAlternativeTextZoomName,
819 flag_descriptions::kWebPageAlternativeTextZoomDescription,
820 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34821 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
822 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
823 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13824 {"omnibox-ui-max-autocomplete-matches",
825 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
826 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
827 flags_ui::kOsIos,
828 FEATURE_WITH_PARAMS_VALUE_TYPE(
829 omnibox::kUIExperimentMaxAutocompleteMatches,
830 kOmniboxUIMaxAutocompleteMatchesVariations,
831 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35832 {"omnibox-local-history-zero-suggest-beyond-ntp",
833 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
834 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
835 flags_ui::kOsIos,
836 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54837 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
838 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
839 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
840 kOmniboxMaxZPSMatchesVariations,
841 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25842 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
843 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
844 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
845 kOmniboxInspireMeVariants,
846 "OmniboxBundledExperimentV1")},
847 {"omnibox-inspire-me-signed-out",
848 flag_descriptions::kOmniboxInspireMeSignedOutName,
849 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
850 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48851 {"force-startup-signin-promo",
852 flag_descriptions::kForceStartupSigninPromoName,
853 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29854 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41855 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
856 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
857 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13858#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45859 {"screen-time-integration-ios",
860 flag_descriptions::kScreenTimeIntegrationName,
861 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
862 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13863#endif
Nazerke3e993f72020-09-21 13:00:06864 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
865 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
866 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11867 {"ios-shared-highlighting-color-change",
868 flag_descriptions::kIOSSharedHighlightingColorChangeName,
869 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07870 flags_ui::kOsIos,
871 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34872 {"ios-shared-highlighting-v2",
873 flag_descriptions::kIOSSharedHighlightingV2Name,
874 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51876 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
877 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
Scott Yoderaf2bdf32024-01-30 20:26:15878 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSTipsNotifications,
879 kIOSTipsNotificationsVariations,
880 "IOSTipsNotifications")},
Stepan Khapugin04341202021-01-07 12:22:45881 {"omnibox-new-textfield-implementation",
882 flag_descriptions::kOmniboxNewImplementationName,
883 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
884 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19885 {"start-surface", flag_descriptions::kStartSurfaceName,
886 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23887 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
888 kStartSurfaceVariations,
889 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19890 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
891 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
892 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34893 {"wait-threshold-seconds-for-capabilities-api",
894 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
895 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
896 flags_ui::kOsIos,
897 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28898 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
899 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24901 {"content-push-notifications",
902 flag_descriptions::kContentPushNotificationsName,
903 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52904 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
905 kContentPushNotificationsVariations,
906 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57907 {"overflow-menu-customization",
908 flag_descriptions::kOverflowMenuCustomizationName,
909 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44911 {"enable-lens-in-omnibox-copied-image",
912 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
913 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
914 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40915 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23916 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
917 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40918 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23919 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03920 {"enable-disco-feed-endpoint",
921 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
922 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
923 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11924 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15925 {"enable-discover-feed-top-sync-promo",
926 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
927 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
928 flags_ui::kOsIos,
929 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
930 kDiscoverFeedTopSyncPromoVariations,
931 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14932 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
933 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
934 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
935 kFeedHeaderSettingsVariations,
936 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28937 {"shared-highlighting-amp",
938 flag_descriptions::kIOSSharedHighlightingAmpName,
939 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
940 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28941 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42942 commerce::flag_descriptions::kCommercePriceTrackingName,
943 commerce::flag_descriptions::kCommercePriceTrackingDescription,
944 flags_ui::kOsIos,
945 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
946 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15947 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06948 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
949 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
950 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54951 {"ntp-view-hierarchy-repair",
952 flag_descriptions::kNTPViewHierarchyRepairName,
953 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20954 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26955 {"autofill-enable-card-product-name",
956 flag_descriptions::kAutofillEnableCardProductNameName,
957 flag_descriptions::kAutofillEnableCardProductNameDescription,
958 flags_ui::kOsIos,
959 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52960 {"enable-download-service-foreground-session",
961 flag_descriptions::kDownloadServiceForegroundSessionName,
962 flag_descriptions::kDownloadServiceForegroundSessionDescription,
963 flags_ui::kOsIos,
964 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23965 {"enable-tflite-language-detection",
966 flag_descriptions::kTFLiteLanguageDetectionName,
967 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20969 {"optimization-guide-debug-logs",
970 flag_descriptions::kOptimizationGuideDebugLogsName,
971 flag_descriptions::kOptimizationGuideDebugLogsDescription,
972 flags_ui::kOsIos,
973 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55974 {"optimization-guide-push-notifications",
975 flag_descriptions::kOptimizationGuidePushNotificationClientName,
976 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
977 flags_ui::kOsIos,
978 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25979 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
980 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
981 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01982 {"suggestions-scrolling-ipad",
983 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
984 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
985 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00986 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
987 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jeanad303a92023-07-31 16:58:11989 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
990 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
991 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:22992 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
993 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
994 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
Raj T7db7a0e2022-11-17 16:33:08995 {"enable-expkit-text-classifier",
996 flag_descriptions::kEnableExpKitTextClassifierName,
997 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:15998 flags_ui::kOsIos,
999 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1000 kEnableExpKitTextClassifierVariations,
1001 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331002 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1003 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461004 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1005 kOneTapForMapsWithVariations,
1006 "OneTapForMaps")},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251007 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1008 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1009 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301010 {"autofill-enable-ranking-formula-address-profiles",
1011 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1012 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1013 flags_ui::kOsIos,
1014 FEATURE_VALUE_TYPE(
1015 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391016 {"autofill-enable-ranking-formula-credit-cards",
1017 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1018 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1019 flags_ui::kOsIos,
1020 FEATURE_VALUE_TYPE(
1021 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021022 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1023 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1024 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521025 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1026 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261027 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1028 kMagicStackVariations,
1029 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211030 {"ios-hide-feed-with-search-choice",
1031 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1032 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151033 flags_ui::kOsIos,
1034 FEATURE_WITH_PARAMS_VALUE_TYPE(
1035 kIOSHideFeedWithSearchChoice,
1036 kIOSHideFeedWithSearchChoiceVariations,
1037 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311038 {"ios-keyboard-accessory-upgrade",
1039 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1040 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1041 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261042 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1043 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1044 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291045 {"ios-magic-stack-segmentation-ranking",
1046 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1047 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1048 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301049 FEATURE_WITH_PARAMS_VALUE_TYPE(
1050 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1051 kSegmentationPlatformIosModuleRankerVariations,
1052 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061053 {"default-browser-intents-show-settings",
1054 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1055 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1056 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321057 {"ios-password-bottom-sheet",
1058 flag_descriptions::kIOSPasswordBottomSheetName,
1059 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1060 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281061 {"ios-password-bottom-sheet-autofocus",
1062 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1063 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1064 flags_ui::kOsIos,
1065 FEATURE_VALUE_TYPE(
1066 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Moe Ahmadi098519d82022-07-27 18:34:241067 {"omnibox-zero-suggest-prefetching",
1068 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1069 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1070 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451071 {"omnibox-zero-suggest-prefetching-on-srp",
1072 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1073 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1074 flags_ui::kOsIos,
1075 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1076 {"omnibox-zero-suggest-prefetching-on-web",
1077 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1078 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1079 flags_ui::kOsIos,
1080 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471081 {"omnibox-zero-suggest-in-memory-caching",
1082 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1083 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1084 flags_ui::kOsIos,
1085 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351086 {"omnibox-on-device-tail-suggestions",
1087 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1088 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1089 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361090 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1091 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1092 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1093 kOmniboxMaxURLMatchesVariations,
1094 "OmniboxMaxURLMatches")},
Stepan Khapugin1f83c5ae2024-01-31 15:55:201095 {"omnibox-most-visited-tiles-horizontal-render-group",
1096 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupName,
1097 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupDescription,
1098 flags_ui::kOsIos,
1099 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTilesHorizontalRenderGroup)},
Olivier Robin60d3a062022-07-06 17:34:061100 {"metrickit-non-crash-reports",
1101 flag_descriptions::kMetrickitNonCrashReportName,
1102 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1103 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371104 {"autofill-enable-remade-downstream-metrics",
1105 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1106 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1107 flags_ui::kOsIos,
1108 FEATURE_VALUE_TYPE(
1109 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551110 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1111 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1112 flag_descriptions::
1113 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1114 flags_ui::kOsIos,
1115 FEATURE_VALUE_TYPE(
1116 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011117 {"default-browser-video-promo",
1118 flag_descriptions::kDefaultBrowserVideoPromoName,
1119 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1120 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1121 kDefaultBrowserVideoPromoVariations,
1122 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541123 {"default-browser-promo-force-show-promo",
1124 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1125 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1126 flags_ui::kOsIos,
1127 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171128 {"default-browser-promo-trigger-criteria-experiment",
1129 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1130 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1131 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501132 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441133 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211134 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1135 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1136 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501137 {"fullscreen-promo-on-omnibox-copy-paste",
1138 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1139 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1140 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341141#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1142 {"feed-background-refresh-ios",
1143 flag_descriptions::kFeedBackgroundRefreshName,
1144 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1145 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1146 kFeedBackgroundRefreshVariations,
1147 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261148#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191149 {"omnibox-keyboard-paste-button",
1150 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1151 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1152 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501153 {"enable-tflite-language-detection-ignore",
1154 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1155 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1156 flags_ui::kOsIos,
1157 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571158 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1159 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1160 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411161 {"credential-provider-extension-promo",
1162 flag_descriptions::kCredentialProviderExtensionPromoName,
1163 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221164 flags_ui::kOsIos,
1165 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1166 kCredentialProviderExtensionPromoVariations,
1167 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251168 {"iph-price-notifications-while-browsing",
1169 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1170 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1171 flags_ui::kOsIos,
1172 FEATURE_VALUE_TYPE(
1173 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501174 {"autofill-suggest-server-card-instead-of-local-card",
1175 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1176 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1177 flags_ui::kOsIos,
1178 FEATURE_VALUE_TYPE(
1179 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Ewann Pelledec2d042023-01-25 15:28:391180 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1181 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1182 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481183 {"local-pdp-detection",
1184 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1185 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1186 flags_ui::kOsIos,
1187 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121188 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1189 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1190 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1191 kTabInactivityThresholdVariations,
1192 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181193 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1194 flag_descriptions::
1195 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1196 flag_descriptions::
1197 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1198 flags_ui::kOsIos,
1199 FEATURE_VALUE_TYPE(
1200 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361201 {"enable-friendlier-safe-browsing-settings-standard-protection",
1202 flag_descriptions::
1203 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1204 flag_descriptions::
1205 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521206 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361207 FEATURE_VALUE_TYPE(
1208 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291209 {"enable-red-interstitial-facelift",
1210 flag_descriptions::kEnableRedInterstitialFaceliftName,
1211 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1212 flags_ui::kOsIos,
1213 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421214 {"ios-edit-menu-partial-translate",
1215 flag_descriptions::kIOSEditMenuPartialTranslateName,
1216 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421217 flags_ui::kOsIos,
1218 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1219 kIOSEditMenuPartialTranslateVariations,
1220 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431221 {"notification-settings-menu-item",
1222 flag_descriptions::kNotificationSettingsMenuItemName,
1223 flag_descriptions::kNotificationSettingsMenuItemDescription,
1224 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061225 {"spotlight-reading-list-source",
1226 flag_descriptions::kSpotlightReadingListSourceName,
1227 flag_descriptions::kSpotlightReadingListSourceDescription,
1228 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481229 {"enable-policy-test-page-ios",
1230 flag_descriptions::kEnablePolicyTestPageName,
1231 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1232 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531233 {"web-feed-feedback-reroute",
1234 flag_descriptions::kWebFeedFeedbackRerouteName,
1235 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551237 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1238 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1239 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431240 {"enable-follow-IPH-exp-params",
1241 flag_descriptions::kEnableFollowIPHExpParamsName,
1242 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1243 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031244 {"enable-follow-management-instant-reload",
1245 flag_descriptions::kEnableFollowManagementInstantReloadName,
1246 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1247 flags_ui::kOsIos,
1248 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251249 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1250 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441252 {"mixed-content-autoupgrade-ios",
1253 flag_descriptions::kMixedContentAutoupgradeName,
1254 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1255 FEATURE_VALUE_TYPE(
1256 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421257 {"enable-preferences-account-storage",
1258 flag_descriptions::kEnablePreferencesAccountStorageName,
1259 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1260 flags_ui::kOsIos,
1261 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201262 {"ios-browser-edit-menu-metrics",
1263 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1264 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1265 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551266 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1267 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1268 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1269 kIOSDockingPromoVariations,
1270 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241271 {"omnibox-grouping-framework-zps",
1272 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1273 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1274 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1275 {"omnibox-grouping-framework-non-zps",
1276 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1277 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1278 flags_ui::kOsIos,
1279 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471280 {"enable-session-serialization-optimizations",
1281 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1282 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1283 flags_ui::kOsIos,
1284 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221285 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391286 {"only-access-clipboard-async",
1287 flag_descriptions::kOnlyAccessClipboardAsyncName,
1288 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191290 {"omnibox-improved-rtl-suggestions",
1291 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1292 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1293 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471294 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1295 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1296 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1297 kIOSEditMenuSearchWithVariations,
1298 "IOSEditMenuSearchWith")},
1299 {"ios-edit-menu-hide-search-web",
1300 flag_descriptions::kIOSEditMenuHideSearchWebName,
1301 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1302 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171303 {"autofill-enable-card-art-image",
1304 flag_descriptions::kAutofillEnableCardArtImageName,
1305 flag_descriptions::kAutofillEnableCardArtImageDescription,
1306 flags_ui::kOsIos,
1307 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451308 {"enable-signed-out-view-demotion",
1309 flag_descriptions::kEnableSignedOutViewDemotionName,
1310 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1311 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401312 {"enable-startup-latency-improvements",
1313 flag_descriptions::kEnableStartupImprovementsName,
1314 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1315 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251316 {"autofill-use-two-dots-for-last-four-digits",
1317 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1318 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1319 flags_ui::kOsIos,
1320 FEATURE_VALUE_TYPE(
1321 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241322 {"autofill-disable-profile-updates",
1323 flag_descriptions::kAutofillDisableProfileUpdatesName,
1324 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1325 flags_ui::kOsIos,
1326 FEATURE_VALUE_TYPE(
1327 autofill::features::test::kAutofillDisableProfileUpdates)},
1328 {"autofill-disable-silent-profile-updates",
1329 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1330 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1331 flags_ui::kOsIos,
1332 FEATURE_VALUE_TYPE(
1333 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1334 {"autofill-enable-admin-level-2",
1335 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1336 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1337 flags_ui::kOsIos,
1338 FEATURE_VALUE_TYPE(
1339 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1340 {"autofill-enable-between-streets",
1341 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1342 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1343 flags_ui::kOsIos,
1344 FEATURE_VALUE_TYPE(
1345 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1346 {"autofill-enable-landmark",
1347 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1348 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1349 flags_ui::kOsIos,
1350 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431351 {"post-restore-default-browser-promo",
1352 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1353 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1354 flags_ui::kOsIos,
1355 FEATURE_WITH_PARAMS_VALUE_TYPE(
1356 kPostRestoreDefaultBrowserPromo,
1357 kPostRestoreDefaultBrowserPromoVariations,
1358 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311359 {"spotlight-open-tabs-source",
1360 flag_descriptions::kSpotlightOpenTabsSourceName,
1361 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1362 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451363 {"spotlight-donate-new-intents",
1364 flag_descriptions::kSpotlightDonateNewIntentsName,
1365 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1366 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341367 {"replace-sync-promos-with-sign-in-promos",
1368 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1369 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1370 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301371 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571372 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1373 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1374 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371375 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1376 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1377 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1378 kTabPickupThresholdVariations,
1379 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321380 {"ios-iph-for-safari-switcher",
1381 flag_descriptions::kIPHForSafariSwitcherName,
1382 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1383 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071384 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1385 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1386 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011387 {"tab-resumption", flag_descriptions::kTabResumptionName,
1388 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001389 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1390 kTabResumptionVariations,
1391 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521392 {"bottom-omnibox-default-setting",
1393 flag_descriptions::kBottomOmniboxDefaultSettingName,
1394 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1395 flags_ui::kOsIos,
1396 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1397 kBottomOmniboxDefaultSettingVariations,
1398 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131399 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1400 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1401 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
adamta7be73b182023-08-08 22:30:351402 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1403 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1404 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501405 {"ios-password-auth-on-entry-v2",
1406 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1407 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1408 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281409 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1410 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1411 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131412 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1413 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1414 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021415 {"parcel-tracking-test-data",
1416 commerce::flag_descriptions::kParcelTrackingTestDataName,
1417 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1418 flags_ui::kOsIos,
1419 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1420 kParcelTrackingTestDataVariations,
1421 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111422 {"autofill-enable-merchant-domain-in-unmask-card-request",
1423 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1424 flag_descriptions::
1425 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1426 flags_ui::kOsIos,
1427 FEATURE_VALUE_TYPE(
1428 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331429 {"autofill-update-chrome-settings-link-to-gpay-web",
1430 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1431 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1432 flags_ui::kOsIos,
1433 FEATURE_VALUE_TYPE(
1434 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281435 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1436 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1437 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591438 {"iph-ios-promo-manager-widget-promo",
1439 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1440 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1441 flags_ui::kOsIos,
1442 FEATURE_VALUE_TYPE(
1443 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571444 {"autofill-enable-virtual-cards",
1445 flag_descriptions::kAutofillEnableVirtualCardsName,
1446 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1447 flags_ui::kOsIos,
1448 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551449 {"ios-incognito-downloads-warning",
1450 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1451 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1452 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571453 {"omnibox-shortcuts-database-ios",
1454 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1455 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211456 flags_ui::kOsIos,
1457 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021458 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1459 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1460 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Rubin Deliallisi072bc842023-10-19 12:00:411461 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1462 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1463 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121464 {"sync-session-on-visibility-changed",
1465 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1466 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1467 flags_ui::kOsIos,
1468 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451469 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1470 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1471 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531472 {"password-sharing", flag_descriptions::kPasswordSharingName,
1473 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1474 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511475 {"omnibox-company-entity-icon-adjustment",
1476 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1477 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1478 flags_ui::kOsIos,
1479 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1480 kOmniboxCompanyEntityAdjustmentVariations,
1481 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051482 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1483 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1484 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1485 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1486 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1487 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351488 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1489 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1490 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471491 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1492 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1493 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131494 {"autofill-enable-payments-mandatory-reauth",
1495 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1496 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1497 flags_ui::kOsIos,
1498 FEATURE_VALUE_TYPE(
1499 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231500 {"autofill-enable-card-benefits",
1501 flag_descriptions::kAutofillEnableCardBenefitsName,
1502 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1503 flags_ui::kOsIos,
1504 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201505 {"password-manager-signin-uff",
1506 flag_descriptions::kIOSPasswordSignInUffName,
1507 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1508 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011509 {"tab-grid-compositional-layout",
1510 flag_descriptions::kTabGridCompositionalLayoutName,
1511 flag_descriptions::kTabGridCompositionalLayoutDescription,
1512 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411513 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1514 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1515 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481516 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1517 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1518 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1519 kBottomOmniboxPromoVariations,
1520 "BottomOmniboxPromoFRE")},
1521 {"bottom-omnibox-promo-app-launch",
1522 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1523 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1524 flags_ui::kOsIos,
1525 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1526 kBottomOmniboxPromoVariations,
1527 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091528 {"bottom-omnibox-promo-default-position",
1529 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1530 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1531 flags_ui::kOsIos,
1532 FEATURE_WITH_PARAMS_VALUE_TYPE(
1533 kBottomOmniboxPromoDefaultPosition,
1534 kBottomOmniboxPromoDefaultPositionVariations,
1535 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251536 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1537 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1538 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171539 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1540 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1541 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Mike Dougherty330188d52023-12-20 16:33:241542 {"remove-old-web-state-restore",
1543 flag_descriptions::kRemoveOldWebStateRestoreName,
1544 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1545 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031546 {"share-in-web-context-menu-ios",
1547 flag_descriptions::kShareInWebContextMenuIOSName,
1548 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1549 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141550 {"migrate-syncing-user-to-signed-in",
1551 flag_descriptions::kMigrateSyncingUserToSignedInName,
1552 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1553 flags_ui::kOsIos,
1554 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1555 {"undo-migration-of-syncing-user-to-signed-in",
1556 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1557 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1558 flags_ui::kOsIos,
1559 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551560 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1561 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1562 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461563 {"contextual-panel", flag_descriptions::kContextualPanelName,
1564 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1565 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591566 {"omnibox-popup-row-content-configuration",
1567 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1568 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1569 flags_ui::kOsIos,
1570 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391571 {"contextual-panel-force-show-entrypoint",
1572 flag_descriptions::kContextualPanelForceShowEntrypointName,
1573 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1574 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321575 {"bottom-omnibox-promo-region-filter",
1576 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1577 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1578 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471579 {"enable-ipad-feed-ghost-cards",
1580 flag_descriptions::kEnableiPadFeedGhostCardsName,
1581 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1582 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Jood Hajeerbbbf1ac2024-01-26 12:50:451583 {"remember-custom-passphrase-after-signout",
1584 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutName,
1585 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutDescription,
1586 flags_ui::kOsIos,
1587 FEATURE_VALUE_TYPE(syncer::kSyncRememberCustomPassphraseAfterSignout)},
Louis Romerof3144822024-01-30 10:24:161588 {"tab-grid-always-bounce", flag_descriptions::kTabGridAlwaysBounceName,
1589 flag_descriptions::kTabGridAlwaysBounceDescription, flags_ui::kOsIos,
1590 FEATURE_VALUE_TYPE(kTabGridAlwaysBounce)},
Jason Hud445445f2024-02-02 18:28:121591 {"disable-lens-camera", flag_descriptions::kDisableLensCameraName,
1592 flag_descriptions::kDisableLensCameraDescription, flags_ui::kOsIos,
1593 FEATURE_VALUE_TYPE(kDisableLensCamera)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301594};
sdefresne14900ee2015-11-27 14:43:211595
Rohit Raobed794c2020-04-27 15:27:451596bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1597 return false;
1598}
1599
1600flags_ui::FlagsState& GetGlobalFlagsState() {
1601 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1602 nullptr);
1603 return *flags_state;
1604}
David Jean5ca263c2021-08-18 09:19:301605// Creates the experimental test policies map, used by AsyncPolicyLoader and
1606// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341607NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211608 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1609
Guillaume Jenkins25e9bd72020-08-27 17:39:061610 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551611 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061612 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551613
Guillaume Jenkins25e9bd72020-08-27 17:39:061614 // Set some sample policy values for testing if EnableSamplePolicies is set to
1615 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401616 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551617 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011618 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1619
Guillaume Jenkinseeb7007c2020-06-25 22:55:401620 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1621
1622 // 2 = Disable all variations
1623 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1624
1625 // 2 = Do not allow any site to show popups
1626 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1627
Tina Wang5abee802020-07-29 23:09:521628 // Set default search engine.
1629 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1630 @YES,
1631 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1632 @"http://www.google.com/search?q={searchTerms}",
1633 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021634 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521635
Tina Wang89068c842020-10-29 15:51:501636 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1637
Gauthier Ambard21b23702021-04-16 16:11:271638 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1639
Tina Wang59d0b7e2020-08-11 04:41:011640 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531641
1642 // 2 = Enhanced safe browsing protection
1643 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1644
1645 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291646
1647 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551648 }];
1649 }
1650
Ewann227a3c02021-04-19 12:04:541651 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041652 NSString* sync_policy_key =
1653 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301654 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541655 }
Ewann227a3c02021-04-19 12:04:541656
Ewann570a6302021-08-17 07:22:421657 // SyncTypesListDisabled policy.
1658 NSString* Sync_types_list_disabled_key =
1659 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1660 NSMutableArray* Sync_types_list_disabled_values =
1661 [[NSMutableArray alloc] init];
1662 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1663 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1664 }
1665 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1666 [Sync_types_list_disabled_values addObject:@"readingList"];
1667 }
1668 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1669 [Sync_types_list_disabled_values addObject:@"preferences"];
1670 }
1671 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1672 [Sync_types_list_disabled_values addObject:@"passwords"];
1673 }
1674 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1675 [Sync_types_list_disabled_values addObject:@"autofill"];
1676 }
1677 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1678 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1679 }
1680 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1681 [Sync_types_list_disabled_values addObject:@"tabs"];
1682 }
1683 if ([Sync_types_list_disabled_values count]) {
1684 [testing_policies addEntriesFromDictionary:@{
1685 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1686 }];
Ewann570a6302021-08-17 07:22:421687 }
1688
Gauthier Ambard073eaa92021-11-22 15:24:131689 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521690 NSString* incognito_policy_key =
1691 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1692 NSInteger incognito_mode_availability =
1693 [defaults integerForKey:incognito_policy_key];
1694 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521695 [testing_policies addEntriesFromDictionary:@{
1696 incognito_policy_key : @(incognito_mode_availability),
1697 }];
1698 }
1699
Ewann40a8f8a2021-07-29 10:01:201700 NSString* restriction_pattern =
1701 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1702 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291703 NSString* restrict_key =
1704 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201705 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291706 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201707 }];
1708 }
1709
Vincent Boisselle19200bc2021-09-01 17:58:251710 // If the sign-in policy is set (not "None"), add the policy key to the list
1711 // of enabled experimental policies, and set the value.
1712 NSString* const kSigninPolicyKey = @"BrowserSignin";
1713 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1714 if (signin_policy_mode) {
1715 // Remove the mode offset that was used to represent the unset policy.
1716 --signin_policy_mode;
1717 DCHECK(signin_policy_mode >= 0);
1718
Vincent Boisselle19200bc2021-09-01 17:58:251719 [testing_policies addEntriesFromDictionary:@{
1720 kSigninPolicyKey : @(signin_policy_mode),
1721 }];
1722 }
1723
Veronique Nguyen9b1044f2022-01-11 14:41:131724 // If the New Tab Page URL is set (not empty) add the value to the list of
1725 // test policies.
1726 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1727 if ([ntp_location length] > 0) {
1728 NSString* ntp_location_key =
1729 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1730 [testing_policies
1731 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571732 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131733 }
1734
Ali Juma9ec36d22022-03-28 14:53:121735 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1736 NSString* allow_backups_key =
1737 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1738 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1739 [allowed_experimental_policies addObject:allow_backups_key];
1740 }
1741
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241742 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1743 NSString* password_manager_key =
1744 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1745 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1746 [allowed_experimental_policies addObject:password_manager_key];
1747 }
Vincent Boisselle003569a72023-09-11 16:03:121748
1749 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1750 NSString* user_policy_merge_key =
1751 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1752 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1753 [allowed_experimental_policies addObject:user_policy_merge_key];
1754 }
1755
Arthur Milchiorbb44f5c82023-03-14 16:14:461756 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1757 NSString* managed_bookmarks_key =
1758 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1759 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571760 @"["
1761 // The following gets filtered out from
1762 // the JSON string when parsed.
1763 " {"
1764 " \"toplevel_name\": \"Managed Bookmarks\""
1765 " },"
1766 " {"
1767 " \"name\": \"Google\","
1768 " \"url\": \"google.com\""
1769 " },"
1770 " {"
1771 " \"name\": \"Empty Folder\","
1772 " \"children\": []"
1773 " },"
1774 " {"
1775 " \"name\": \"Big Folder\","
1776 " \"children\": ["
1777 " {"
1778 " \"name\": \"Youtube\","
1779 " \"url\": \"youtube.com\""
1780 " },"
1781 " {"
1782 " \"name\": \"Chromium\","
1783 " \"url\": \"chromium.org\""
1784 " },"
1785 " {"
1786 " \"name\": \"More Stuff\","
1787 " \"children\": ["
1788 " {"
1789 " \"name\": \"Bugs\","
1790 " \"url\": \"crbug.com\""
1791 " }"
1792 " ]"
1793 " }"
1794 " ]"
1795 " }"
1796 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461797 [testing_policies addEntriesFromDictionary:@{
1798 managed_bookmarks_key : managed_bookmarks_value
1799 }];
1800 [allowed_experimental_policies addObject:managed_bookmarks_key];
1801 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241802
Guillaume Jenkins25e9bd72020-08-27 17:39:061803 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1804 // policy.
1805 if ([allowed_experimental_policies count] > 0) {
1806 [testing_policies setValue:allowed_experimental_policies
1807 forKey:base::SysUTF8ToNSString(
1808 policy::key::kEnableExperimentalPolicies)];
1809 }
1810
jlebel2eb40222022-05-06 11:15:421811 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1812 switch ([defaults integerForKey:metrics_reporting_key]) {
1813 case 1:
1814 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131815 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421816 break;
1817 case 2:
1818 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131819 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421820 break;
1821 default:
1822 // Metrics reporting not managed.
1823 break;
1824 }
1825
David Jean6f85d44f2021-08-19 08:08:451826 // Warning: Add new flags to TestingPoliciesHash() below.
1827
David Jean5ca263c2021-08-18 09:19:301828 return testing_policies;
1829}
David Jean6f85d44f2021-08-19 08:08:451830
David Jean5ca263c2021-08-18 09:19:301831} // namespace
1832
Gauthier Ambard02dbf022022-08-23 08:28:471833// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301834void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1835 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1836
1837 // Set the UA flag if UseMobileSafariUA is enabled.
1838 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1839 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1840 // Chrome puts its product token.
1841 int32_t major = 0;
1842 int32_t minor = 0;
1843 int32_t bugfix = 0;
1844 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1845 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1846
1847 command_line->AppendSwitchASCII(switches::kUserAgent,
1848 web::BuildMobileUserAgent(product));
1849 }
1850
1851 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341852 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301853
1854 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1855 // Management to enabled and add the token to the list of policies.
1856 NSString* token_key =
1857 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1858 NSString* token = [defaults stringForKey:token_key];
1859
1860 if ([token length] > 0) {
1861 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1862 [testing_policies setValue:token forKey:token_key];
1863 }
1864
Guillaume Jenkins57606d72020-08-13 17:32:551865 // If some policies were set, commit them to the app's registration defaults.
1866 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401867 NSDictionary* registration_defaults =
1868 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1869 [defaults registerDefaults:registration_defaults];
1870 }
1871
sdefresne14900ee2015-11-27 14:43:211872 // Freeform commandline flags. These are added last, so that any flags added
1873 // earlier in this function take precedence.
1874 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1875 base::CommandLine::StringVector flags;
1876 // Append an empty "program" argument.
1877 flags.push_back("");
1878
1879 // The number of flags corresponds to the number of text fields in
1880 // Experimental.plist.
1881 const int kNumFreeformFlags = 5;
1882 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1883 NSString* key =
1884 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1885 NSString* flag = [defaults stringForKey:key];
1886 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331887 // iOS keyboard replaces -- with —, so undo that.
1888 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1889 withString:@"--"
1890 options:0
1891 range:NSMakeRange(0, 1)];
1892 // To make things easier, allow flags with no dashes by prepending them
1893 // here. This also allows for flags that just have one dash if they
1894 // exist.
1895 if (![flag hasPrefix:@"-"]) {
1896 flag = [@"--" stringByAppendingString:flag];
1897 }
sdefresne14900ee2015-11-27 14:43:211898 flags.push_back(base::SysNSStringToUTF8(flag));
1899 }
1900 }
1901
1902 base::CommandLine temp_command_line(flags);
1903 command_line->AppendArguments(temp_command_line, false);
1904 }
msardafc76f662017-02-24 12:46:281905
justincohendacc85d2017-06-28 23:34:101906 // Populate command line flag for 3rd party keyboard omnibox workaround.
1907 NSString* enableThirdPartyKeyboardWorkaround =
1908 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1909 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1910 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1911 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1912 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1913 }
1914
Sylvain Defresned3cd8d92022-01-18 13:35:081915 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211916}
1917
sdefresne14900ee2015-11-27 14:43:211918void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1919 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181920 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111921 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531922 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211923}
1924
jkrcalbf073372016-07-29 07:21:311925std::vector<std::string> RegisterAllFeatureVariationParameters(
1926 flags_ui::FlagsStorage* flags_storage,
1927 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181928 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1929 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311930}
1931
sdefresne14900ee2015-11-27 14:43:211932void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1933 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501934 base::Value::List& supported_entries,
1935 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181936 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211937 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511938 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211939}
1940
1941void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1942 const std::string& internal_name,
1943 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181944 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1945 enable);
sdefresne14900ee2015-11-27 14:43:211946}
1947
1948void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181949 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211950}
1951
Nicolas MacBeth972e2592023-02-23 15:22:091952bool IsRestartNeededToCommitChanges() {
1953 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1954}
1955
sdefresne14900ee2015-11-27 14:43:211956namespace testing {
1957
Elly Fong-Jones323ab1092021-08-23 22:36:311958base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1959 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531960 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211961}
1962
1963} // namespace testing