blob: 6c79c4eda98b1d0e7dd43c4cf2301ae0ccffc21e [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 Perez749b3fc2024-02-13 19:29:49260// TODO(b/322348322): Remove provisional notifications bypass conditions testing
261// flag param.
262const FeatureEntry::FeatureParam
263 kContentPushNotificationsEnabledProvisionalBypass[] = {
264 {kContentPushNotificationsExperimentType, "4"}};
Guillem Perez40086ef2023-11-20 20:03:52265
266const FeatureEntry::FeatureVariation kContentPushNotificationsVariations[] = {
267 {"Promo", kContentPushNotificationsEnabledPromo,
268 std::size(kContentPushNotificationsEnabledPromo), nullptr},
269 {"Set up list", kContentPushNotificationsEnabledSetupLists,
Guillem Perez222b5b22024-01-20 02:16:27270 std::size(kContentPushNotificationsEnabledSetupLists), nullptr},
271 {"Provisional Notification", kContentPushNotificationsEnabledProvisional,
Guillem Perez749b3fc2024-02-13 19:29:49272 std::size(kContentPushNotificationsEnabledProvisional), nullptr},
273 {"Provisional Ignore Conditions",
274 kContentPushNotificationsEnabledProvisionalBypass,
275 std::size(kContentPushNotificationsEnabledProvisionalBypass), nullptr}};
Guillem Perez40086ef2023-11-20 20:03:52276
adamta4a6f2fd22023-02-13 17:37:14277const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
278 {kDisableStickyHeaderForFollowingFeed, "true"}};
279const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18280 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14281const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
282 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18283 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14284
285const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
286 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
287 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
288 {"Reduced header height", kFeedHeaderSettingReducedHeight,
289 std::size(kFeedHeaderSettingReducedHeight), nullptr},
290 {"All improvements", kFeedHeaderSettingAllImprovements,
291 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
292
Chris Ludca9ce32023-09-20 16:53:50293const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35294 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50295const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35296 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08297
gogerald0e39e3aa2021-02-10 18:41:23298const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50299 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
300 std::size(kStartSurfaceTenSeconds), nullptr},
301 {"1h:Show Home Surface", kStartSurfaceOneHour,
302 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08303};
gogerald0e39e3aa2021-02-10 18:41:23304
Chris Luce928eb2023-05-12 21:36:26305const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
306 {kMagicStackMostVisitedModuleParam, "true"},
307 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22308const FeatureEntry::FeatureParam
309 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
310 {kMagicStackMostVisitedModuleParam, "true"},
311 {kReducedSpaceParam, "-80"},
312 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13313const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26314 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13315 {kReducedSpaceParam, "20"}};
316const FeatureEntry::FeatureParam
317 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
318 {kMagicStackMostVisitedModuleParam, "false"},
319 {kReducedSpaceParam, "20"},
320 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26321
322const FeatureEntry::FeatureVariation kMagicStackVariations[]{
323 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
324 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22325 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
326 kMagicStackMostVisitedModuleHideIrrelevantModules,
327 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13328 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
329 std::size(kMagicStackReducedNTPTopSpace), nullptr},
330 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
331 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
332 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26333};
334
Chris Lu6fd4eaf2023-08-08 18:29:30335const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
336 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
337
338const FeatureEntry::FeatureVariation
339 kSegmentationPlatformIosModuleRankerVariations[]{
340 {"Enabled With Default Model Parameter (Must Set this!)",
341 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
342 };
343
Scott Yoderaf2bdf32024-01-30 20:26:15344const FeatureEntry::FeatureParam kIOSTipsNotifications5SecondTrigger[] = {
345 {kIOSTipsNotificationsTriggerTimeParam, "5s"},
346};
347const FeatureEntry::FeatureParam kIOSTipsNotifications10SecondTrigger[] = {
348 {kIOSTipsNotificationsTriggerTimeParam, "10s"},
349};
350const FeatureEntry::FeatureVariation kIOSTipsNotificationsVariations[] = {
351 {"(5s trigger)", kIOSTipsNotifications5SecondTrigger,
352 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
353 {"(10s trigger)", kIOSTipsNotifications10SecondTrigger,
354 std::size(kIOSTipsNotifications10SecondTrigger), nullptr},
355};
356
Ed Chin91e44992022-07-27 13:42:34357#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26358// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01359const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04360 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
361 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01362 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04363 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01364const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04365 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
366 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01367 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04368 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01369const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04370 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
371 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01372 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04373 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01374const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04375 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
376 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01377 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04378 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01379const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04380 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
381 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01382 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
383 {kBackgroundRefreshIntervalInSeconds, "0"}};
384const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04385 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
386 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01387 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
388 {kBackgroundRefreshIntervalInSeconds, "0"}};
389const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
390 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
391 {kEnableRecurringBackgroundRefreshSchedule, "false"},
392 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
393 {kBackgroundRefreshIntervalInSeconds, "0"}};
394const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
395 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
396 {kEnableRecurringBackgroundRefreshSchedule, "true"},
397 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
398 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04399
Ed Chin178ec2a2023-02-10 22:21:26400// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04401const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01402 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
403 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
404 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
405 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
406 {"1hr Interval 1hr Max Age Recurring",
407 kOneHourIntervalOneHourMaxAgeRecurring,
408 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
409 {"4hr Interval 6hr Max Age Recurring",
410 kFourHourIntervalSixHourMaxAgeRecurring,
411 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
412 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
413 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
414 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
415 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
416 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
417 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
418 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
419 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04420};
Ed Chin91e44992022-07-27 13:42:34421#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04422
Raj T18a2c8c2023-03-15 17:20:15423const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
424 {"date", "true"}};
425const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
426 {"address", "true"}};
427const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
428 {"phonenumber", "true"}};
429const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
430 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50431const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
432 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15433const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
434 {"date", "true"},
435 {"address", "true"},
436 {"phonenumber", "true"},
437 {"email", "true"}};
438const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
439 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
440 std::size(kEnableExpKitTextClassifierAll), nullptr},
441 {"Enabled for date", kEnableExpKitTextClassifierDate,
442 std::size(kEnableExpKitTextClassifierDate), nullptr},
443 {"Enabled for address", kEnableExpKitTextClassifierAddress,
444 std::size(kEnableExpKitTextClassifierAddress), nullptr},
445 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
446 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
447 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50448 std::size(kEnableExpKitTextClassifierEmail), nullptr},
449 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
450 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15451
Louis Romero93e9b50a2023-01-26 01:46:12452const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
453 {kTabInactivityThresholdParameterName,
454 kTabInactivityThresholdOneWeekParam}};
455const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
456 {kTabInactivityThresholdParameterName,
457 kTabInactivityThresholdTwoWeeksParam}};
458const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
459 {kTabInactivityThresholdParameterName,
460 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58461const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
462 {kTabInactivityThresholdParameterName,
463 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12464
465const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
466 {"One week", kTabInactivityThresholdOneWeek,
467 std::size(kTabInactivityThresholdOneWeek), nullptr},
468 {"Two weeks", kTabInactivityThresholdTwoWeeks,
469 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
470 {"Three weeks", kTabInactivityThresholdThreeWeeks,
471 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58472 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
473 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12474};
475
Ewann Pelle6eecb8f2023-06-23 14:31:37476const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
477 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
478const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
479 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
480const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
481 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55482const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
483 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37484
485const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
486 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00487 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37488 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00489 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37490 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00491 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55492 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
493 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00494};
495
496const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
497 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
498const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
499 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48500const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
501 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00502
503const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
504 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
505 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48506 {"Most recent tab and last synced tab (12 hours threshold)",
507 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
508 {"Most recent tab and last synced tab (24 hours threshold)",
509 kTabResumptionAllTabsOneDayThreshold,
510 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37511};
512
Huiting Yud7d2a5322023-02-09 21:14:22513const FeatureEntry::FeatureParam
514 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
515 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
516const FeatureEntry::FeatureParam
517 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
518 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
519const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20520 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20521 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
522 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22523
524const FeatureEntry::FeatureVariation
525 kCredentialProviderExtensionPromoVariations[] = {
526 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
527 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
528 {"On password copied",
529 kCredentialProviderExtensionPromoOnPasswordCopied,
530 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20531 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30532 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22533
Olivier ROBINfd3887b72023-02-23 14:45:42534const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
535 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44536const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
537 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42538const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
539 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44540 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
541 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
542 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42543
Olivier ROBIN2613bcd02023-04-20 10:00:47544const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
545 {kIOSEditMenuSearchWithTitleParamTitle,
546 kIOSEditMenuSearchWithTitleSearchWithParam}};
547const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
548 {kIOSEditMenuSearchWithTitleParamTitle,
549 kIOSEditMenuSearchWithTitleSearchParam}};
550const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
551 {kIOSEditMenuSearchWithTitleParamTitle,
552 kIOSEditMenuSearchWithTitleWebSearchParam}};
553const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
554 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
555 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
556 {"Search", kIOSEditMenuSearchWithTitleSearch,
557 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
558 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
559 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
560};
561
Hira Mahmood6b0e5502023-06-12 21:51:43562const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
563 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
564const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
565 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
566const FeatureEntry::FeatureVariation
567 kPostRestoreDefaultBrowserPromoVariations[] = {
568 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
569 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
570 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
571 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
572};
573
Christian Xu07d600192023-07-24 12:29:52574const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
575 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
576const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
577 {kBottomOmniboxDefaultSettingParam,
578 kBottomOmniboxDefaultSettingParamBottom}};
579const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
580 {{kBottomOmniboxDefaultSettingParam,
581 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
582const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
583 {
584 {"Top", kBottomOmniboxDefaultSettingTop,
585 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
586 {"Bottom", kBottomOmniboxDefaultSettingBottom,
587 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
588 {"Bottom for Safari Switcher",
589 kBottomOmniboxDefaultSettingSafariSwitcher,
590 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
591};
592
Christian Xue72882d2023-11-20 17:10:48593const FeatureEntry::FeatureParam kBottomOmniboxPromoForced[] = {
594 {kBottomOmniboxPromoParam, kBottomOmniboxPromoParamForced}};
595const FeatureEntry::FeatureVariation kBottomOmniboxPromoVariations[] = {
596 {"Forced", kBottomOmniboxPromoForced, std::size(kBottomOmniboxPromoForced),
597 nullptr},
598};
599
Christian Xua3667352023-11-21 16:54:09600const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionTop[] = {
601 {kBottomOmniboxPromoDefaultPositionParam,
602 kBottomOmniboxPromoDefaultPositionParamTop}};
603const FeatureEntry::FeatureParam kBottomOmniboxPromoDefaultPositionBottom[] = {
604 {kBottomOmniboxPromoDefaultPositionParam,
605 kBottomOmniboxPromoDefaultPositionParamBottom}};
606const FeatureEntry::FeatureVariation
607 kBottomOmniboxPromoDefaultPositionVariations[] = {
608 {"Top", kBottomOmniboxPromoDefaultPositionTop,
609 std::size(kBottomOmniboxPromoDefaultPositionTop), nullptr},
610 {"Bottom", kBottomOmniboxPromoDefaultPositionBottom,
611 std::size(kBottomOmniboxPromoDefaultPositionBottom), nullptr},
612};
613
Marc Treib9bddebb2023-06-15 14:03:34614const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
615 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25616 {"Disabled", "disable-features",
617 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24618 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02619 "FeedBottomSyncStringRemoval,"
620 "SyncEnableContactInfoDataTypeInTransportMode,"
621 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
622 "SyncEnableBatchUploadLocalData,"
623 "SyncEnableWalletMetadataInTransportMode,"
624 "SyncEnableWalletOfferInTransportMode,"
625 "IOSPasswordSettingsBulkUploadLocalPasswords"},
626 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34627 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24628 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25629 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34630 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37631 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55632 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06633 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06634 "SyncEnableWalletOfferInTransportMode,"
635 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02636 {"Enabled with fast-follows", "enable-features",
637 "ReplaceSyncPromosWithSignInPromos,"
638 "ConsistencyNewAccountInterface,"
639 "FeedBottomSyncStringRemoval,"
640 "SyncEnableContactInfoDataTypeInTransportMode,"
641 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
642 "SyncEnableBatchUploadLocalData,"
643 "SyncEnableWalletMetadataInTransportMode,"
644 "SyncEnableWalletOfferInTransportMode,"
645 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33646 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07647 "EnableBatchUploadFromBookmarksManager,"
Jood Hajeerf1f3e8d2023-12-20 13:35:55648 "EnableReviewAccountSettingsPromo,"
649 "LinkAccountSettingsToPrivacyFooter,"
650 "IPH_iOSReplaceSyncPromosWithSignInPromos"},
Marc Treib9bddebb2023-06-15 14:03:34651};
652
Olivier ROBIN82b67002023-07-31 14:34:46653const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
654 {web::features::kOneTapForMapsConsentModeParamTitle,
655 web::features::kOneTapForMapsConsentModeDefaultParam}};
656const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
657 {web::features::kOneTapForMapsConsentModeParamTitle,
658 web::features::kOneTapForMapsConsentModeForcedParam}};
659const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
660 {web::features::kOneTapForMapsConsentModeParamTitle,
661 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31662const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
663 {web::features::kOneTapForMapsConsentModeParamTitle,
664 web::features::kOneTapForMapsConsentModeIPHParam}};
665const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
666 {web::features::kOneTapForMapsConsentModeParamTitle,
667 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46668const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
669 {"Consent Default", kOneTapForMapsConsentModeDefault,
670 std::size(kOneTapForMapsConsentModeDefault), nullptr},
671 {"Consent Forced", kOneTapForMapsConsentModeForced,
672 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31673 {"Consent IPH", kOneTapForMapsConsentModeIPH,
674 std::size(kOneTapForMapsConsentModeIPH), nullptr},
675 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
676 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46677 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
678 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
679};
680
Stepan Khapuginec68d5bb2023-10-16 13:35:25681constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
682 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19683 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25684constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
685 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19686 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25687constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
688 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19689 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25690constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
691 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19692 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25693
694constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
695 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
696 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
697 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
698 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
699 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
700 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
701 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
702 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
703};
704
Rafał Godlewskie75d12402023-10-25 15:31:53705const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
706 {"Default", "", ""},
707 {"Bootstraping Only", switches::kEnableFeatures,
708 "SharingOfferKeyPairBootstrap"},
709 {"Enabled", switches::kEnableFeatures,
710 "SharingOfferKeyPairBootstrap,SendPasswords,"
711 "PasswordManagerEnableSenderService,"
712 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
713};
714
Scott Yoderd781bd12023-10-25 20:47:15715const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
716 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
717const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
718 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
719 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
720};
721
Matt Jones79534392023-10-27 14:35:02722const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
723 {{commerce::kParcelTrackingTestDataParam,
724 commerce::kParcelTrackingTestDataParamDelivered}};
725const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
726 {{commerce::kParcelTrackingTestDataParam,
727 commerce::kParcelTrackingTestDataParamInProgress}};
728const flags_ui::FeatureEntry::FeatureParam
729 kParcelTrackingTestDataOutForDelivery[] = {
730 {commerce::kParcelTrackingTestDataParam,
731 commerce::kParcelTrackingTestDataParamOutForDelivery}};
732const flags_ui::FeatureEntry::FeatureVariation
733 kParcelTrackingTestDataVariations[] = {
734 {"Delivered", kParcelTrackingTestDataDelivered,
735 std::size(kParcelTrackingTestDataDelivered), nullptr},
736 {"In progress", kParcelTrackingTestDataInProgress,
737 std::size(kParcelTrackingTestDataInProgress), nullptr},
738 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
739 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
740};
741
Benjamin Williams1dc8f2342024-01-04 21:25:55742const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAfterFRE[] = {
743 {kIOSDockingPromoExperimentType, "0"}};
744const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedAtAppLaunch[] = {
745 {kIOSDockingPromoExperimentType, "1"}};
746const FeatureEntry::FeatureParam kIOSDockingPromoDisplayedDuringFRE[] = {
747 {kIOSDockingPromoExperimentType, "2"}};
748
749const FeatureEntry::FeatureVariation kIOSDockingPromoVariations[] = {
750 {"Display promo after FRE", kIOSDockingPromoDisplayedAfterFRE,
751 std::size(kIOSDockingPromoDisplayedAfterFRE), nullptr},
752 {"Display promo at app launch", kIOSDockingPromoDisplayedAtAppLaunch,
753 std::size(kIOSDockingPromoDisplayedAtAppLaunch), nullptr},
754 {"Display promo during FRE", kIOSDockingPromoDisplayedDuringFRE,
755 std::size(kIOSDockingPromoDisplayedDuringFRE), nullptr}};
756
Cooper Knaak1e026562017-07-26 05:22:28757// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21758// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28759// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
760// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21761// macro for this type supplying the command line to the macro.
762// . MULTI_VALUE: a list of choices, the first of which should correspond to a
763// deactivated state for this lab (i.e. no command line option). To specify
764// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
765// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28766// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
767// either enabled, disabled, or uses the default value of the associated
768// base::Feature instance. To specify this type of entry use the macro
769// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
770// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
771// base::Feature instance. Choices corresponding to the default state, a
772// universally enabled state, and a universally disabled state are
773// automatically included. To specify this type of entry use the macro
774// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
775// the array of choices.
776//
sdefresne14900ee2015-11-27 14:43:21777// See the documentation of FeatureEntry for details on the fields.
778//
779// When adding a new choice, add it to the end of the list.
780const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28781 {"in-product-help-demo-mode-choice",
782 flag_descriptions::kInProductHelpDemoModeName,
783 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
784 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23785 feature_engagement::kIPHDemoMode,
786 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09787 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22788 {"enable-autofill-credit-card-upload",
789 flag_descriptions::kAutofillCreditCardUploadName,
790 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24791 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23792 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
793 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
794 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51795 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23796 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
797 {"wallet-service-use-sandbox",
798 flag_descriptions::kWalletServiceUseSandboxName,
799 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
800 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
801 autofill::switches::kWalletServiceUseSandbox,
802 "1",
803 autofill::switches::kWalletServiceUseSandbox,
804 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59805 {"show-autofill-type-predictions",
806 flag_descriptions::kShowAutofillTypePredictionsName,
807 flag_descriptions::kShowAutofillTypePredictionsDescription,
808 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50809 FEATURE_VALUE_TYPE(
810 autofill::features::test::kAutofillShowTypePredictions)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05811 {"fullscreen-promos-manager-skip-internal-limits",
812 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
813 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
814 flags_ui::kOsIos,
815 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14816 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53817 flag_descriptions::kFullscreenSmoothScrollingName,
818 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19819 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06820 {"webpage-default-zoom-from-dynamic-type",
821 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
822 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
823 flags_ui::kOsIos,
824 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56825 {"webpage-alternative-text-zoom",
826 flag_descriptions::kWebPageAlternativeTextZoomName,
827 flag_descriptions::kWebPageAlternativeTextZoomDescription,
828 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34829 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
830 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13832 {"omnibox-ui-max-autocomplete-matches",
833 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
834 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
835 flags_ui::kOsIos,
836 FEATURE_WITH_PARAMS_VALUE_TYPE(
837 omnibox::kUIExperimentMaxAutocompleteMatches,
838 kOmniboxUIMaxAutocompleteMatchesVariations,
839 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35840 {"omnibox-local-history-zero-suggest-beyond-ntp",
841 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
842 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
843 flags_ui::kOsIos,
844 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54845 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
846 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
847 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
848 kOmniboxMaxZPSMatchesVariations,
849 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25850 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
851 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
852 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
853 kOmniboxInspireMeVariants,
854 "OmniboxBundledExperimentV1")},
855 {"omnibox-inspire-me-signed-out",
856 flag_descriptions::kOmniboxInspireMeSignedOutName,
857 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
858 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Jérôme Lebelc374fdd2019-09-27 10:36:48859 {"force-startup-signin-promo",
860 flag_descriptions::kForceStartupSigninPromoName,
861 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29862 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tommy Martino6b4eb7e2020-06-25 18:25:41863 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
864 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
865 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13866#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45867 {"screen-time-integration-ios",
868 flag_descriptions::kScreenTimeIntegrationName,
869 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
870 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13871#endif
Nazerke3e993f72020-09-21 13:00:06872 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
873 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
874 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11875 {"ios-shared-highlighting-color-change",
876 flag_descriptions::kIOSSharedHighlightingColorChangeName,
877 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07878 flags_ui::kOsIos,
879 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34880 {"ios-shared-highlighting-v2",
881 flag_descriptions::kIOSSharedHighlightingV2Name,
882 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
883 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Scott Yoderc0cd99d2024-01-10 19:54:51884 {"ios-tips-notifications", flag_descriptions::kIOSTipsNotificationsName,
885 flag_descriptions::kIOSTipsNotificationsDescription, flags_ui::kOsIos,
Scott Yoderaf2bdf32024-01-30 20:26:15886 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSTipsNotifications,
887 kIOSTipsNotificationsVariations,
888 "IOSTipsNotifications")},
Stepan Khapugin04341202021-01-07 12:22:45889 {"omnibox-new-textfield-implementation",
890 flag_descriptions::kOmniboxNewImplementationName,
891 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
892 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
gogerald0ff29e52021-02-03 18:56:19893 {"start-surface", flag_descriptions::kStartSurfaceName,
894 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23895 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
896 kStartSurfaceVariations,
897 "StartSurface")},
Side Yilmaz6c53f7102021-09-07 13:26:19898 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
899 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34901 {"wait-threshold-seconds-for-capabilities-api",
902 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
903 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
904 flags_ui::kOsIos,
905 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28906 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
907 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24909 {"content-push-notifications",
910 flag_descriptions::kContentPushNotificationsName,
911 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
Guillem Perez40086ef2023-11-20 20:03:52912 FEATURE_WITH_PARAMS_VALUE_TYPE(kContentPushNotifications,
913 kContentPushNotificationsVariations,
914 "ContentPushNotifications")},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57915 {"overflow-menu-customization",
916 flag_descriptions::kOverflowMenuCustomizationName,
917 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
918 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44919 {"enable-lens-in-omnibox-copied-image",
920 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
921 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
922 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40923 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23924 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
925 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40926 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23927 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03928 {"enable-disco-feed-endpoint",
929 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
930 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
931 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11932 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15933 {"enable-discover-feed-top-sync-promo",
934 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
935 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
936 flags_ui::kOsIos,
937 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
938 kDiscoverFeedTopSyncPromoVariations,
939 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14940 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
941 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
942 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
943 kFeedHeaderSettingsVariations,
944 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28945 {"shared-highlighting-amp",
946 flag_descriptions::kIOSSharedHighlightingAmpName,
947 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
948 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28949 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42950 commerce::flag_descriptions::kCommercePriceTrackingName,
951 commerce::flag_descriptions::kCommercePriceTrackingDescription,
952 flags_ui::kOsIos,
953 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
954 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15955 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06956 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
957 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
958 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54959 {"ntp-view-hierarchy-repair",
960 flag_descriptions::kNTPViewHierarchyRepairName,
961 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20962 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26963 {"autofill-enable-card-product-name",
964 flag_descriptions::kAutofillEnableCardProductNameName,
965 flag_descriptions::kAutofillEnableCardProductNameDescription,
966 flags_ui::kOsIos,
967 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Raj Tb95d813542022-11-16 21:27:52968 {"enable-download-service-foreground-session",
969 flag_descriptions::kDownloadServiceForegroundSessionName,
970 flag_descriptions::kDownloadServiceForegroundSessionDescription,
971 flags_ui::kOsIos,
972 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23973 {"enable-tflite-language-detection",
974 flag_descriptions::kTFLiteLanguageDetectionName,
975 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
976 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20977 {"optimization-guide-debug-logs",
978 flag_descriptions::kOptimizationGuideDebugLogsName,
979 flag_descriptions::kOptimizationGuideDebugLogsDescription,
980 flags_ui::kOsIos,
981 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55982 {"optimization-guide-push-notifications",
983 flag_descriptions::kOptimizationGuidePushNotificationClientName,
984 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
985 flags_ui::kOsIos,
986 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:25987 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
988 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
989 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:01990 {"suggestions-scrolling-ipad",
991 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
992 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
993 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00994 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
995 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
996 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jeanad303a92023-07-31 16:58:11997 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
998 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
999 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
David Jeanea886ba2024-01-17 11:50:221000 {"intents-on-viewport", flag_descriptions::kEnableViewportIntentsName,
1001 flag_descriptions::kEnableViewportIntentsDescription, flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(web::features::kEnableViewportIntents)},
Raj T7db7a0e2022-11-17 16:33:081003 {"enable-expkit-text-classifier",
1004 flag_descriptions::kEnableExpKitTextClassifierName,
1005 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151006 flags_ui::kOsIos,
1007 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1008 kEnableExpKitTextClassifierVariations,
1009 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331010 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1011 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461012 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1013 kOneTapForMapsWithVariations,
1014 "OneTapForMaps")},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251015 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1016 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1017 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301018 {"autofill-enable-ranking-formula-address-profiles",
1019 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1020 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1021 flags_ui::kOsIos,
1022 FEATURE_VALUE_TYPE(
1023 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391024 {"autofill-enable-ranking-formula-credit-cards",
1025 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1026 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1027 flags_ui::kOsIos,
1028 FEATURE_VALUE_TYPE(
1029 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021030 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1031 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1032 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521033 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1034 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261035 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1036 kMagicStackVariations,
1037 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211038 {"ios-hide-feed-with-search-choice",
1039 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1040 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151041 flags_ui::kOsIos,
1042 FEATURE_WITH_PARAMS_VALUE_TYPE(
1043 kIOSHideFeedWithSearchChoice,
1044 kIOSHideFeedWithSearchChoiceVariations,
1045 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311046 {"ios-keyboard-accessory-upgrade",
1047 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1048 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1049 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261050 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1051 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1052 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291053 {"ios-magic-stack-segmentation-ranking",
1054 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1055 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1056 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301057 FEATURE_WITH_PARAMS_VALUE_TYPE(
1058 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1059 kSegmentationPlatformIosModuleRankerVariations,
1060 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061061 {"default-browser-intents-show-settings",
1062 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1063 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1064 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Veronique Nguyenc3d7db52023-03-08 22:52:321065 {"ios-password-bottom-sheet",
1066 flag_descriptions::kIOSPasswordBottomSheetName,
1067 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1068 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hetu5e726602023-12-15 15:18:281069 {"ios-password-bottom-sheet-autofocus",
1070 flag_descriptions::kIOSPasswordBottomSheetAutofocusName,
1071 flag_descriptions::kIOSPasswordBottomSheetAutofocusDescription,
1072 flags_ui::kOsIos,
1073 FEATURE_VALUE_TYPE(
1074 password_manager::features::kIOSPasswordBottomSheetAutofocus)},
Moe Ahmadi098519d82022-07-27 18:34:241075 {"omnibox-zero-suggest-prefetching",
1076 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1077 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1078 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451079 {"omnibox-zero-suggest-prefetching-on-srp",
1080 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1081 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1082 flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1084 {"omnibox-zero-suggest-prefetching-on-web",
1085 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1086 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1087 flags_ui::kOsIos,
1088 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471089 {"omnibox-zero-suggest-in-memory-caching",
1090 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1091 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1092 flags_ui::kOsIos,
1093 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351094 {"omnibox-on-device-tail-suggestions",
1095 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1096 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1097 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Christian Xucf26d562022-07-06 09:28:361098 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1099 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1100 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1101 kOmniboxMaxURLMatchesVariations,
1102 "OmniboxMaxURLMatches")},
Stepan Khapugin1f83c5ae2024-01-31 15:55:201103 {"omnibox-most-visited-tiles-horizontal-render-group",
1104 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupName,
1105 flag_descriptions::kMostVisitedTilesHorizontalRenderGroupDescription,
1106 flags_ui::kOsIos,
1107 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTilesHorizontalRenderGroup)},
Olivier Robin60d3a062022-07-06 17:34:061108 {"metrickit-non-crash-reports",
1109 flag_descriptions::kMetrickitNonCrashReportName,
1110 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1111 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371112 {"autofill-enable-remade-downstream-metrics",
1113 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1114 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1115 flags_ui::kOsIos,
1116 FEATURE_VALUE_TYPE(
1117 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551118 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1119 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1120 flag_descriptions::
1121 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1122 flags_ui::kOsIos,
1123 FEATURE_VALUE_TYPE(
1124 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011125 {"default-browser-video-promo",
1126 flag_descriptions::kDefaultBrowserVideoPromoName,
1127 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1128 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1129 kDefaultBrowserVideoPromoVariations,
1130 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541131 {"default-browser-promo-force-show-promo",
1132 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1133 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1134 flags_ui::kOsIos,
1135 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171136 {"default-browser-promo-trigger-criteria-experiment",
1137 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1138 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1139 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501140 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441141 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211142 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1143 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1144 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501145 {"fullscreen-promo-on-omnibox-copy-paste",
1146 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1147 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1148 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341149#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1150 {"feed-background-refresh-ios",
1151 flag_descriptions::kFeedBackgroundRefreshName,
1152 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1153 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1154 kFeedBackgroundRefreshVariations,
1155 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261156#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Christian Xu164a2e512022-08-01 20:38:191157 {"omnibox-keyboard-paste-button",
1158 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1159 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1160 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Olivier ROBINf05518782022-09-14 23:55:501161 {"enable-tflite-language-detection-ignore",
1162 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1163 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1164 flags_ui::kOsIos,
1165 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571166 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1167 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1168 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411169 {"credential-provider-extension-promo",
1170 flag_descriptions::kCredentialProviderExtensionPromoName,
1171 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221172 flags_ui::kOsIos,
1173 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1174 kCredentialProviderExtensionPromoVariations,
1175 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251176 {"iph-price-notifications-while-browsing",
1177 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1178 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1179 flags_ui::kOsIos,
1180 FEATURE_VALUE_TYPE(
1181 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501182 {"autofill-suggest-server-card-instead-of-local-card",
1183 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1184 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1185 flags_ui::kOsIos,
1186 FEATURE_VALUE_TYPE(
1187 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Ewann Pelledec2d042023-01-25 15:28:391188 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1189 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1190 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481191 {"local-pdp-detection",
1192 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1193 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1194 flags_ui::kOsIos,
1195 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121196 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1197 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1198 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1199 kTabInactivityThresholdVariations,
1200 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181201 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1202 flag_descriptions::
1203 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1204 flag_descriptions::
1205 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1206 flags_ui::kOsIos,
1207 FEATURE_VALUE_TYPE(
1208 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361209 {"enable-friendlier-safe-browsing-settings-standard-protection",
1210 flag_descriptions::
1211 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1212 flag_descriptions::
1213 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521214 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361215 FEATURE_VALUE_TYPE(
1216 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291217 {"enable-red-interstitial-facelift",
1218 flag_descriptions::kEnableRedInterstitialFaceliftName,
1219 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1220 flags_ui::kOsIos,
1221 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Olivier ROBIN52eddbf32023-02-15 10:33:421222 {"ios-edit-menu-partial-translate",
1223 flag_descriptions::kIOSEditMenuPartialTranslateName,
1224 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421225 flags_ui::kOsIos,
1226 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1227 kIOSEditMenuPartialTranslateVariations,
1228 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431229 {"notification-settings-menu-item",
1230 flag_descriptions::kNotificationSettingsMenuItemName,
1231 flag_descriptions::kNotificationSettingsMenuItemDescription,
1232 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Stepan Khapugin551917f82023-02-21 18:00:061233 {"spotlight-reading-list-source",
1234 flag_descriptions::kSpotlightReadingListSourceName,
1235 flag_descriptions::kSpotlightReadingListSourceDescription,
1236 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481237 {"enable-policy-test-page-ios",
1238 flag_descriptions::kEnablePolicyTestPageName,
1239 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1240 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
kalettucefb09e402023-02-27 18:35:531241 {"web-feed-feedback-reroute",
1242 flag_descriptions::kWebFeedFeedbackRerouteName,
1243 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1244 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551245 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1246 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431248 {"enable-follow-IPH-exp-params",
1249 flag_descriptions::kEnableFollowIPHExpParamsName,
1250 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031252 {"enable-follow-management-instant-reload",
1253 flag_descriptions::kEnableFollowManagementInstantReloadName,
1254 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1255 flags_ui::kOsIos,
1256 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251257 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1258 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1259 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441260 {"mixed-content-autoupgrade-ios",
1261 flag_descriptions::kMixedContentAutoupgradeName,
1262 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1263 FEATURE_VALUE_TYPE(
1264 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421265 {"enable-preferences-account-storage",
1266 flag_descriptions::kEnablePreferencesAccountStorageName,
1267 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1268 flags_ui::kOsIos,
1269 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201270 {"ios-browser-edit-menu-metrics",
1271 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1272 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1273 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Benjamin Williams1dc8f2342024-01-04 21:25:551274 {"ios-docking-promo", flag_descriptions::kIOSDockingPromoName,
1275 flag_descriptions::kIOSDockingPromoDescription, flags_ui::kOsIos,
1276 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSDockingPromo,
1277 kIOSDockingPromoVariations,
1278 "IOSDockingPromo")},
Stepan Khapuginb2f49522023-04-03 18:25:241279 {"omnibox-grouping-framework-zps",
1280 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1281 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1282 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1283 {"omnibox-grouping-framework-non-zps",
1284 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1285 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1286 flags_ui::kOsIos,
1287 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471288 {"enable-session-serialization-optimizations",
1289 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1290 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1291 flags_ui::kOsIos,
1292 FEATURE_VALUE_TYPE(
Sylvain Defresneb81065002024-01-23 10:51:221293 session::features::kEnableSessionSerializationOptimizations)},
Robbie Gibson0ea280602023-04-12 01:02:391294 {"only-access-clipboard-async",
1295 flag_descriptions::kOnlyAccessClipboardAsyncName,
1296 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1297 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191298 {"omnibox-improved-rtl-suggestions",
1299 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1300 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1301 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Olivier ROBIN2613bcd02023-04-20 10:00:471302 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1303 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1304 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1305 kIOSEditMenuSearchWithVariations,
1306 "IOSEditMenuSearchWith")},
1307 {"ios-edit-menu-hide-search-web",
1308 flag_descriptions::kIOSEditMenuHideSearchWebName,
1309 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1310 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171311 {"autofill-enable-card-art-image",
1312 flag_descriptions::kAutofillEnableCardArtImageName,
1313 flag_descriptions::kAutofillEnableCardArtImageDescription,
1314 flags_ui::kOsIos,
1315 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451316 {"enable-signed-out-view-demotion",
1317 flag_descriptions::kEnableSignedOutViewDemotionName,
1318 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1319 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Joemer Ramos7110ca92024-01-18 19:11:401320 {"enable-startup-latency-improvements",
1321 flag_descriptions::kEnableStartupImprovementsName,
1322 flag_descriptions::kEnableStartupImprovementsDescription, flags_ui::kOsIos,
1323 FEATURE_VALUE_TYPE(kEnableStartupImprovements)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251324 {"autofill-use-two-dots-for-last-four-digits",
1325 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1326 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1327 flags_ui::kOsIos,
1328 FEATURE_VALUE_TYPE(
1329 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241330 {"autofill-disable-profile-updates",
1331 flag_descriptions::kAutofillDisableProfileUpdatesName,
1332 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1333 flags_ui::kOsIos,
1334 FEATURE_VALUE_TYPE(
1335 autofill::features::test::kAutofillDisableProfileUpdates)},
1336 {"autofill-disable-silent-profile-updates",
1337 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1338 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1339 flags_ui::kOsIos,
1340 FEATURE_VALUE_TYPE(
1341 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1342 {"autofill-enable-admin-level-2",
1343 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1344 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1345 flags_ui::kOsIos,
1346 FEATURE_VALUE_TYPE(
1347 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1348 {"autofill-enable-between-streets",
1349 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1350 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1351 flags_ui::kOsIos,
1352 FEATURE_VALUE_TYPE(
1353 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1354 {"autofill-enable-landmark",
1355 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1356 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1357 flags_ui::kOsIos,
1358 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431359 {"post-restore-default-browser-promo",
1360 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1361 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1362 flags_ui::kOsIos,
1363 FEATURE_WITH_PARAMS_VALUE_TYPE(
1364 kPostRestoreDefaultBrowserPromo,
1365 kPostRestoreDefaultBrowserPromoVariations,
1366 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311367 {"spotlight-open-tabs-source",
1368 flag_descriptions::kSpotlightOpenTabsSourceName,
1369 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1370 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451371 {"spotlight-donate-new-intents",
1372 flag_descriptions::kSpotlightDonateNewIntentsName,
1373 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1374 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341375 {"replace-sync-promos-with-sign-in-promos",
1376 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1377 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1378 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301379 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571380 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1381 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1382 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371383 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1384 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1385 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1386 kTabPickupThresholdVariations,
1387 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321388 {"ios-iph-for-safari-switcher",
1389 flag_descriptions::kIPHForSafariSwitcherName,
1390 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1391 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071392 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1393 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1394 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Ewann Pelle9cd85b22023-07-12 14:42:011395 {"tab-resumption", flag_descriptions::kTabResumptionName,
1396 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001397 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1398 kTabResumptionVariations,
1399 "TabResumption")},
Christian Xu07d600192023-07-24 12:29:521400 {"bottom-omnibox-default-setting",
1401 flag_descriptions::kBottomOmniboxDefaultSettingName,
1402 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1403 flags_ui::kOsIos,
1404 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1405 kBottomOmniboxDefaultSettingVariations,
1406 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131407 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1408 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1409 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
adamta7be73b182023-08-08 22:30:351410 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1411 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1412 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501413 {"ios-password-auth-on-entry-v2",
1414 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1415 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1416 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281417 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1418 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1419 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131420 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1421 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1422 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021423 {"parcel-tracking-test-data",
1424 commerce::flag_descriptions::kParcelTrackingTestDataName,
1425 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1426 flags_ui::kOsIos,
1427 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1428 kParcelTrackingTestDataVariations,
1429 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111430 {"autofill-enable-merchant-domain-in-unmask-card-request",
1431 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1432 flag_descriptions::
1433 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1434 flags_ui::kOsIos,
1435 FEATURE_VALUE_TYPE(
1436 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331437 {"autofill-update-chrome-settings-link-to-gpay-web",
1438 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1439 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1440 flags_ui::kOsIos,
1441 FEATURE_VALUE_TYPE(
1442 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281443 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1444 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1445 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591446 {"iph-ios-promo-manager-widget-promo",
1447 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1448 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1449 flags_ui::kOsIos,
1450 FEATURE_VALUE_TYPE(
1451 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571452 {"autofill-enable-virtual-cards",
1453 flag_descriptions::kAutofillEnableVirtualCardsName,
1454 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1455 flags_ui::kOsIos,
1456 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551457 {"ios-incognito-downloads-warning",
1458 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1459 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1460 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571461 {"omnibox-shortcuts-database-ios",
1462 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1463 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211464 flags_ui::kOsIos,
1465 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021466 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1467 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1468 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Rubin Deliallisi072bc842023-10-19 12:00:411469 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1470 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1471 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Ewann Pelle54e51bd62023-10-24 17:28:121472 {"sync-session-on-visibility-changed",
1473 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1474 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1475 flags_ui::kOsIos,
1476 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451477 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1478 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1479 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531480 {"password-sharing", flag_descriptions::kPasswordSharingName,
1481 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1482 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511483 {"omnibox-company-entity-icon-adjustment",
1484 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1485 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1486 flags_ui::kOsIos,
1487 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1488 kOmniboxCompanyEntityAdjustmentVariations,
1489 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051490 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1491 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1492 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1493 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1494 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1495 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Aliona DANGLA5971a8b2023-11-10 11:55:351496 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1497 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1498 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471499 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1500 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1501 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131502 {"autofill-enable-payments-mandatory-reauth",
1503 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1504 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1505 flags_ui::kOsIos,
1506 FEATURE_VALUE_TYPE(
1507 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Yishui Liu4b30bf92023-11-15 19:09:231508 {"autofill-enable-card-benefits",
1509 flag_descriptions::kAutofillEnableCardBenefitsName,
1510 flag_descriptions::kAutofillEnableCardBenefitsDescription,
1511 flags_ui::kOsIos,
1512 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)},
Vincent Boisselle5af638da2023-11-16 17:38:201513 {"password-manager-signin-uff",
1514 flag_descriptions::kIOSPasswordSignInUffName,
1515 flag_descriptions::kIOSPasswordSignInUffDescription, flags_ui::kOsIos,
1516 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordSignInUff)},
Louis Romeroc387e6e32023-11-20 15:56:011517 {"tab-grid-compositional-layout",
1518 flag_descriptions::kTabGridCompositionalLayoutName,
1519 flag_descriptions::kTabGridCompositionalLayoutDescription,
1520 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kTabGridCompositionalLayout)},
Salma Elmahallawye8a5df12024-01-15 19:33:411521 {"idle-timeout-policies", flag_descriptions::kIdleTimeoutPoliciesName,
1522 flag_descriptions::kIdleTimeoutPoliciesDescription, flags_ui::kOsIos,
1523 FEATURE_VALUE_TYPE(enterprise_idle::kIdleTimeout)},
Christian Xue72882d2023-11-20 17:10:481524 {"bottom-omnibox-promo-fre", flag_descriptions::kBottomOmniboxPromoFREName,
1525 flag_descriptions::kBottomOmniboxPromoFREDescription, flags_ui::kOsIos,
1526 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoFRE,
1527 kBottomOmniboxPromoVariations,
1528 "BottomOmniboxPromoFRE")},
1529 {"bottom-omnibox-promo-app-launch",
1530 flag_descriptions::kBottomOmniboxPromoAppLaunchName,
1531 flag_descriptions::kBottomOmniboxPromoAppLaunchDescription,
1532 flags_ui::kOsIos,
1533 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxPromoAppLaunch,
1534 kBottomOmniboxPromoVariations,
1535 "BottomOmniboxPromoAppLaunch")},
Christian Xua3667352023-11-21 16:54:091536 {"bottom-omnibox-promo-default-position",
1537 flag_descriptions::kBottomOmniboxPromoDefaultPositionName,
1538 flag_descriptions::kBottomOmniboxPromoDefaultPositionDescription,
1539 flags_ui::kOsIos,
1540 FEATURE_WITH_PARAMS_VALUE_TYPE(
1541 kBottomOmniboxPromoDefaultPosition,
1542 kBottomOmniboxPromoDefaultPositionVariations,
1543 "BottomOmniboxPromoDefaultPosition")},
Filipa Senra0bd07982023-12-19 10:56:251544 {"revamp-page-info-ios", flag_descriptions::kRevampPageInfoIosName,
1545 flag_descriptions::kRevampPageInfoIosDescription, flags_ui::kOsIos,
1546 FEATURE_VALUE_TYPE(kRevampPageInfoIos)},
Nicolas MacBethbb3d50b2023-12-19 18:07:171547 {"ios-external-action-urls", flag_descriptions::kIOSExternalActionURLsName,
1548 flag_descriptions::kIOSExternalActionURLsDescription, flags_ui::kOsIos,
1549 FEATURE_VALUE_TYPE(kIOSExternalActionURLs)},
Mike Dougherty330188d52023-12-20 16:33:241550 {"remove-old-web-state-restore",
1551 flag_descriptions::kRemoveOldWebStateRestoreName,
1552 flag_descriptions::kRemoveOldWebStateRestoreDescription, flags_ui::kOsIos,
1553 FEATURE_VALUE_TYPE(web::features::kRemoveOldWebStateRestoration)},
aliaaborhamy00f89df2023-12-21 14:55:031554 {"share-in-web-context-menu-ios",
1555 flag_descriptions::kShareInWebContextMenuIOSName,
1556 flag_descriptions::kShareInWebContextMenuIOSDescription, flags_ui::kOsIos,
1557 FEATURE_VALUE_TYPE(kShareInWebContextMenuIOS)},
Marc Treib1f6c5db992024-01-04 20:25:141558 {"migrate-syncing-user-to-signed-in",
1559 flag_descriptions::kMigrateSyncingUserToSignedInName,
1560 flag_descriptions::kMigrateSyncingUserToSignedInDescription,
1561 flags_ui::kOsIos,
1562 FEATURE_VALUE_TYPE(switches::kMigrateSyncingUserToSignedIn)},
1563 {"undo-migration-of-syncing-user-to-signed-in",
1564 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInName,
1565 flag_descriptions::kUndoMigrationOfSyncingUserToSignedInDescription,
1566 flags_ui::kOsIos,
1567 FEATURE_VALUE_TYPE(switches::kUndoMigrationOfSyncingUserToSignedIn)},
Mustafa Emre Acer05412ee2024-01-11 01:03:551568 {"https-upgrades-ios", flag_descriptions::kHttpsUpgradesName,
1569 flag_descriptions::kHttpsUpgradesDescription, flags_ui::kOsIos,
1570 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsUpgrades)},
Robbie Gibsona04957be2024-01-15 19:52:461571 {"contextual-panel", flag_descriptions::kContextualPanelName,
1572 flag_descriptions::kContextualPanelDescription, flags_ui::kOsIos,
1573 FEATURE_VALUE_TYPE(kContextualPanel)},
Christian Xuf29107ba2024-01-16 21:54:591574 {"omnibox-popup-row-content-configuration",
1575 flag_descriptions::kOmniboxPopupRowContentConfigurationName,
1576 flag_descriptions::kOmniboxPopupRowContentConfigurationDescription,
1577 flags_ui::kOsIos,
1578 FEATURE_VALUE_TYPE(kOmniboxPopupRowContentConfiguration)},
Nicolas MacBeth47d6b622024-01-16 17:05:391579 {"contextual-panel-force-show-entrypoint",
1580 flag_descriptions::kContextualPanelForceShowEntrypointName,
1581 flag_descriptions::kContextualPanelForceShowEntrypointDescription,
1582 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContextualPanelForceShowEntrypoint)},
Christian Xuc3c249b2024-01-18 18:18:321583 {"bottom-omnibox-promo-region-filter",
1584 flag_descriptions::kBottomOmniboxPromoRegionFilterName,
1585 flag_descriptions::kBottomOmniboxPromoRegionFilterDescription,
1586 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxPromoRegionFilter)},
adamtad0e8cfc2024-01-16 18:43:471587 {"enable-ipad-feed-ghost-cards",
1588 flag_descriptions::kEnableiPadFeedGhostCardsName,
1589 flag_descriptions::kEnableiPadFeedGhostCardsDescription, flags_ui::kOsIos,
1590 FEATURE_VALUE_TYPE(kEnableiPadFeedGhostCards)},
Jood Hajeerbbbf1ac2024-01-26 12:50:451591 {"remember-custom-passphrase-after-signout",
1592 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutName,
1593 flag_descriptions::kSyncRememberCustomPassphraseAfterSignoutDescription,
1594 flags_ui::kOsIos,
1595 FEATURE_VALUE_TYPE(syncer::kSyncRememberCustomPassphraseAfterSignout)},
Louis Romerof3144822024-01-30 10:24:161596 {"tab-grid-always-bounce", flag_descriptions::kTabGridAlwaysBounceName,
1597 flag_descriptions::kTabGridAlwaysBounceDescription, flags_ui::kOsIos,
1598 FEATURE_VALUE_TYPE(kTabGridAlwaysBounce)},
Christian Xu11df0ae2024-02-08 16:07:511599 {"omnibox-rich-autocompletion",
1600 flag_descriptions::kOmniboxRichAutocompletionName,
1601 flag_descriptions::kOmniboxRichAutocompletionDescription, flags_ui::kOsIos,
1602 FEATURE_VALUE_TYPE(omnibox::kRichAutocompletion)},
Jason Hud445445f2024-02-02 18:28:121603 {"disable-lens-camera", flag_descriptions::kDisableLensCameraName,
1604 flag_descriptions::kDisableLensCameraDescription, flags_ui::kOsIos,
1605 FEATURE_VALUE_TYPE(kDisableLensCamera)},
Tomasz Jurkiewicze8ce0292024-02-13 13:06:251606 {"minor-mode-restrictions-for-history-sync-opt-in",
1607 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName,
1608 flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription,
1609 flags_ui::kOsIos,
1610 FEATURE_VALUE_TYPE(::switches::kMinorModeRestrictionsForHistorySyncOptIn)},
ginnnnnnnydbaba6e42024-02-13 23:17:251611 {"ios-iph-pull-to-refresh",
1612 flag_descriptions::kIPHiOSPullToRefreshFeatureName,
1613 flag_descriptions::kIPHiOSPullToRefreshFeatureDescription,
1614 flags_ui::kOsIos,
1615 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSPullToRefreshFeature)},
1616 {"ios-iph-swipe-back-forward",
1617 flag_descriptions::kIPHiOSSwipeBackForwardFeatureName,
1618 flag_descriptions::kIPHiOSSwipeBackForwardFeatureDescription,
1619 flags_ui::kOsIos,
1620 FEATURE_VALUE_TYPE(feature_engagement::kIPHiOSSwipeBackForwardFeature)},
ginnnnnnny92d90742024-02-16 17:04:241621 {"ios-iph-swipe-toolbar-to-change-tab",
1622 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureName,
1623 flag_descriptions::kIPHiOSSwipeToolbarToChangeTabFeatureDescription,
1624 flags_ui::kOsIos,
1625 FEATURE_VALUE_TYPE(
1626 feature_engagement::kIPHiOSSwipeToolbarToChangeTabFeature)},
ginnnnnnnydbaba6e42024-02-13 23:17:251627 {"ios-iph-tab-grid-swipe-right-for-incognito",
1628 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoName,
1629 flag_descriptions::kIPHiOSTabGridSwipeRightForIncognitoDescription,
1630 flags_ui::kOsIos,
1631 FEATURE_VALUE_TYPE(
1632 feature_engagement::kIPHiOSTabGridSwipeRightForIncognito)},
Chris Lu93a507b2024-02-14 18:41:581633 {"ios-magic-stack-collection-view",
1634 flag_descriptions::kIOSMagicStackCollectionViewName,
1635 flag_descriptions::kIOSMagicStackCollectionViewDescription,
1636 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSMagicStackCollectionView)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301637};
sdefresne14900ee2015-11-27 14:43:211638
Rohit Raobed794c2020-04-27 15:27:451639bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1640 return false;
1641}
1642
1643flags_ui::FlagsState& GetGlobalFlagsState() {
1644 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1645 nullptr);
1646 return *flags_state;
1647}
David Jean5ca263c2021-08-18 09:19:301648// Creates the experimental test policies map, used by AsyncPolicyLoader and
1649// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341650NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211651 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1652
Guillaume Jenkins25e9bd72020-08-27 17:39:061653 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551654 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061655 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551656
Guillaume Jenkins25e9bd72020-08-27 17:39:061657 // Set some sample policy values for testing if EnableSamplePolicies is set to
1658 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401659 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551660 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011661 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1662
Guillaume Jenkinseeb7007c2020-06-25 22:55:401663 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1664
1665 // 2 = Disable all variations
1666 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1667
1668 // 2 = Do not allow any site to show popups
1669 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1670
Tina Wang5abee802020-07-29 23:09:521671 // Set default search engine.
1672 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1673 @YES,
1674 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1675 @"http://www.google.com/search?q={searchTerms}",
1676 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021677 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521678
Tina Wang89068c82020-10-29 15:51:501679 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1680
Gauthier Ambard21b23702021-04-16 16:11:271681 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1682
Tina Wang59d0b7e2020-08-11 04:41:011683 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531684
1685 // 2 = Enhanced safe browsing protection
1686 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1687
1688 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291689
1690 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551691 }];
1692 }
1693
Ewann227a3c02021-04-19 12:04:541694 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041695 NSString* sync_policy_key =
1696 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301697 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541698 }
Ewann227a3c02021-04-19 12:04:541699
Ewann570a6302021-08-17 07:22:421700 // SyncTypesListDisabled policy.
1701 NSString* Sync_types_list_disabled_key =
1702 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1703 NSMutableArray* Sync_types_list_disabled_values =
1704 [[NSMutableArray alloc] init];
1705 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1706 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1707 }
1708 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1709 [Sync_types_list_disabled_values addObject:@"readingList"];
1710 }
1711 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1712 [Sync_types_list_disabled_values addObject:@"preferences"];
1713 }
1714 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1715 [Sync_types_list_disabled_values addObject:@"passwords"];
1716 }
1717 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1718 [Sync_types_list_disabled_values addObject:@"autofill"];
1719 }
1720 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1721 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1722 }
1723 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1724 [Sync_types_list_disabled_values addObject:@"tabs"];
1725 }
1726 if ([Sync_types_list_disabled_values count]) {
1727 [testing_policies addEntriesFromDictionary:@{
1728 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1729 }];
Ewann570a6302021-08-17 07:22:421730 }
1731
Gauthier Ambard073eaa92021-11-22 15:24:131732 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521733 NSString* incognito_policy_key =
1734 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1735 NSInteger incognito_mode_availability =
1736 [defaults integerForKey:incognito_policy_key];
1737 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521738 [testing_policies addEntriesFromDictionary:@{
1739 incognito_policy_key : @(incognito_mode_availability),
1740 }];
1741 }
1742
Ewann40a8f8a2021-07-29 10:01:201743 NSString* restriction_pattern =
1744 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1745 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291746 NSString* restrict_key =
1747 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201748 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291749 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201750 }];
1751 }
1752
Vincent Boisselle19200bc2021-09-01 17:58:251753 // If the sign-in policy is set (not "None"), add the policy key to the list
1754 // of enabled experimental policies, and set the value.
1755 NSString* const kSigninPolicyKey = @"BrowserSignin";
1756 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1757 if (signin_policy_mode) {
1758 // Remove the mode offset that was used to represent the unset policy.
1759 --signin_policy_mode;
1760 DCHECK(signin_policy_mode >= 0);
1761
Vincent Boisselle19200bc2021-09-01 17:58:251762 [testing_policies addEntriesFromDictionary:@{
1763 kSigninPolicyKey : @(signin_policy_mode),
1764 }];
1765 }
1766
Veronique Nguyen9b1044f2022-01-11 14:41:131767 // If the New Tab Page URL is set (not empty) add the value to the list of
1768 // test policies.
1769 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1770 if ([ntp_location length] > 0) {
1771 NSString* ntp_location_key =
1772 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1773 [testing_policies
1774 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571775 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131776 }
1777
Ali Juma9ec36d22022-03-28 14:53:121778 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1779 NSString* allow_backups_key =
1780 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1781 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1782 [allowed_experimental_policies addObject:allow_backups_key];
1783 }
1784
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241785 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1786 NSString* password_manager_key =
1787 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1788 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1789 [allowed_experimental_policies addObject:password_manager_key];
1790 }
Vincent Boisselle003569a72023-09-11 16:03:121791
1792 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1793 NSString* user_policy_merge_key =
1794 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1795 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1796 [allowed_experimental_policies addObject:user_policy_merge_key];
1797 }
1798
Arthur Milchiorbb44f5c82023-03-14 16:14:461799 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1800 NSString* managed_bookmarks_key =
1801 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1802 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571803 @"["
1804 // The following gets filtered out from
1805 // the JSON string when parsed.
1806 " {"
1807 " \"toplevel_name\": \"Managed Bookmarks\""
1808 " },"
1809 " {"
1810 " \"name\": \"Google\","
1811 " \"url\": \"google.com\""
1812 " },"
1813 " {"
1814 " \"name\": \"Empty Folder\","
1815 " \"children\": []"
1816 " },"
1817 " {"
1818 " \"name\": \"Big Folder\","
1819 " \"children\": ["
1820 " {"
1821 " \"name\": \"Youtube\","
1822 " \"url\": \"youtube.com\""
1823 " },"
1824 " {"
1825 " \"name\": \"Chromium\","
1826 " \"url\": \"chromium.org\""
1827 " },"
1828 " {"
1829 " \"name\": \"More Stuff\","
1830 " \"children\": ["
1831 " {"
1832 " \"name\": \"Bugs\","
1833 " \"url\": \"crbug.com\""
1834 " }"
1835 " ]"
1836 " }"
1837 " ]"
1838 " }"
1839 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461840 [testing_policies addEntriesFromDictionary:@{
1841 managed_bookmarks_key : managed_bookmarks_value
1842 }];
1843 [allowed_experimental_policies addObject:managed_bookmarks_key];
1844 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241845
Guillaume Jenkins25e9bd72020-08-27 17:39:061846 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1847 // policy.
1848 if ([allowed_experimental_policies count] > 0) {
1849 [testing_policies setValue:allowed_experimental_policies
1850 forKey:base::SysUTF8ToNSString(
1851 policy::key::kEnableExperimentalPolicies)];
1852 }
1853
jlebel2eb40222022-05-06 11:15:421854 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1855 switch ([defaults integerForKey:metrics_reporting_key]) {
1856 case 1:
1857 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131858 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421859 break;
1860 case 2:
1861 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131862 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421863 break;
1864 default:
1865 // Metrics reporting not managed.
1866 break;
1867 }
1868
David Jean6f85d44f2021-08-19 08:08:451869 // Warning: Add new flags to TestingPoliciesHash() below.
1870
David Jean5ca263c2021-08-18 09:19:301871 return testing_policies;
1872}
David Jean6f85d44f2021-08-19 08:08:451873
David Jean5ca263c2021-08-18 09:19:301874} // namespace
1875
Gauthier Ambard02dbf022022-08-23 08:28:471876// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301877void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1878 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1879
1880 // Set the UA flag if UseMobileSafariUA is enabled.
1881 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1882 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1883 // Chrome puts its product token.
1884 int32_t major = 0;
1885 int32_t minor = 0;
1886 int32_t bugfix = 0;
1887 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1888 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1889
1890 command_line->AppendSwitchASCII(switches::kUserAgent,
1891 web::BuildMobileUserAgent(product));
1892 }
1893
1894 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341895 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301896
1897 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1898 // Management to enabled and add the token to the list of policies.
1899 NSString* token_key =
1900 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1901 NSString* token = [defaults stringForKey:token_key];
1902
1903 if ([token length] > 0) {
1904 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1905 [testing_policies setValue:token forKey:token_key];
1906 }
1907
Guillaume Jenkins57606d72020-08-13 17:32:551908 // If some policies were set, commit them to the app's registration defaults.
1909 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401910 NSDictionary* registration_defaults =
1911 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1912 [defaults registerDefaults:registration_defaults];
1913 }
1914
sdefresne14900ee2015-11-27 14:43:211915 // Freeform commandline flags. These are added last, so that any flags added
1916 // earlier in this function take precedence.
1917 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1918 base::CommandLine::StringVector flags;
1919 // Append an empty "program" argument.
1920 flags.push_back("");
1921
1922 // The number of flags corresponds to the number of text fields in
1923 // Experimental.plist.
1924 const int kNumFreeformFlags = 5;
1925 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1926 NSString* key =
1927 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1928 NSString* flag = [defaults stringForKey:key];
1929 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331930 // iOS keyboard replaces -- with —, so undo that.
1931 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1932 withString:@"--"
1933 options:0
1934 range:NSMakeRange(0, 1)];
1935 // To make things easier, allow flags with no dashes by prepending them
1936 // here. This also allows for flags that just have one dash if they
1937 // exist.
1938 if (![flag hasPrefix:@"-"]) {
1939 flag = [@"--" stringByAppendingString:flag];
1940 }
sdefresne14900ee2015-11-27 14:43:211941 flags.push_back(base::SysNSStringToUTF8(flag));
1942 }
1943 }
1944
1945 base::CommandLine temp_command_line(flags);
1946 command_line->AppendArguments(temp_command_line, false);
1947 }
msardafc76f662017-02-24 12:46:281948
justincohendacc85d2017-06-28 23:34:101949 // Populate command line flag for 3rd party keyboard omnibox workaround.
1950 NSString* enableThirdPartyKeyboardWorkaround =
1951 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1952 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1953 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1954 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1955 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1956 }
1957
Sylvain Defresned3cd8d92022-01-18 13:35:081958 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211959}
1960
sdefresne14900ee2015-11-27 14:43:211961void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1962 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181963 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111964 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531965 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211966}
1967
jkrcalbf073372016-07-29 07:21:311968std::vector<std::string> RegisterAllFeatureVariationParameters(
1969 flags_ui::FlagsStorage* flags_storage,
1970 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181971 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1972 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311973}
1974
sdefresne14900ee2015-11-27 14:43:211975void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1976 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501977 base::Value::List& supported_entries,
1978 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181979 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211980 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511981 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211982}
1983
1984void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1985 const std::string& internal_name,
1986 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181987 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1988 enable);
sdefresne14900ee2015-11-27 14:43:211989}
1990
1991void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181992 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211993}
1994
Nicolas MacBeth972e2592023-02-23 15:22:091995bool IsRestartNeededToCommitChanges() {
1996 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1997}
1998
sdefresne14900ee2015-11-27 14:43:211999namespace testing {
2000
Elly Fong-Jones323ab1092021-08-23 22:36:312001base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
2002 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:532003 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:212004}
2005
2006} // namespace testing