blob: fe0ad6a063773510fc3fd31b4f665a08599b7feb [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"
Gauthier Ambard999088c2022-09-13 08:36:5728#import "components/commerce/core/commerce_feature_list.h"
29#import "components/commerce/core/flag_descriptions.h"
30#import "components/content_settings/core/common/features.h"
31#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5232#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5733#import "components/enterprise/browser/enterprise_switches.h"
34#import "components/feature_engagement/public/feature_constants.h"
35#import "components/feature_engagement/public/feature_list.h"
36#import "components/feed/feed_feature_list.h"
37#import "components/flags_ui/feature_entry.h"
38#import "components/flags_ui/feature_entry_macros.h"
39#import "components/flags_ui/flags_storage.h"
40#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2541#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5742#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0343#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/ntp_tiles/switches.h"
45#import "components/omnibox/browser/omnibox_field_trial.h"
46#import "components/omnibox/common/omnibox_features.h"
47#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2048#import "components/optimization_guide/core/optimization_guide_switches.h"
Vasilii Sukhanov32b14452023-10-12 17:31:2749#import "components/password_manager/core/browser/features/password_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5750#import "components/password_manager/core/common/password_manager_features.h"
51#import "components/payments/core/features.h"
52#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4053#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5754#import "components/policy/policy_constants.h"
Menghan YANG5b3a78a2023-03-24 17:38:2655#import "components/reading_list/features/reading_list_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/safe_browsing/core/common/features.h"
Chris Lu6fd4eaf2023-08-08 18:29:3057#import "components/segmentation_platform/public/constants.h"
Chris Lub0bad572023-08-07 18:13:2958#import "components/segmentation_platform/public/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2559#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5760#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
61#import "components/signin/core/browser/account_reconcilor.h"
62#import "components/signin/ios/browser/features.h"
63#import "components/signin/public/base/signin_switches.h"
64#import "components/strings/grit/components_strings.h"
Nohemi Fernandez64acf982023-08-04 09:27:1565#import "components/supervised_user/core/common/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5766#import "components/sync/base/command_line_switches.h"
67#import "components/sync/base/features.h"
68#import "components/sync/base/pref_names.h"
69#import "components/translate/core/browser/translate_prefs.h"
70#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3471#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard5b7f3c22023-09-13 12:03:3072#import "ios/chrome/browser/browsing_data/model/browsing_data_features.h"
Aman Vermab6f55572023-09-28 11:40:5373#import "ios/chrome/browser/crash_report/model/features.h"
Aman Verma10315df62023-10-02 11:56:5674#import "ios/chrome/browser/credential_provider_promo/model/features.h"
Aman Vermaf8a157f62023-10-03 15:32:1175#import "ios/chrome/browser/default_browser/model/utils.h"
mmrashadbc0ca942023-10-06 13:12:1476#import "ios/chrome/browser/find_in_page/model/util.h"
Gauthier Ambard92605132022-08-26 13:25:1777#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5778#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Tina Wangd3f6f192023-04-05 05:22:4379#import "ios/chrome/browser/follow/follow_features.h"
Ali Jumad29dc1872023-10-19 13:33:5880#import "ios/chrome/browser/iph_for_new_chrome_user/model/features.h"
Chris Lue687fc72023-10-27 02:42:1981#import "ios/chrome/browser/parcel_tracking/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5082#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5783#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2084#import "ios/chrome/browser/promos_manager/features.h"
mmrashadf158cad942023-10-03 09:15:4885#import "ios/chrome/browser/screen_time/model/screen_time_buildflags.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4686#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3587#import "ios/chrome/browser/shared/public/features/system_flags.h"
Robbie Gibson596fe292023-10-27 01:00:3688#import "ios/chrome/browser/tabs/model/inactive_tabs/features.h"
89#import "ios/chrome/browser/tabs/model/tab_pickup/features.h"
Ewann Pelled2eaeba2023-09-19 09:15:2890#import "ios/chrome/browser/text_selection/model/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0591#import "ios/chrome/browser/ui/app_store_rating/features.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"
Robbie Gibson686c56732021-10-04 17:11:4596#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:1597#import "ios/chrome/browser/ui/settings/password/password_manager_ui_features.h"
Rubin Deliallisi072bc842023-10-19 12:00:4198#import "ios/chrome/browser/ui/settings/privacy/privacy_guide/features.h"
gogerald0ff29e52021-02-03 18:56:1999#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58100#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/web/features.h"
102#import "ios/chrome/grit/ios_strings.h"
103#import "ios/components/security_interstitials/https_only_mode/feature.h"
104#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
105#import "ios/web/common/features.h"
106#import "ios/web/common/user_agent.h"
107#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21108
Sylvain Defresne9c107082020-10-27 16:39:13109#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
mmrashadf158cad942023-10-03 09:15:48110#import "ios/chrome/browser/screen_time/model/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13111#endif
112
sdefresne14900ee2015-11-27 14:43:21113#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22115#endif
stkhapuginc1be1792016-12-13 14:30:53116
elawrence816f6790e2017-06-16 18:19:28117using flags_ui::FeatureEntry;
118
sdefresne14900ee2015-11-27 14:43:21119namespace {
Emily Starkbafa9062017-12-27 15:22:46120
Nohemi Fernandezc00842a2021-07-26 11:47:34121const FeatureEntry::Choice
122 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
123 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
124 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
125 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
126 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
127};
128
Cheick Cisse8835611a2023-06-02 21:42:54129// Uses int values from DefaultPromoType enum.
130const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
131 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
132 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
133 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
134 "1"},
135 {"Show tailored made for ios promo",
136 "default-browser-promo-force-show-promo", "2"},
137 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
138 "3"},
139 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
140};
141
Stepan Khapugincc4e9842019-01-23 13:38:13142const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
143 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
144const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
145 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
156
157const FeatureEntry::FeatureVariation
158 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
159 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53160 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13161 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53162 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13163 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13173
Stepan Khapuginbac467e2022-05-06 21:11:54174const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
175 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
176const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
177 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
180
181const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
182 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
183 nullptr},
184 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
185 nullptr},
186 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
187 nullptr},
188};
189
Christian Xucf26d562022-07-06 09:28:36190const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
191 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
192const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
193 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
196
197const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
198 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
199 nullptr},
200 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
201 nullptr},
202 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
203 nullptr},
204};
205
Cheick Cissedc49dbe2023-08-09 13:33:52206const FeatureEntry::FeatureParam
Jennifer Serranof384360c2023-10-27 00:25:51207 kOmniboxCompanyEntityAdjustmentLeastAggressive[] = {
208 {"OmniboxCompanyEntityAdjustmentGroup", "least-aggressive"}};
209const FeatureEntry::FeatureParam kOmniboxCompanyEntityAdjustmentModerate[] = {
210 {"OmniboxCompanyEntityAdjustmentGroup", "moderate"}};
211const FeatureEntry::FeatureParam
212 kOmniboxCompanyEntityAdjustmentMostAggressive[] = {
213 {"OmniboxCompanyEntityAdjustmentGroup", "most-aggressive"}};
214
215const FeatureEntry::FeatureVariation
216 kOmniboxCompanyEntityAdjustmentVariations[] = {
217 {"Least Aggressive", kOmniboxCompanyEntityAdjustmentLeastAggressive,
218 std::size(kOmniboxCompanyEntityAdjustmentLeastAggressive), nullptr},
219 {"Moderate", kOmniboxCompanyEntityAdjustmentModerate,
220 std::size(kOmniboxCompanyEntityAdjustmentModerate), nullptr},
221 {"Most Aggressive", kOmniboxCompanyEntityAdjustmentMostAggressive,
222 std::size(kOmniboxCompanyEntityAdjustmentMostAggressive), nullptr},
223};
224
225const FeatureEntry::FeatureParam
Cheick Cissedc49dbe2023-08-09 13:33:52226 kDefaultBrowserVideoConditionsHalfscreenPromo[] = {
227 {kDefaultBrowserVideoPromoVariant, kVideoConditionsHalfscreenPromo}};
228const FeatureEntry::FeatureParam
229 kDefaultBrowserVideoConditionsFullscreenPromo[] = {
230 {kDefaultBrowserVideoPromoVariant, kVideoConditionsFullscreenPromo}};
231const FeatureEntry::FeatureParam
232 kDefaultBrowserGenericConsitionsFullscreenPromo[] = {
233 {kDefaultBrowserVideoPromoVariant, kGenericConditionsFullscreenPromo}};
234const FeatureEntry::FeatureParam
235 kDefaultBrowserGenericConditionsHalfscreenPromo[] = {
236 {kDefaultBrowserVideoPromoVariant, kGenericConditionsHalfscreenPromo}};
237
Cheick Cisse2806f082b2023-04-25 14:20:01238const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
Cheick Cissedc49dbe2023-08-09 13:33:52239 {"Show half screen ui with video condtions",
240 kDefaultBrowserVideoConditionsHalfscreenPromo,
241 std::size(kDefaultBrowserVideoConditionsHalfscreenPromo), nullptr},
242 {"Show full screen ui with video condtions",
243 kDefaultBrowserVideoConditionsFullscreenPromo,
244 std::size(kDefaultBrowserVideoConditionsFullscreenPromo), nullptr},
245 {"Show full screen ui with generic condtions",
246 kDefaultBrowserGenericConsitionsFullscreenPromo,
247 std::size(kDefaultBrowserGenericConsitionsFullscreenPromo), nullptr},
248 {"Show half screen ui with generic condtions",
249 kDefaultBrowserGenericConditionsHalfscreenPromo,
250 std::size(kDefaultBrowserGenericConditionsHalfscreenPromo), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01251};
252
Caitlin Fischer37e01232019-05-24 13:05:45253const FeatureEntry::FeatureParam
Caitlin Fischer37e01232019-05-24 13:05:45254 kAutofillUseMobileLabelDisambiguationShowAll[] = {
255 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
256 autofill::features::
257 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
258const FeatureEntry::FeatureParam
259 kAutofillUseMobileLabelDisambiguationShowOne[] = {
260 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
261 autofill::features::
262 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
263
264const FeatureEntry::FeatureVariation
265 kAutofillUseMobileLabelDisambiguationVariations[] = {
266 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53267 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45268 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53269 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45270
adamta37c6b832023-03-10 20:04:09271// Uses int values from SigninPromoViewStyle enum.
272const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
273 {kDiscoverFeedTopSyncPromoStyle, "0"}};
adamta37c6b832023-03-10 20:04:09274const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
Guillem Perezc2d13942023-06-22 20:14:59275 {{kDiscoverFeedTopSyncPromoStyle, "1"}};
adamta37c6b832023-03-10 20:04:09276const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
Guillem Perezc2d13942023-06-22 20:14:59277 {kDiscoverFeedTopSyncPromoStyle, "2"}};
adamtadb0bfc62022-08-01 17:37:47278
Mohammad Refaatab6bee62022-05-16 16:31:15279const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09280 {"Standard", kDiscoverFeedTopSyncPromoStandard,
281 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
adamta37c6b832023-03-10 20:04:09282 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
283 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
284 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
285 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15286
adamta4a6f2fd22023-02-13 17:37:14287const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
288 {kDisableStickyHeaderForFollowingFeed, "true"}};
289const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18290 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14291const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
292 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18293 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14294
295const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
296 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
297 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
298 {"Reduced header height", kFeedHeaderSettingReducedHeight,
299 std::size(kFeedHeaderSettingReducedHeight), nullptr},
300 {"All improvements", kFeedHeaderSettingAllImprovements,
301 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
302
Chris Ludca9ce32023-09-20 16:53:50303const FeatureEntry::FeatureParam kStartSurfaceTenSeconds[] = {
gogerald53c6e7a2021-04-15 22:07:35304 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
Chris Ludca9ce32023-09-20 16:53:50305const FeatureEntry::FeatureParam kStartSurfaceOneHour[] = {
gogerald53c6e7a2021-04-15 22:07:35306 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08307
gogerald0e39e3aa2021-02-10 18:41:23308const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
Chris Ludca9ce32023-09-20 16:53:50309 {"10s:Show Home Surface", kStartSurfaceTenSeconds,
310 std::size(kStartSurfaceTenSeconds), nullptr},
311 {"1h:Show Home Surface", kStartSurfaceOneHour,
312 std::size(kStartSurfaceOneHour), nullptr},
Chris Lu5470417c2021-03-03 18:43:08313};
gogerald0e39e3aa2021-02-10 18:41:23314
Chris Luce928eb2023-05-12 21:36:26315const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
316 {kMagicStackMostVisitedModuleParam, "true"},
317 {kReducedSpaceParam, "-80"}};
Chris Lu28c0ede2023-08-25 19:25:22318const FeatureEntry::FeatureParam
319 kMagicStackMostVisitedModuleHideIrrelevantModules[] = {
320 {kMagicStackMostVisitedModuleParam, "true"},
321 {kReducedSpaceParam, "-80"},
322 {kHideIrrelevantModulesParam, "true"}};
Chris Lu22909b42023-09-08 21:12:13323const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
Chris Luce928eb2023-05-12 21:36:26324 {kMagicStackMostVisitedModuleParam, "false"},
Chris Lu22909b42023-09-08 21:12:13325 {kReducedSpaceParam, "20"}};
326const FeatureEntry::FeatureParam
327 kMagicStackReducedNTPTopSpaceHidIrrelevantModules[] = {
328 {kMagicStackMostVisitedModuleParam, "false"},
329 {kReducedSpaceParam, "20"},
330 {kHideIrrelevantModulesParam, "true"}};
Chris Luce928eb2023-05-12 21:36:26331
332const FeatureEntry::FeatureVariation kMagicStackVariations[]{
333 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
334 std::size(kMagicStackMostVisitedModule), nullptr},
Chris Lu28c0ede2023-08-25 19:25:22335 {"Most Visited Tiles in Magic Stack and hide irrelevant modules",
336 kMagicStackMostVisitedModuleHideIrrelevantModules,
337 std::size(kMagicStackMostVisitedModuleHideIrrelevantModules), nullptr},
Chris Lu22909b42023-09-08 21:12:13338 {"Magic Stack with less NTP Top Space", kMagicStackReducedNTPTopSpace,
339 std::size(kMagicStackReducedNTPTopSpace), nullptr},
340 {"Magic Stack with less NTP Top Space and hide irrelevant modules",
341 kMagicStackReducedNTPTopSpaceHidIrrelevantModules,
342 std::size(kMagicStackReducedNTPTopSpaceHidIrrelevantModules), nullptr},
Chris Luce928eb2023-05-12 21:36:26343};
344
Chris Lu6fd4eaf2023-08-08 18:29:30345const FeatureEntry::FeatureParam kEnableDefaultModel[] = {
346 {segmentation_platform::kDefaultModelEnabledParam, "true"}};
347
348const FeatureEntry::FeatureVariation
349 kSegmentationPlatformIosModuleRankerVariations[]{
350 {"Enabled With Default Model Parameter (Must Set this!)",
351 kEnableDefaultModel, std::size(kEnableDefaultModel), nullptr},
352 };
353
Ed Chin91e44992022-07-27 13:42:34354#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26355// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01356const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04357 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
358 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01359 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04360 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01361const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04362 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
363 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01364 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04365 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01366const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
368 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04370 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01371const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04372 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
373 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01374 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04375 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01376const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04377 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
378 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01379 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
380 {kBackgroundRefreshIntervalInSeconds, "0"}};
381const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04382 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
383 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01384 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
385 {kBackgroundRefreshIntervalInSeconds, "0"}};
386const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
387 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
388 {kEnableRecurringBackgroundRefreshSchedule, "false"},
389 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
390 {kBackgroundRefreshIntervalInSeconds, "0"}};
391const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
392 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
393 {kEnableRecurringBackgroundRefreshSchedule, "true"},
394 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
395 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04396
Ed Chin178ec2a2023-02-10 22:21:26397// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04398const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01399 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
400 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
401 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
402 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
403 {"1hr Interval 1hr Max Age Recurring",
404 kOneHourIntervalOneHourMaxAgeRecurring,
405 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
406 {"4hr Interval 6hr Max Age Recurring",
407 kFourHourIntervalSixHourMaxAgeRecurring,
408 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
409 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
410 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
411 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
412 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
413 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
414 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
415 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
416 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04417};
Ed Chin91e44992022-07-27 13:42:34418#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04419
Ed Chin178ec2a2023-02-10 22:21:26420// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29421const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
422 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54423 {kEnableFeedAppCloseForegroundRefresh, "false"},
424 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29425const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
426 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54427 {kEnableFeedAppCloseForegroundRefresh, "true"},
428 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
429const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
430 {kEnableFeedSessionCloseForegroundRefresh, "false"},
431 {kEnableFeedAppCloseForegroundRefresh, "false"},
432 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26433
Ed Chin5c1fd532023-03-20 17:43:29434// Feed Invisible Foreground Refresh Feature Variations.
435const FeatureEntry::FeatureVariation
436 kFeedInvisibleForegroundRefreshVariations[] = {
437 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
438 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
439 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
440 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54441 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
442 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26443};
444
Raj T18a2c8c2023-03-15 17:20:15445const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
446 {"date", "true"}};
447const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
448 {"address", "true"}};
449const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
450 {"phonenumber", "true"}};
451const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
452 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50453const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
454 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15455const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
456 {"date", "true"},
457 {"address", "true"},
458 {"phonenumber", "true"},
459 {"email", "true"}};
460const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
461 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
462 std::size(kEnableExpKitTextClassifierAll), nullptr},
463 {"Enabled for date", kEnableExpKitTextClassifierDate,
464 std::size(kEnableExpKitTextClassifierDate), nullptr},
465 {"Enabled for address", kEnableExpKitTextClassifierAddress,
466 std::size(kEnableExpKitTextClassifierAddress), nullptr},
467 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
468 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
469 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50470 std::size(kEnableExpKitTextClassifierEmail), nullptr},
471 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
472 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15473
Louis Romero93e9b50a2023-01-26 01:46:12474const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
475 {kTabInactivityThresholdParameterName,
476 kTabInactivityThresholdOneWeekParam}};
477const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
478 {kTabInactivityThresholdParameterName,
479 kTabInactivityThresholdTwoWeeksParam}};
480const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
481 {kTabInactivityThresholdParameterName,
482 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58483const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
484 {kTabInactivityThresholdParameterName,
485 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12486
487const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
488 {"One week", kTabInactivityThresholdOneWeek,
489 std::size(kTabInactivityThresholdOneWeek), nullptr},
490 {"Two weeks", kTabInactivityThresholdTwoWeeks,
491 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
492 {"Three weeks", kTabInactivityThresholdThreeWeeks,
493 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58494 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
495 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12496};
497
Ewann Pelle6eecb8f2023-06-23 14:31:37498const FeatureEntry::FeatureParam kTabPickupThresholdTenMinutes[] = {
499 {kTabPickupThresholdParameterName, kTabPickupThresholdTenMinutesParam}};
500const FeatureEntry::FeatureParam kTabPickupThresholdOneHour[] = {
501 {kTabPickupThresholdParameterName, kTabPickupThresholdOneHourParam}};
502const FeatureEntry::FeatureParam kTabPickupThresholdTwoHours[] = {
503 {kTabPickupThresholdParameterName, kTabPickupThresholdTwoHoursParam}};
Ewann Pelle6bd06402023-11-10 11:17:55504const FeatureEntry::FeatureParam kTabPickupNoFavicon[] = {
505 {kTabPickupThresholdParameterName, kTabPickupNoFaviconParam}};
Ewann Pelle6eecb8f2023-06-23 14:31:37506
507const FeatureEntry::FeatureVariation kTabPickupThresholdVariations[] = {
508 {"Ten Minutes", kTabPickupThresholdTenMinutes,
Ewann Pellea2bcb3a2023-08-28 13:53:00509 std::size(kTabPickupThresholdTenMinutes), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37510 {"One Hour", kTabPickupThresholdOneHour,
Ewann Pellea2bcb3a2023-08-28 13:53:00511 std::size(kTabPickupThresholdOneHour), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37512 {"Two Hours", kTabPickupThresholdTwoHours,
Ewann Pellea2bcb3a2023-08-28 13:53:00513 std::size(kTabPickupThresholdTwoHours), nullptr},
Ewann Pelle6bd06402023-11-10 11:17:55514 {"No favicon", kTabPickupNoFavicon, std::size(kTabPickupNoFavicon),
515 nullptr},
Ewann Pellea2bcb3a2023-08-28 13:53:00516};
517
518const FeatureEntry::FeatureParam kTabResumptionMostRecentTabOnly[] = {
519 {kTabResumptionParameterName, kTabResumptionMostRecentTabOnlyParam}};
520const FeatureEntry::FeatureParam kTabResumptionAllTabs[] = {
521 {kTabResumptionParameterName, kTabResumptionAllTabsParam}};
Ewann Pelleb08ee062023-10-16 10:04:48522const FeatureEntry::FeatureParam kTabResumptionAllTabsOneDayThreshold[] = {
523 {kTabResumptionParameterName, kTabResumptionAllTabsOneDayThresholdParam}};
Ewann Pellea2bcb3a2023-08-28 13:53:00524
525const FeatureEntry::FeatureVariation kTabResumptionVariations[] = {
526 {"Most recent tab only", kTabResumptionMostRecentTabOnly,
527 std::size(kTabResumptionMostRecentTabOnly), nullptr},
Ewann Pelleb08ee062023-10-16 10:04:48528 {"Most recent tab and last synced tab (12 hours threshold)",
529 kTabResumptionAllTabs, std::size(kTabResumptionAllTabs), nullptr},
530 {"Most recent tab and last synced tab (24 hours threshold)",
531 kTabResumptionAllTabsOneDayThreshold,
532 std::size(kTabResumptionAllTabsOneDayThreshold), nullptr},
Ewann Pelle6eecb8f2023-06-23 14:31:37533};
534
Huiting Yud7d2a5322023-02-09 21:14:22535const FeatureEntry::FeatureParam
536 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
537 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
538const FeatureEntry::FeatureParam
539 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
540 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
541const FeatureEntry::FeatureParam
Hira Mahmood1baa9be2023-05-25 13:55:20542 kCredentialProviderExtensionPromoOnAllTriggers[] = {
Hira Mahmood1baa9be2023-05-25 13:55:20543 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
544 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22545
546const FeatureEntry::FeatureVariation
547 kCredentialProviderExtensionPromoVariations[] = {
548 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
549 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
550 {"On password copied",
551 kCredentialProviderExtensionPromoOnPasswordCopied,
552 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20553 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
Huiting Yu7997667e2023-07-07 16:12:30554 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr}};
Huiting Yud7d2a5322023-02-09 21:14:22555
Olivier ROBINfd3887b72023-02-23 14:45:42556const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
557 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
Olivier Robinfa8de5502023-06-21 19:53:44558const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateWithIncognito[] = {
559 {kIOSEditMenuPartialTranslateNoIncognitoParam, "false"}};
Olivier ROBINfd3887b72023-02-23 14:45:42560const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
561 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
Olivier Robinfa8de5502023-06-21 19:53:44562 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr},
563 {"Enable on incognito", kIOSEditMenuPartialTranslateWithIncognito,
564 std::size(kIOSEditMenuPartialTranslateWithIncognito), nullptr}};
Olivier ROBINfd3887b72023-02-23 14:45:42565
Olivier ROBIN2613bcd02023-04-20 10:00:47566const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
567 {kIOSEditMenuSearchWithTitleParamTitle,
568 kIOSEditMenuSearchWithTitleSearchWithParam}};
569const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
570 {kIOSEditMenuSearchWithTitleParamTitle,
571 kIOSEditMenuSearchWithTitleSearchParam}};
572const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
573 {kIOSEditMenuSearchWithTitleParamTitle,
574 kIOSEditMenuSearchWithTitleWebSearchParam}};
575const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
576 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
577 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
578 {"Search", kIOSEditMenuSearchWithTitleSearch,
579 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
580 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
581 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
582};
583
Hira Mahmood6b0e5502023-06-12 21:51:43584const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
585 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
586const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
587 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
588const FeatureEntry::FeatureVariation
589 kPostRestoreDefaultBrowserPromoVariations[] = {
590 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
591 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
592 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
593 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
594};
595
Christian Xu07d600192023-07-24 12:29:52596const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingTop[] = {
597 {kBottomOmniboxDefaultSettingParam, kBottomOmniboxDefaultSettingParamTop}};
598const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingBottom[] = {
599 {kBottomOmniboxDefaultSettingParam,
600 kBottomOmniboxDefaultSettingParamBottom}};
601const FeatureEntry::FeatureParam kBottomOmniboxDefaultSettingSafariSwitcher[] =
602 {{kBottomOmniboxDefaultSettingParam,
603 kBottomOmniboxDefaultSettingParamSafariSwitcher}};
604const FeatureEntry::FeatureVariation kBottomOmniboxDefaultSettingVariations[] =
605 {
606 {"Top", kBottomOmniboxDefaultSettingTop,
607 std::size(kBottomOmniboxDefaultSettingTop), nullptr},
608 {"Bottom", kBottomOmniboxDefaultSettingBottom,
609 std::size(kBottomOmniboxDefaultSettingBottom), nullptr},
610 {"Bottom for Safari Switcher",
611 kBottomOmniboxDefaultSettingSafariSwitcher,
612 std::size(kBottomOmniboxDefaultSettingSafariSwitcher), nullptr},
613};
614
Marc Treib9bddebb2023-06-15 14:03:34615const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
616 {"Default", "", ""},
Marc Treib565b4182023-07-28 10:27:25617 {"Disabled", "disable-features",
618 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24619 "ConsistencyNewAccountInterface,"
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02620 "FeedBottomSyncStringRemoval,"
621 "SyncEnableContactInfoDataTypeInTransportMode,"
622 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
623 "SyncEnableBatchUploadLocalData,"
624 "SyncEnableWalletMetadataInTransportMode,"
625 "SyncEnableWalletOfferInTransportMode,"
626 "IOSPasswordSettingsBulkUploadLocalPasswords"},
627 {"Enabled without fast-follows", "enable-features",
Marc Treib9bddebb2023-06-15 14:03:34628 "ReplaceSyncPromosWithSignInPromos,"
Victor Hugo Vianna Silvaa730e2c2023-08-31 10:28:24629 "ConsistencyNewAccountInterface,"
Marc Treib565b4182023-07-28 10:27:25630 "FeedBottomSyncStringRemoval,"
Marc Treib9bddebb2023-06-15 14:03:34631 "SyncEnableContactInfoDataTypeInTransportMode,"
Marc Treibae48ec482023-08-04 16:33:37632 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
Jood Hajeer5c609ec2023-09-05 12:20:55633 "SyncEnableBatchUploadLocalData,"
Marc Treibd4de9272023-09-19 13:54:06634 "SyncEnableWalletMetadataInTransportMode,"
Marc Treibfcc40d02023-09-20 18:16:06635 "SyncEnableWalletOfferInTransportMode,"
636 "IOSPasswordSettingsBulkUploadLocalPasswords"},
Victor Hugo Vianna Silva4e9893b2023-10-30 11:17:02637 {"Enabled with fast-follows", "enable-features",
638 "ReplaceSyncPromosWithSignInPromos,"
639 "ConsistencyNewAccountInterface,"
640 "FeedBottomSyncStringRemoval,"
641 "SyncEnableContactInfoDataTypeInTransportMode,"
642 "SyncEnableContactInfoDataTypeForCustomPassphraseUsers,"
643 "SyncEnableBatchUploadLocalData,"
644 "SyncEnableWalletMetadataInTransportMode,"
645 "SyncEnableWalletOfferInTransportMode,"
646 "IOSPasswordSettingsBulkUploadLocalPasswords,"
Ankush Singh112070892023-11-02 11:15:33647 "HistoryOptInForRestoreShortyAndReSignin,"
Jood Hajeerdb49c032023-11-14 10:32:07648 "EnableBatchUploadFromBookmarksManager,"
649 "EnableReviewAccountSettingsPromo"},
Marc Treib9bddebb2023-06-15 14:03:34650};
651
Olivier ROBIN82b67002023-07-31 14:34:46652const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDefault[] = {
653 {web::features::kOneTapForMapsConsentModeParamTitle,
654 web::features::kOneTapForMapsConsentModeDefaultParam}};
655const FeatureEntry::FeatureParam kOneTapForMapsConsentModeForced[] = {
656 {web::features::kOneTapForMapsConsentModeParamTitle,
657 web::features::kOneTapForMapsConsentModeForcedParam}};
658const FeatureEntry::FeatureParam kOneTapForMapsConsentModeDisabled[] = {
659 {web::features::kOneTapForMapsConsentModeParamTitle,
660 web::features::kOneTapForMapsConsentModeDisabledParam}};
Olivier ROBIN333f0b542023-09-01 14:53:31661const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPH[] = {
662 {web::features::kOneTapForMapsConsentModeParamTitle,
663 web::features::kOneTapForMapsConsentModeIPHParam}};
664const FeatureEntry::FeatureParam kOneTapForMapsConsentModeIPHForced[] = {
665 {web::features::kOneTapForMapsConsentModeParamTitle,
666 web::features::kOneTapForMapsConsentModeIPHForcedParam}};
Olivier ROBIN82b67002023-07-31 14:34:46667const FeatureEntry::FeatureVariation kOneTapForMapsWithVariations[] = {
668 {"Consent Default", kOneTapForMapsConsentModeDefault,
669 std::size(kOneTapForMapsConsentModeDefault), nullptr},
670 {"Consent Forced", kOneTapForMapsConsentModeForced,
671 std::size(kOneTapForMapsConsentModeForced), nullptr},
Olivier ROBIN333f0b542023-09-01 14:53:31672 {"Consent IPH", kOneTapForMapsConsentModeIPH,
673 std::size(kOneTapForMapsConsentModeIPH), nullptr},
674 {"Consent IPH forced", kOneTapForMapsConsentModeIPHForced,
675 std::size(kOneTapForMapsConsentModeIPHForced), nullptr},
Olivier ROBIN82b67002023-07-31 14:34:46676 {"Consent Disabled", kOneTapForMapsConsentModeDisabled,
677 std::size(kOneTapForMapsConsentModeDisabled), nullptr},
678};
679
Stepan Khapuginec68d5bb2023-10-16 13:35:25680constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total5Trends[] = {
681 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19682 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "20"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25683constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total5Trends[] = {
684 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "5"},
Ameur Hosni15084c2a2023-10-23 09:30:19685 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25686constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith25Total10Trends[] = {
687 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19688 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "15"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25689constexpr FeatureEntry::FeatureParam kOmniboxInspireMeWith20Total10Trends[] = {
690 {OmniboxFieldTrial::kInspireMeAdditionalTrendingQueries.name, "10"},
Ameur Hosni15084c2a2023-10-23 09:30:19691 {OmniboxFieldTrial::kInspireMePsuggestQueries.name, "10"}};
Stepan Khapuginec68d5bb2023-10-16 13:35:25692
693constexpr FeatureEntry::FeatureVariation kOmniboxInspireMeVariants[] = {
694 {"25 total, 5 Trends", kOmniboxInspireMeWith25Total5Trends,
695 std::size(kOmniboxInspireMeWith25Total5Trends), "t3363282"},
696 {"20 total, 5 Trends", kOmniboxInspireMeWith20Total5Trends,
697 std::size(kOmniboxInspireMeWith20Total5Trends), "t3363282"},
698 {"25 total, 10 Trends", kOmniboxInspireMeWith25Total10Trends,
699 std::size(kOmniboxInspireMeWith25Total10Trends), "t3363285"},
700 {"20 total, 10 Trends", kOmniboxInspireMeWith20Total10Trends,
701 std::size(kOmniboxInspireMeWith20Total10Trends), "t3363285"},
702};
703
Rafał Godlewskie75d12402023-10-25 15:31:53704const FeatureEntry::Choice kEnablePasswordSharingChoices[] = {
705 {"Default", "", ""},
706 {"Bootstraping Only", switches::kEnableFeatures,
707 "SharingOfferKeyPairBootstrap"},
708 {"Enabled", switches::kEnableFeatures,
709 "SharingOfferKeyPairBootstrap,SendPasswords,"
710 "PasswordManagerEnableSenderService,"
711 "PasswordManagerEnableReceiverService,SharedPasswordNotificationUI"},
712};
713
Scott Yoderd781bd12023-10-25 20:47:15714const FeatureEntry::FeatureParam kIOSHideFeedWithSearchChoiceTargetedParams[] =
715 {{kIOSHideFeedWithSearchChoiceTargeted, "true"}};
716const FeatureEntry::FeatureVariation kIOSHideFeedWithSearchChoiceVariations[]{
717 {"with targeting", kIOSHideFeedWithSearchChoiceTargetedParams,
718 std::size(kIOSHideFeedWithSearchChoiceTargetedParams), nullptr},
719};
720
Matt Jones79534392023-10-27 14:35:02721const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataDelivered[] =
722 {{commerce::kParcelTrackingTestDataParam,
723 commerce::kParcelTrackingTestDataParamDelivered}};
724const flags_ui::FeatureEntry::FeatureParam kParcelTrackingTestDataInProgress[] =
725 {{commerce::kParcelTrackingTestDataParam,
726 commerce::kParcelTrackingTestDataParamInProgress}};
727const flags_ui::FeatureEntry::FeatureParam
728 kParcelTrackingTestDataOutForDelivery[] = {
729 {commerce::kParcelTrackingTestDataParam,
730 commerce::kParcelTrackingTestDataParamOutForDelivery}};
731const flags_ui::FeatureEntry::FeatureVariation
732 kParcelTrackingTestDataVariations[] = {
733 {"Delivered", kParcelTrackingTestDataDelivered,
734 std::size(kParcelTrackingTestDataDelivered), nullptr},
735 {"In progress", kParcelTrackingTestDataInProgress,
736 std::size(kParcelTrackingTestDataInProgress), nullptr},
737 {"Out for delivery", kParcelTrackingTestDataOutForDelivery,
738 std::size(kParcelTrackingTestDataOutForDelivery), nullptr},
739};
740
Cooper Knaak1e026562017-07-26 05:22:28741// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21742// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28743// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
744// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21745// macro for this type supplying the command line to the macro.
746// . MULTI_VALUE: a list of choices, the first of which should correspond to a
747// deactivated state for this lab (i.e. no command line option). To specify
748// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
749// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28750// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
751// either enabled, disabled, or uses the default value of the associated
752// base::Feature instance. To specify this type of entry use the macro
753// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
754// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
755// base::Feature instance. Choices corresponding to the default state, a
756// universally enabled state, and a universally disabled state are
757// automatically included. To specify this type of entry use the macro
758// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
759// the array of choices.
760//
sdefresne14900ee2015-11-27 14:43:21761// See the documentation of FeatureEntry for details on the fields.
762//
763// When adding a new choice, add it to the end of the list.
764const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28765 {"in-product-help-demo-mode-choice",
766 flag_descriptions::kInProductHelpDemoModeName,
767 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
768 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23769 feature_engagement::kIPHDemoMode,
770 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09771 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22772 {"enable-autofill-credit-card-upload",
773 flag_descriptions::kAutofillCreditCardUploadName,
774 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24775 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23776 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
777 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
778 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51779 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23780 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
781 {"wallet-service-use-sandbox",
782 flag_descriptions::kWalletServiceUseSandboxName,
783 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
784 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
785 autofill::switches::kWalletServiceUseSandbox,
786 "1",
787 autofill::switches::kWalletServiceUseSandbox,
788 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59789 {"show-autofill-type-predictions",
790 flag_descriptions::kShowAutofillTypePredictionsName,
791 flag_descriptions::kShowAutofillTypePredictionsDescription,
792 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50793 FEATURE_VALUE_TYPE(
794 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jainb86c94b2023-04-06 14:13:57795 {"autofill-account-profiles-storage",
796 flag_descriptions::kAutofillAccountProfilesStorageName,
797 flag_descriptions::kAutofillAccountProfilesStorageDescription,
798 flags_ui::kOsIos,
799 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfileStorage)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05800 {"fullscreen-promos-manager-skip-internal-limits",
801 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
802 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
803 flags_ui::kOsIos,
804 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14805 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53806 flag_descriptions::kFullscreenSmoothScrollingName,
807 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19808 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06809 {"webpage-default-zoom-from-dynamic-type",
810 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
811 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
812 flags_ui::kOsIos,
813 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56814 {"webpage-alternative-text-zoom",
815 flag_descriptions::kWebPageAlternativeTextZoomName,
816 flag_descriptions::kWebPageAlternativeTextZoomDescription,
817 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34818 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
819 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
820 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13821 {"omnibox-ui-max-autocomplete-matches",
822 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
823 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
824 flags_ui::kOsIos,
825 FEATURE_WITH_PARAMS_VALUE_TYPE(
826 omnibox::kUIExperimentMaxAutocompleteMatches,
827 kOmniboxUIMaxAutocompleteMatchesVariations,
828 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35829 {"omnibox-local-history-zero-suggest-beyond-ntp",
830 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
831 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
832 flags_ui::kOsIos,
833 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54834 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
835 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
836 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
837 kOmniboxMaxZPSMatchesVariations,
838 "OmniboxMaxZPSVariations")},
Stepan Khapuginec68d5bb2023-10-16 13:35:25839 {"omnibox-inspire-me", flag_descriptions::kOmniboxInspireMeName,
840 flag_descriptions::kOmniboxInspireMeDescription, flags_ui::kOsIos,
841 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kInspireMe,
842 kOmniboxInspireMeVariants,
843 "OmniboxBundledExperimentV1")},
844 {"omnibox-inspire-me-signed-out",
845 flag_descriptions::kOmniboxInspireMeSignedOutName,
846 flag_descriptions::kOmniboxInspireMeSignedOutDescription, flags_ui::kOsIos,
847 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestOnNTPForSignedOutUsers)},
Caitlin Fischer43edd90a2019-05-01 13:24:30848 {"autofill-use-mobile-label-disambiguation",
849 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
850 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
851 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45852 FEATURE_WITH_PARAMS_VALUE_TYPE(
853 autofill::features::kAutofillUseMobileLabelDisambiguation,
854 kAutofillUseMobileLabelDisambiguationVariations,
855 "AutofillUseMobileLabelDisambiguation")},
Jérôme Lebelc374fdd2019-09-27 10:36:48856 {"force-startup-signin-promo",
857 flag_descriptions::kForceStartupSigninPromoName,
858 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29859 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22860 {"restore-session-from-cache",
861 flag_descriptions::kRestoreSessionFromCacheName,
862 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49863 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Tommy Martino6b4eb7e2020-06-25 18:25:41864 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
865 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
866 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13867#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45868 {"screen-time-integration-ios",
869 flag_descriptions::kScreenTimeIntegrationName,
870 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
871 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13872#endif
Nazerke3e993f72020-09-21 13:00:06873 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
874 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(kModernTabStrip)},
Cheick Cisse76ade3d2020-12-16 00:15:11876 {"ios-shared-highlighting-color-change",
877 flag_descriptions::kIOSSharedHighlightingColorChangeName,
878 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07879 flags_ui::kOsIos,
880 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34881 {"ios-shared-highlighting-v2",
882 flag_descriptions::kIOSSharedHighlightingV2Name,
883 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
884 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45885 {"omnibox-new-textfield-implementation",
886 flag_descriptions::kOmniboxNewImplementationName,
887 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
888 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0da12382023-01-24 16:08:12889 {"omnibox-report-assisted-query-stats",
890 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
891 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
892 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
893 {"omnibox-report-searchbox-stats",
894 flag_descriptions::kOmniboxReportSearchboxStatsName,
895 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
896 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
gogerald0ff29e52021-02-03 18:56:19897 {"start-surface", flag_descriptions::kStartSurfaceName,
898 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23899 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
900 kStartSurfaceVariations,
901 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42902 {"autofill-address-verification-in-save-prompt",
903 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
904 flag_descriptions::
905 kEnableAutofillAddressSavePromptAddressVerificationDescription,
906 flags_ui::kOsIos,
907 FEATURE_VALUE_TYPE(
908 autofill::features::
909 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Side Yilmaz6c53f7102021-09-07 13:26:19910 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
911 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
912 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34913 {"wait-threshold-seconds-for-capabilities-api",
914 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
915 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
916 flags_ui::kOsIos,
917 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Robbie Gibson26d6fbf2023-10-20 00:08:28918 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
919 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
920 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Guillem Perez49e1df42023-08-23 22:15:24921 {"content-push-notifications",
922 flag_descriptions::kContentPushNotificationsName,
923 flag_descriptions::kContentPushNotificationsDescription, flags_ui::kOsIos,
924 FEATURE_VALUE_TYPE(kContentPushNotifications)},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57925 {"overflow-menu-customization",
926 flag_descriptions::kOverflowMenuCustomizationName,
927 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
928 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu67cfb0f2022-11-14 20:21:44929 {"enable-lens-in-omnibox-copied-image",
930 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
931 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
932 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40933 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23934 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
935 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40936 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23937 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03938 {"enable-disco-feed-endpoint",
939 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
940 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
941 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11942 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15943 {"enable-discover-feed-top-sync-promo",
944 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
945 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
946 flags_ui::kOsIos,
947 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
948 kDiscoverFeedTopSyncPromoVariations,
949 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14950 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
951 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
952 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
953 kFeedHeaderSettingsVariations,
954 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28955 {"shared-highlighting-amp",
956 flag_descriptions::kIOSSharedHighlightingAmpName,
957 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
958 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28959 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42960 commerce::flag_descriptions::kCommercePriceTrackingName,
961 commerce::flag_descriptions::kCommercePriceTrackingDescription,
962 flags_ui::kOsIos,
963 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
964 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15965 "CommercePriceTracking")},
adamta250f4ad2023-08-02 15:26:06966 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
967 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54969 {"ntp-view-hierarchy-repair",
970 flag_descriptions::kNTPViewHierarchyRepairName,
971 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20972 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Vishwas Uppoor89303a92022-08-03 00:56:26973 {"autofill-enable-card-product-name",
974 flag_descriptions::kAutofillEnableCardProductNameName,
975 flag_descriptions::kAutofillEnableCardProductNameDescription,
976 flags_ui::kOsIos,
977 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Jared Saulb0473bd2022-04-20 00:03:41978 {"autofill-upstream-allow-additional-email-domains",
979 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
980 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
981 flags_ui::kOsIos,
982 FEATURE_VALUE_TYPE(
983 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
984 {"autofill-upstream-allow-all-email-domains",
985 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
986 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
987 flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(
989 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52990 {"enable-download-service-foreground-session",
991 flag_descriptions::kDownloadServiceForegroundSessionName,
992 flag_descriptions::kDownloadServiceForegroundSessionDescription,
993 flags_ui::kOsIos,
994 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23995 {"enable-tflite-language-detection",
996 flag_descriptions::kTFLiteLanguageDetectionName,
997 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
998 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20999 {"optimization-guide-debug-logs",
1000 flag_descriptions::kOptimizationGuideDebugLogsName,
1001 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1002 flags_ui::kOsIos,
1003 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:551004 {"optimization-guide-push-notifications",
1005 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1006 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1007 flags_ui::kOsIos,
1008 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:251009 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
1010 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
1011 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:011012 {"suggestions-scrolling-ipad",
1013 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1014 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1015 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001016 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1017 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1018 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251019 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1020 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331021 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
David Jeanad303a92023-07-31 16:58:111022 {"intents-on-measurements", flag_descriptions::kMeasurementsName,
1023 flag_descriptions::kMeasurementsDescription, flags_ui::kOsIos,
1024 FEATURE_VALUE_TYPE(web::features::kEnableMeasurements)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551025 {"experience-kit-apple-calendar",
1026 flag_descriptions::kAppleCalendarExperienceKitName,
1027 flag_descriptions::kAppleCalendarExperienceKitDescription,
1028 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081029 {"enable-expkit-text-classifier",
1030 flag_descriptions::kEnableExpKitTextClassifierName,
1031 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151032 flags_ui::kOsIos,
1033 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1034 kEnableExpKitTextClassifierVariations,
1035 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331036 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1037 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
Olivier ROBIN82b67002023-07-31 14:34:461038 FEATURE_WITH_PARAMS_VALUE_TYPE(web::features::kOneTapForMaps,
1039 kOneTapForMapsWithVariations,
1040 "OneTapForMaps")},
David Jean139ba1bf2023-08-31 15:59:321041 {"enable-annotations-language-detection",
1042 flag_descriptions::kUseAnnotationsForLanguageDetectionName,
1043 flag_descriptions::kUseAnnotationsForLanguageDetectionDescription,
1044 flags_ui::kOsIos,
1045 FEATURE_VALUE_TYPE(web::features::kUseAnnotationsForLanguageDetection)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251046 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1047 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1048 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Alexander Tekleb4643812023-01-06 23:12:301049 {"autofill-enable-ranking-formula-address-profiles",
1050 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1051 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1052 flags_ui::kOsIos,
1053 FEATURE_VALUE_TYPE(
1054 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391055 {"autofill-enable-ranking-formula-credit-cards",
1056 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1057 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1058 flags_ui::kOsIos,
1059 FEATURE_VALUE_TYPE(
1060 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021061 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1062 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1063 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Chris Luc36e3962023-04-11 21:50:521064 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1065 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261066 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1067 kMagicStackVariations,
1068 flag_descriptions::kMagicStackName)},
Scott Yoderfeaf2c262023-10-16 21:23:211069 {"ios-hide-feed-with-search-choice",
1070 flag_descriptions::kIOSHideFeedWithSearchChoiceName,
1071 flag_descriptions::kIOSHideFeedWithSearchChoiceDescription,
Scott Yoderd781bd12023-10-25 20:47:151072 flags_ui::kOsIos,
1073 FEATURE_WITH_PARAMS_VALUE_TYPE(
1074 kIOSHideFeedWithSearchChoice,
1075 kIOSHideFeedWithSearchChoiceVariations,
1076 flag_descriptions::kIOSHideFeedWithSearchChoiceName)},
Alexis Hetuec9d70c2023-11-13 16:27:311077 {"ios-keyboard-accessory-upgrade",
1078 flag_descriptions::kIOSKeyboardAccessoryUpgradeName,
1079 flag_descriptions::kIOSKeyboardAccessoryUpgradeDescription,
1080 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSKeyboardAccessoryUpgrade)},
Scott Yoder7b9e51f2023-09-13 23:47:261081 {"ios-large-fakebox", flag_descriptions::kIOSLargeFakeboxName,
1082 flag_descriptions::kIOSLargeFakeboxDescription, flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(kIOSLargeFakebox)},
Chris Lub0bad572023-08-07 18:13:291084 {"ios-magic-stack-segmentation-ranking",
1085 flag_descriptions::kSegmentationPlatformIosModuleRankerName,
1086 flag_descriptions::kSegmentationPlatformIosModuleRankerDescription,
1087 flags_ui::kOsIos,
Chris Lu6fd4eaf2023-08-08 18:29:301088 FEATURE_WITH_PARAMS_VALUE_TYPE(
1089 segmentation_platform::features::kSegmentationPlatformIosModuleRanker,
1090 kSegmentationPlatformIosModuleRankerVariations,
1091 flag_descriptions::kSegmentationPlatformIosModuleRankerName)},
Olivier Robin058c1fad2022-05-31 18:24:061092 {"default-browser-intents-show-settings",
1093 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1094 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1095 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Tommy Martinoad42be52022-06-13 11:51:191096 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1097 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1098 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Veronique Nguyenc3d7db52023-03-08 22:52:321099 {"ios-password-bottom-sheet",
1100 flag_descriptions::kIOSPasswordBottomSheetName,
1101 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1102 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hétu459451a2023-06-01 17:05:311103 {"ios-payments-bottom-sheet",
1104 flag_descriptions::kIOSPaymentsBottomSheetName,
1105 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1106 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
Moe Ahmadi098519d82022-07-27 18:34:241107 {"omnibox-zero-suggest-prefetching",
1108 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1109 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1110 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451111 {"omnibox-zero-suggest-prefetching-on-srp",
1112 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1113 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1114 flags_ui::kOsIos,
1115 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1116 {"omnibox-zero-suggest-prefetching-on-web",
1117 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1118 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1119 flags_ui::kOsIos,
1120 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471121 {"omnibox-zero-suggest-in-memory-caching",
1122 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1123 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1124 flags_ui::kOsIos,
1125 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351126 {"omnibox-on-device-tail-suggestions",
1127 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1128 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1129 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosada1e852023-03-10 19:14:411130 {"enable-button-configuration-usage",
1131 flag_descriptions::kEnableUIButtonConfigurationName,
1132 flag_descriptions::kEnableUIButtonConfigurationDescription,
1133 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Vincent Boisselle68105c6f2023-08-03 16:43:071134 {"enable-user-policy-for-signin-and-nosync-consent-level",
1135 flag_descriptions::kEnableUserPolicyForSigninAndNoSyncConsentLevelName,
1136 flag_descriptions::
1137 kEnableUserPolicyForSigninAndNoSyncConsentLevelDescription,
1138 flags_ui::kOsIos,
1139 FEATURE_VALUE_TYPE(policy::kUserPolicyForSigninAndNoSyncConsentLevel)},
1140 {"enable-user-policy-for-signin-or-sync-consent-level",
1141 flag_descriptions::kEnableUserPolicyForSigninOrSyncConsentLevelName,
1142 flag_descriptions::kEnableUserPolicyForSigninOrSyncConsentLevelDescription,
1143 flags_ui::kOsIos,
1144 FEATURE_VALUE_TYPE(policy::kUserPolicyForSigninOrSyncConsentLevel)},
Christian Xucf26d562022-07-06 09:28:361145 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1146 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1147 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1148 kOmniboxMaxURLMatchesVariations,
1149 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061150 {"metrickit-non-crash-reports",
1151 flag_descriptions::kMetrickitNonCrashReportName,
1152 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1153 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371154 {"autofill-enable-remade-downstream-metrics",
1155 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1156 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1157 flags_ui::kOsIos,
1158 FEATURE_VALUE_TYPE(
1159 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551160 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1161 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1162 flag_descriptions::
1163 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1164 flags_ui::kOsIos,
1165 FEATURE_VALUE_TYPE(
1166 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse2806f082b2023-04-25 14:20:011167 {"default-browser-video-promo",
1168 flag_descriptions::kDefaultBrowserVideoPromoName,
1169 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1170 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1171 kDefaultBrowserVideoPromoVariations,
1172 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541173 {"default-browser-promo-force-show-promo",
1174 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1175 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1176 flags_ui::kOsIos,
1177 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171178 {"default-browser-promo-trigger-criteria-experiment",
1179 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1180 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1181 flags_ui::kOsIos,
Gayane Petrosyandc3188c2023-08-10 17:28:501182 FEATURE_VALUE_TYPE(kDefaultBrowserTriggerCriteriaExperiment)},
Gayane Petrosyan6fb79752023-09-26 15:39:441183 {"default-browser-video-in-settings",
Gayane Petrosyan01c84952023-10-02 18:28:211184 flag_descriptions::kDefaultBrowserVideoInSettingsName,
1185 flag_descriptions::kDefaultBrowserVideoInSettingsDescription,
1186 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserVideoInSettings)},
Gayane Petrosyandc3188c2023-08-10 17:28:501187 {"fullscreen-promo-on-omnibox-copy-paste",
1188 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteName,
1189 flag_descriptions::kFullScreenPromoOnOmniboxCopyPasteDescription,
1190 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFullScreenPromoOnOmniboxCopyPaste)},
Ed Chin91e44992022-07-27 13:42:341191#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1192 {"feed-background-refresh-ios",
1193 flag_descriptions::kFeedBackgroundRefreshName,
1194 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1195 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1196 kFeedBackgroundRefreshVariations,
1197 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261198#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291199 {"feed-invisible-foreground-refresh-ios",
1200 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1201 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1202 flags_ui::kOsIos,
1203 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1204 kFeedInvisibleForegroundRefreshVariations,
1205 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191206 {"omnibox-keyboard-paste-button",
1207 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1208 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1209 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Cheick Cisse5d2b6cb82023-06-05 17:27:581210 {"whats-new-ios-m116", flag_descriptions::kWhatsNewIOSM116Name,
1211 flag_descriptions::kWhatsNewIOSM116Description, flags_ui::kOsIos,
1212 FEATURE_VALUE_TYPE(kWhatsNewIOSM116)},
Hira Mahmoodb0e5f412022-09-01 19:41:051213 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1214 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1215 FEATURE_VALUE_TYPE(kAppStoreRating)},
Olivier ROBINf05518782022-09-14 23:55:501216 {"enable-tflite-language-detection-ignore",
1217 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1218 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1219 flags_ui::kOsIos,
1220 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571221 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1222 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Hira Mahmoodea109752022-11-17 17:45:411224 {"credential-provider-extension-promo",
1225 flag_descriptions::kCredentialProviderExtensionPromoName,
1226 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221227 flags_ui::kOsIos,
1228 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1229 kCredentialProviderExtensionPromoVariations,
1230 "CredentialProviderExtensionPromo")},
Daniel Whiteae1cb672022-12-14 18:25:251231 {"iph-price-notifications-while-browsing",
1232 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1233 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1234 flags_ui::kOsIos,
1235 FEATURE_VALUE_TYPE(
1236 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501237 {"autofill-suggest-server-card-instead-of-local-card",
1238 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1239 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1240 flags_ui::kOsIos,
1241 FEATURE_VALUE_TYPE(
1242 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Robbie Gibson88f680a2023-01-19 16:47:301243 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1244 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1245 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Matt Jonesc01327662023-08-02 16:34:291246 {"shopping-collection",
1247 commerce::flag_descriptions::kShoppingCollectionName,
1248 commerce::flag_descriptions::kShoppingCollectionDescription,
1249 flags_ui::kOsIos, FEATURE_VALUE_TYPE(commerce::kShoppingCollection)},
Ewann Pelledec2d042023-01-25 15:28:391250 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1251 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1252 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones5c8c8e32023-06-13 22:49:471253 {"shopping-list-track-by-default",
1254 commerce::flag_descriptions::kShoppingListTrackByDefaultName,
1255 commerce::flag_descriptions::kShoppingListTrackByDefaultDescription,
1256 flags_ui::kOsIos,
1257 FEATURE_VALUE_TYPE(commerce::kShoppingListTrackByDefault)},
Matt Jones1795eda2023-05-09 20:24:481258 {"local-pdp-detection",
1259 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1260 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1261 flags_ui::kOsIos,
1262 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121263 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1264 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1265 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1266 kTabInactivityThresholdVariations,
1267 "TabInactivityThreshold")},
Joemer Ramos0fccdf62023-07-28 17:17:181268 {"enable-friendlier-safe-browsing-settings-enhanced-protection",
1269 flag_descriptions::
1270 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionName,
1271 flag_descriptions::
1272 kEnableFriendlierSafeBrowsingSettingsEnhancedProtectionDescription,
1273 flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(
1275 safe_browsing::kFriendlierSafeBrowsingSettingsEnhancedProtection)},
Awad Osmanf1a89122023-07-27 19:59:361276 {"enable-friendlier-safe-browsing-settings-standard-protection",
1277 flag_descriptions::
1278 kEnableFriendlierSafeBrowsingSettingsStandardProtectionName,
1279 flag_descriptions::
1280 kEnableFriendlierSafeBrowsingSettingsStandardProtectionDescription,
Joemer Ramos961389e52023-07-20 20:22:521281 flags_ui::kOsIos,
Awad Osmanf1a89122023-07-27 19:59:361282 FEATURE_VALUE_TYPE(
1283 safe_browsing::kFriendlierSafeBrowsingSettingsStandardProtection)},
Sarah Criel5d59a3932023-09-05 23:44:291284 {"enable-red-interstitial-facelift",
1285 flag_descriptions::kEnableRedInterstitialFaceliftName,
1286 flag_descriptions::kEnableRedInterstitialFaceliftDescription,
1287 flags_ui::kOsIos,
1288 FEATURE_VALUE_TYPE(safe_browsing::kRedInterstitialFacelift)},
Louis Romero58f355022023-02-13 19:04:311289 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1290 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1291 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421292 {"ios-edit-menu-partial-translate",
1293 flag_descriptions::kIOSEditMenuPartialTranslateName,
1294 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421295 flags_ui::kOsIos,
1296 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1297 kIOSEditMenuPartialTranslateVariations,
1298 "IOSEditMenuPartialTranslate")},
Ali Juma57849c42023-02-21 22:53:431299 {"notification-settings-menu-item",
1300 flag_descriptions::kNotificationSettingsMenuItemName,
1301 flag_descriptions::kNotificationSettingsMenuItemDescription,
1302 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
Ed Chin97560fc42023-02-20 16:48:321303 {"feed-experiment-tagging-ios",
1304 flag_descriptions::kFeedExperimentTaggingName,
1305 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1306 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061307 {"spotlight-reading-list-source",
1308 flag_descriptions::kSpotlightReadingListSourceName,
1309 flag_descriptions::kSpotlightReadingListSourceDescription,
1310 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
Yann Dagob206dca42023-10-30 17:24:481311 {"enable-policy-test-page-ios",
1312 flag_descriptions::kEnablePolicyTestPageName,
1313 flag_descriptions::kEnablePolicyTestPageDescription, flags_ui::kOsIos,
1314 FEATURE_VALUE_TYPE(policy::features::kEnablePolicyTestPage)},
Menghan YANGf3fe2de52023-02-27 16:38:501315 {"enable-bookmarks-account-storage",
1316 flag_descriptions::kEnableBookmarksAccountStorageName,
1317 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1318 flags_ui::kOsIos,
Marc Treib98d17f52023-07-06 13:00:461319 FEATURE_VALUE_TYPE(syncer::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531320 {"web-feed-feedback-reroute",
1321 flag_descriptions::kWebFeedFeedbackRerouteName,
1322 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1323 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551324 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1325 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1326 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Tina Wangd3f6f192023-04-05 05:22:431327 {"enable-follow-IPH-exp-params",
1328 flag_descriptions::kEnableFollowIPHExpParamsName,
1329 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1330 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031331 {"enable-follow-management-instant-reload",
1332 flag_descriptions::kEnableFollowManagementInstantReloadName,
1333 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1334 flags_ui::kOsIos,
1335 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251336 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1337 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1338 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441339 {"mixed-content-autoupgrade-ios",
1340 flag_descriptions::kMixedContentAutoupgradeName,
1341 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1342 FEATURE_VALUE_TYPE(
1343 security_interstitials::features::kMixedContentAutoupgrade)},
Marc Treibe9f79ea72023-03-14 10:25:421344 {"enable-preferences-account-storage",
1345 flag_descriptions::kEnablePreferencesAccountStorageName,
1346 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Olivier ROBINa229d2132023-03-21 12:44:201349 {"ios-browser-edit-menu-metrics",
1350 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1351 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1352 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Nicolas MacBeth17c9b92c2023-08-24 14:15:401353 {"ios-bulk-upload-local-passwords",
1354 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsName,
1355 flag_descriptions::kIOSPasswordSettingsBulkUploadLocalPasswordsDescription,
1356 flags_ui::kOsIos,
1357 FEATURE_VALUE_TYPE(password_manager::features::
1358 kIOSPasswordSettingsBulkUploadLocalPasswords)},
Menghan YANG5b3a78a2023-03-24 17:38:261359 {"enable-reading-list-account-storage",
1360 flag_descriptions::kEnableReadingListAccountStorageName,
1361 flag_descriptions::kEnableReadingListAccountStorageDescription,
1362 flags_ui::kOsIos,
Marc Treib98d17f52023-07-06 13:00:461363 FEATURE_VALUE_TYPE(syncer::kReadingListEnableDualReadingListModel)},
Menghan YANG5b3a78a2023-03-24 17:38:261364 {"enable-reading-list-sign-in-promo",
1365 flag_descriptions::kEnableReadingListSignInPromoName,
1366 flag_descriptions::kEnableReadingListSignInPromoDescription,
1367 flags_ui::kOsIos,
Marc Treib98d17f52023-07-06 13:00:461368 FEATURE_VALUE_TYPE(syncer::kReadingListEnableSyncTransportModeUponSignIn)},
Stepan Khapuginb2f49522023-04-03 18:25:241369 {"omnibox-grouping-framework-zps",
1370 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1371 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1372 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1373 {"omnibox-grouping-framework-non-zps",
1374 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1375 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1376 flags_ui::kOsIos,
1377 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471378 {"enable-session-serialization-optimizations",
1379 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1380 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1381 flags_ui::kOsIos,
1382 FEATURE_VALUE_TYPE(
1383 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411384 {"bottom-omnibox-steady-state",
1385 flag_descriptions::kBottomOmniboxSteadyStateName,
1386 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1387 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Robbie Gibson0ea280602023-04-12 01:02:391388 {"only-access-clipboard-async",
1389 flag_descriptions::kOnlyAccessClipboardAsyncName,
1390 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1391 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Christian Xue5f60232023-04-12 17:50:091392 {"omnibox-tail-suggest", flag_descriptions::kOmniboxTailSuggestName,
1393 flag_descriptions::kOmniboxTailSuggestDescription, flags_ui::kOsIos,
1394 FEATURE_VALUE_TYPE(kOmniboxTailSuggest)},
Stepan Khapugin5f0a4ae2023-07-05 12:51:191395 {"omnibox-improved-rtl-suggestions",
1396 flag_descriptions::kOmniboxSuggestionsRTLImprovementsName,
1397 flag_descriptions::kOmniboxSuggestionsRTLImprovementsDescription,
1398 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxSuggestionsRTLImprovements)},
Ed Chinecb7d5b2023-04-14 19:22:091399 {"feed-disable-hot-start-refresh-ios",
1400 flag_descriptions::kFeedDisableHotStartRefreshName,
1401 flag_descriptions::kFeedDisableHotStartRefreshDescription,
1402 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFeedDisableHotStartRefresh)},
Olivier ROBIN2613bcd02023-04-20 10:00:471403 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1404 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1405 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1406 kIOSEditMenuSearchWithVariations,
1407 "IOSEditMenuSearchWith")},
1408 {"ios-edit-menu-hide-search-web",
1409 flag_descriptions::kIOSEditMenuHideSearchWebName,
1410 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1411 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171412 {"autofill-enable-card-art-image",
1413 flag_descriptions::kAutofillEnableCardArtImageName,
1414 flag_descriptions::kAutofillEnableCardArtImageDescription,
1415 flags_ui::kOsIos,
1416 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Tina Wangcda2c902023-05-25 17:39:451417 {"enable-signed-out-view-demotion",
1418 flag_descriptions::kEnableSignedOutViewDemotionName,
1419 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1420 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251421 {"autofill-use-two-dots-for-last-four-digits",
1422 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1423 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1424 flags_ui::kOsIos,
1425 FEATURE_VALUE_TYPE(
1426 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
sebsg977f9aa2023-06-08 18:48:241427 {"autofill-disable-profile-updates",
1428 flag_descriptions::kAutofillDisableProfileUpdatesName,
1429 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1430 flags_ui::kOsIos,
1431 FEATURE_VALUE_TYPE(
1432 autofill::features::test::kAutofillDisableProfileUpdates)},
1433 {"autofill-disable-silent-profile-updates",
1434 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1435 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1436 flags_ui::kOsIos,
1437 FEATURE_VALUE_TYPE(
1438 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1439 {"autofill-enable-admin-level-2",
1440 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1441 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1442 flags_ui::kOsIos,
1443 FEATURE_VALUE_TYPE(
1444 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1445 {"autofill-enable-between-streets",
1446 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1447 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1448 flags_ui::kOsIos,
1449 FEATURE_VALUE_TYPE(
1450 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1451 {"autofill-enable-landmark",
1452 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1453 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1454 flags_ui::kOsIos,
1455 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431456 {"post-restore-default-browser-promo",
1457 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1458 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1459 flags_ui::kOsIos,
1460 FEATURE_WITH_PARAMS_VALUE_TYPE(
1461 kPostRestoreDefaultBrowserPromo,
1462 kPostRestoreDefaultBrowserPromoVariations,
1463 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311464 {"spotlight-open-tabs-source",
1465 flag_descriptions::kSpotlightOpenTabsSourceName,
1466 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1467 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Stepan Khapuginc302b9412023-09-12 10:19:451468 {"spotlight-donate-new-intents",
1469 flag_descriptions::kSpotlightDonateNewIntentsName,
1470 flag_descriptions::kSpotlightDonateNewIntentsDescription, flags_ui::kOsIos,
1471 FEATURE_VALUE_TYPE(kSpotlightDonateNewIntents)},
Marc Treib9bddebb2023-06-15 14:03:341472 {"replace-sync-promos-with-sign-in-promos",
1473 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1474 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1475 flags_ui::kOsIos,
Gauthier Ambard6ca6d5e2023-06-20 09:33:301476 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)},
Aliona DANGLA4326cad82023-06-20 16:32:571477 {"tab-grid-refactoring", flag_descriptions::kTabGridRefactoringName,
1478 flag_descriptions::kTabGridRefactoringDescription, flags_ui::kOsIos,
1479 FEATURE_VALUE_TYPE(kTabGridRefactoring)},
Ewann Pelle6eecb8f2023-06-23 14:31:371480 {"tab-pickup-threshold", flag_descriptions::kTabPickupThresholdName,
1481 flag_descriptions::kTabPickupThresholdDescription, flags_ui::kOsIos,
1482 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabPickupThreshold,
1483 kTabPickupThresholdVariations,
1484 "TabPickupThreshold")},
Huiting Yubc1bf4d2023-06-26 18:15:321485 {"ios-iph-for-safari-switcher",
1486 flag_descriptions::kIPHForSafariSwitcherName,
1487 flag_descriptions::kIPHForSafariSwitcherDescription, flags_ui::kOsIos,
1488 FEATURE_VALUE_TYPE(kIPHForSafariSwitcher)},
Benjamin Williams9773edd42023-06-26 20:22:071489 {"safety-check-magic-stack", flag_descriptions::kSafetyCheckMagicStackName,
1490 flag_descriptions::kSafetyCheckMagicStackDescription, flags_ui::kOsIos,
1491 FEATURE_VALUE_TYPE(kSafetyCheckMagicStack)},
Hira Mahmood746047162023-07-11 22:02:061492 {"app-store-rating-loosened-triggers",
1493 flag_descriptions::kAppStoreRatingLoosenedTriggersName,
1494 flag_descriptions::kAppStoreRatingLoosenedTriggersDescription,
1495 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAppStoreRatingLoosenedTriggers)},
Ernesto Izquierdo Clua5e589f52023-07-06 20:52:151496 {"ios-password-auth-on-entry",
1497 flag_descriptions::kIOSPasswordAuthOnEntryName,
1498 flag_descriptions::kIOSPasswordAuthOnEntryDescription, flags_ui::kOsIos,
1499 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntry)},
Ewann Pelle9cd85b22023-07-12 14:42:011500 {"tab-resumption", flag_descriptions::kTabResumptionName,
1501 flag_descriptions::kTabResumptionDescription, flags_ui::kOsIos,
Ewann Pellea2bcb3a2023-08-28 13:53:001502 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabResumption,
1503 kTabResumptionVariations,
1504 "TabResumption")},
Siyu An33708bc2023-07-21 20:24:111505 {"autofill-enable-payments-mandatory-reauth-on-bling",
1506 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthOnBlingName,
1507 flag_descriptions::
1508 kAutofillEnablePaymentsMandatoryReauthOnBlingDescription,
1509 flags_ui::kOsIos,
1510 FEATURE_VALUE_TYPE(
1511 autofill::features::kAutofillEnablePaymentsMandatoryReauthOnBling)},
Christian Xu07d600192023-07-24 12:29:521512 {"bottom-omnibox-default-setting",
1513 flag_descriptions::kBottomOmniboxDefaultSettingName,
1514 flag_descriptions::kBottomOmniboxDefaultSettingDescription,
1515 flags_ui::kOsIos,
1516 FEATURE_WITH_PARAMS_VALUE_TYPE(kBottomOmniboxDefaultSetting,
1517 kBottomOmniboxDefaultSettingVariations,
1518 "BottomOmniboxDefaultSetting")},
Ewann Pelle422c0942023-08-01 12:28:131519 {"tab-pickup-minimum-delay", flag_descriptions::kTabPickupMinimumDelayName,
1520 flag_descriptions::kTabPickupMinimumDelayDescription, flags_ui::kOsIos,
1521 FEATURE_VALUE_TYPE(kTabPickupMinimumDelay)},
Nohemi Fernandez64acf982023-08-04 09:27:151522 {"enable-family-link-controls",
1523 flag_descriptions::kEnableFamilyLinkControlsName,
1524 flag_descriptions::kEnableFamilyLinkControlsDescription, flags_ui::kOsIos,
1525 FEATURE_VALUE_TYPE(
1526 supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)},
adamta7be73b182023-08-08 22:30:351527 {"discover-feed-sport-card", flag_descriptions::kDiscoverFeedSportCardName,
1528 flag_descriptions::kDiscoverFeedSportCardDescription, flags_ui::kOsIos,
1529 FEATURE_VALUE_TYPE(kDiscoverFeedSportCard)},
Ernesto Izquierdo Clua6a00cb9d2023-08-11 15:12:501530 {"ios-password-auth-on-entry-v2",
1531 flag_descriptions::kIOSPasswordAuthOnEntryV2Name,
1532 flag_descriptions::kIOSPasswordAuthOnEntryV2Description, flags_ui::kOsIos,
1533 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordAuthOnEntryV2)},
Quentin Pubert476786e82023-08-16 12:45:281534 {"enable-save-to-photos", flag_descriptions::kIOSSaveToPhotosName,
1535 flag_descriptions::kIOSSaveToPhotosDescription, flags_ui::kOsIos,
1536 FEATURE_VALUE_TYPE(kIOSSaveToPhotos)},
Hira Mahmood4c15f382023-08-17 16:21:131537 {"ios-parcel-tracking", flag_descriptions::kIOSParcelTrackingName,
1538 flag_descriptions::kIOSParcelTrackingDescription, flags_ui::kOsIos,
1539 FEATURE_VALUE_TYPE(kIOSParcelTracking)},
Matt Jones79534392023-10-27 14:35:021540 {"parcel-tracking-test-data",
1541 commerce::flag_descriptions::kParcelTrackingTestDataName,
1542 commerce::flag_descriptions::kParcelTrackingTestDataDescription,
1543 flags_ui::kOsIos,
1544 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kParcelTrackingTestData,
1545 kParcelTrackingTestDataVariations,
1546 "ParcelTrackingTestData")},
Justin Wells37e32c4d2023-09-06 22:11:111547 {"autofill-enable-merchant-domain-in-unmask-card-request",
1548 flag_descriptions::kAutofillEnableMerchantDomainInUnmaskCardRequestName,
1549 flag_descriptions::
1550 kAutofillEnableMerchantDomainInUnmaskCardRequestDescription,
1551 flags_ui::kOsIos,
1552 FEATURE_VALUE_TYPE(
1553 autofill::features::kAutofillEnableMerchantDomainInUnmaskCardRequest)},
Verina Armanyousb23d4612023-09-07 20:31:331554 {"autofill-update-chrome-settings-link-to-gpay-web",
1555 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebName,
1556 flag_descriptions::kAutofillUpdateChromeSettingsLinkToGPayWebDescription,
1557 flags_ui::kOsIos,
1558 FEATURE_VALUE_TYPE(
1559 autofill::features::kAutofillUpdateChromeSettingsLinkToGPayWeb)},
Christian Xu90e952f2023-09-13 09:05:281560 {"top-toolbar-theme-color", flag_descriptions::kThemeColorInTopToolbarName,
1561 flag_descriptions::kThemeColorInTopToolbarDescription, flags_ui::kOsIos,
1562 FEATURE_VALUE_TYPE(kThemeColorInTopToolbar)},
Noémie St-Onge2634eb82023-09-19 18:25:591563 {"iph-ios-promo-manager-widget-promo",
1564 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetName,
1565 flag_descriptions::kIPHiOSPromoPasswordManagerWidgetDescription,
1566 flags_ui::kOsIos,
1567 FEATURE_VALUE_TYPE(
1568 feature_engagement::kIPHiOSPromoPasswordManagerWidgetFeature)},
Siyu263cf562023-09-25 20:59:571569 {"autofill-enable-virtual-cards",
1570 flag_descriptions::kAutofillEnableVirtualCardsName,
1571 flag_descriptions::kAutofillEnableVirtualCardsDescription,
1572 flags_ui::kOsIos,
1573 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableVirtualCards)},
Zaina Al-Mashni73a64a82023-09-29 14:33:551574 {"ios-incognito-downloads-warning",
1575 flag_descriptions::kIOSIncognitoDownloadsWarningName,
1576 flag_descriptions::kIOSIncognitoDownloadsWarningDescription,
1577 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSIncognitoDownloadsWarning)},
Christian Xuf211f632023-10-02 19:07:571578 {"omnibox-shortcuts-database-ios",
1579 flag_descriptions::kOmniboxPopulateShortcutsDatabaseName,
1580 flag_descriptions::kOmniboxPopulateShortcutsDatabaseDescription,
Christian Xu47e3fa72023-11-01 19:44:211581 flags_ui::kOsIos,
1582 FEATURE_VALUE_TYPE(omnibox::kOmniboxPopulateShortcutsDatabase)},
adamta80ec3732023-10-11 16:04:021583 {"enable-feed-containment", flag_descriptions::kEnableFeedContainmentName,
1584 flag_descriptions::kEnableFeedContainmentDescription, flags_ui::kOsIos,
1585 FEATURE_VALUE_TYPE(kEnableFeedContainment)},
Vasilii Sukhanov32b14452023-10-12 17:31:271586 {"delete-undecryptable-passwords",
1587 flag_descriptions::kClearUndecryptablePasswordsOnSyncName,
1588 flag_descriptions::kClearUndecryptablePasswordsOnSyncDescription,
1589 flags_ui::kOsIos,
1590 FEATURE_VALUE_TYPE(
1591 password_manager::features::kClearUndecryptablePasswordsOnSync)},
1592 {"ignore-undecryptable-passwords",
1593 flag_descriptions::kSkipUndecryptablePasswordsName,
1594 flag_descriptions::kSkipUndecryptablePasswordsDescription,
1595 flags_ui::kOsIos,
1596 FEATURE_VALUE_TYPE(
1597 password_manager::features::kSkipUndecryptablePasswords)},
Rubin Deliallisi072bc842023-10-19 12:00:411598 {"privacy-guide-ios", flag_descriptions::kPrivacyGuideIosName,
1599 flag_descriptions::kPrivacyGuideIosDescription, flags_ui::kOsIos,
1600 FEATURE_VALUE_TYPE(kPrivacyGuideIos)},
Christian Xubb3374c2023-10-24 10:58:221601 {"bottom-omnibox-device-switcher-results",
1602 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsName,
1603 flag_descriptions::kBottomOmniboxDeviceSwitcherResultsDescription,
1604 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kBottomOmniboxDeviceSwitcherResults)},
Ewann Pelle54e51bd62023-10-24 17:28:121605 {"sync-session-on-visibility-changed",
1606 flag_descriptions::kSyncSessionOnVisibilityChangedName,
1607 flag_descriptions::kSyncSessionOnVisibilityChangedDescription,
1608 flags_ui::kOsIos,
1609 FEATURE_VALUE_TYPE(syncer::kSyncSessionOnVisibilityChanged)},
Quentin Pubertf2d75c32023-10-25 12:17:451610 {"enable-save-to-drive", flag_descriptions::kIOSSaveToDriveName,
1611 flag_descriptions::kIOSSaveToDriveDescription, flags_ui::kOsIos,
1612 FEATURE_VALUE_TYPE(kIOSSaveToDrive)},
Rafał Godlewskie75d12402023-10-25 15:31:531613 {"password-sharing", flag_descriptions::kPasswordSharingName,
1614 flag_descriptions::kPasswordSharingDescription, flags_ui::kOsIos,
1615 MULTI_VALUE_TYPE(kEnablePasswordSharingChoices)},
Jennifer Serranof384360c2023-10-27 00:25:511616 {"omnibox-company-entity-icon-adjustment",
1617 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentName,
1618 flag_descriptions::kOmniboxCompanyEntityIconAdjustmentDescription,
1619 flags_ui::kOsIos,
1620 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kCompanyEntityIconAdjustment,
1621 kOmniboxCompanyEntityAdjustmentVariations,
1622 "OmniboxCompanyEntityAdjustment")},
Gauthier Ambardc6246a102023-10-30 18:29:051623 {"dynamic-theme-color", flag_descriptions::kDynamicThemeColorName,
1624 flag_descriptions::kDynamicThemeColorDescription, flags_ui::kOsIos,
1625 FEATURE_VALUE_TYPE(kDynamicThemeColor)},
1626 {"dynamic-background-color", flag_descriptions::kDynamicBackgroundColorName,
1627 flag_descriptions::kDynamicBackgroundColorDescription, flags_ui::kOsIos,
1628 FEATURE_VALUE_TYPE(kDynamicBackgroundColor)},
Tina Wang83b5a7e82023-11-10 01:29:181629 {"set-up-list-content-notification",
1630 flag_descriptions::kSetUpListContentNotificationName,
1631 flag_descriptions::kSetUpListContentNotificationDescription,
1632 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSetUpListContentNotification)},
Aliona DANGLA5971a8b2023-11-10 11:55:351633 {"fullscreen-improvement", flag_descriptions::kFullscreenImprovementName,
1634 flag_descriptions::kFullscreenImprovementDescription, flags_ui::kOsIos,
1635 FEATURE_VALUE_TYPE(kFullscreenImprovement)},
Aliona DANGLAde4e2d72023-11-13 17:59:471636 {"tab-groups-in-grid", flag_descriptions::kTabGroupsInGridName,
1637 flag_descriptions::kTabGroupsInGridDescription, flags_ui::kOsIos,
1638 FEATURE_VALUE_TYPE(kTabGroupsInGrid)},
Siyu9a925482023-11-14 19:16:131639 {"autofill-enable-payments-mandatory-reauth",
1640 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthName,
1641 flag_descriptions::kAutofillEnablePaymentsMandatoryReauthDescription,
1642 flags_ui::kOsIos,
1643 FEATURE_VALUE_TYPE(
1644 autofill::features::kAutofillEnablePaymentsMandatoryReauth)},
Gauthier Ambard6ca6d5e2023-06-20 09:33:301645};
sdefresne14900ee2015-11-27 14:43:211646
Rohit Raobed794c2020-04-27 15:27:451647bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1648 return false;
1649}
1650
1651flags_ui::FlagsState& GetGlobalFlagsState() {
1652 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1653 nullptr);
1654 return *flags_state;
1655}
David Jean5ca263c2021-08-18 09:19:301656// Creates the experimental test policies map, used by AsyncPolicyLoader and
1657// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341658NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211659 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1660
Guillaume Jenkins25e9bd72020-08-27 17:39:061661 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551662 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061663 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551664
Guillaume Jenkins25e9bd72020-08-27 17:39:061665 // Set some sample policy values for testing if EnableSamplePolicies is set to
1666 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401667 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551668 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011669 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1670
Guillaume Jenkinseeb7007c2020-06-25 22:55:401671 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1672
1673 // 2 = Disable all variations
1674 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1675
1676 // 2 = Do not allow any site to show popups
1677 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1678
Tina Wang5abee802020-07-29 23:09:521679 // Set default search engine.
1680 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1681 @YES,
1682 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1683 @"http://www.google.com/search?q={searchTerms}",
1684 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021685 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521686
Tina Wang89068c82020-10-29 15:51:501687 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1688
Gauthier Ambard21b23702021-04-16 16:11:271689 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1690
Tina Wang59d0b7e2020-08-11 04:41:011691 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531692
1693 // 2 = Enhanced safe browsing protection
1694 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1695
1696 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291697
1698 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551699 }];
1700 }
1701
Ewann227a3c02021-04-19 12:04:541702 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041703 NSString* sync_policy_key =
1704 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301705 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541706 }
Ewann227a3c02021-04-19 12:04:541707
Ewann570a6302021-08-17 07:22:421708 // SyncTypesListDisabled policy.
1709 NSString* Sync_types_list_disabled_key =
1710 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1711 NSMutableArray* Sync_types_list_disabled_values =
1712 [[NSMutableArray alloc] init];
1713 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1714 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1715 }
1716 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1717 [Sync_types_list_disabled_values addObject:@"readingList"];
1718 }
1719 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1720 [Sync_types_list_disabled_values addObject:@"preferences"];
1721 }
1722 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1723 [Sync_types_list_disabled_values addObject:@"passwords"];
1724 }
1725 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1726 [Sync_types_list_disabled_values addObject:@"autofill"];
1727 }
1728 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1729 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1730 }
1731 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1732 [Sync_types_list_disabled_values addObject:@"tabs"];
1733 }
1734 if ([Sync_types_list_disabled_values count]) {
1735 [testing_policies addEntriesFromDictionary:@{
1736 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1737 }];
Ewann570a6302021-08-17 07:22:421738 }
1739
Gauthier Ambard073eaa92021-11-22 15:24:131740 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521741 NSString* incognito_policy_key =
1742 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1743 NSInteger incognito_mode_availability =
1744 [defaults integerForKey:incognito_policy_key];
1745 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521746 [testing_policies addEntriesFromDictionary:@{
1747 incognito_policy_key : @(incognito_mode_availability),
1748 }];
1749 }
1750
Ewann40a8f8a2021-07-29 10:01:201751 NSString* restriction_pattern =
1752 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1753 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291754 NSString* restrict_key =
1755 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201756 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291757 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201758 }];
1759 }
1760
Vincent Boisselle19200bc2021-09-01 17:58:251761 // If the sign-in policy is set (not "None"), add the policy key to the list
1762 // of enabled experimental policies, and set the value.
1763 NSString* const kSigninPolicyKey = @"BrowserSignin";
1764 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1765 if (signin_policy_mode) {
1766 // Remove the mode offset that was used to represent the unset policy.
1767 --signin_policy_mode;
1768 DCHECK(signin_policy_mode >= 0);
1769
Vincent Boisselle19200bc2021-09-01 17:58:251770 [testing_policies addEntriesFromDictionary:@{
1771 kSigninPolicyKey : @(signin_policy_mode),
1772 }];
1773 }
1774
Veronique Nguyen9b1044f2022-01-11 14:41:131775 // If the New Tab Page URL is set (not empty) add the value to the list of
1776 // test policies.
1777 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1778 if ([ntp_location length] > 0) {
1779 NSString* ntp_location_key =
1780 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1781 [testing_policies
1782 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571783 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131784 }
1785
Ali Juma9ec36d22022-03-28 14:53:121786 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1787 NSString* allow_backups_key =
1788 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1789 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1790 [allowed_experimental_policies addObject:allow_backups_key];
1791 }
1792
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241793 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1794 NSString* password_manager_key =
1795 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1796 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1797 [allowed_experimental_policies addObject:password_manager_key];
1798 }
Vincent Boisselle003569a72023-09-11 16:03:121799
1800 if ([defaults boolForKey:@"EnableUserPolicyMerge"]) {
1801 NSString* user_policy_merge_key =
1802 base::SysUTF8ToNSString(policy::key::kCloudUserPolicyMerge);
1803 [testing_policies addEntriesFromDictionary:@{user_policy_merge_key : @YES}];
1804 [allowed_experimental_policies addObject:user_policy_merge_key];
1805 }
1806
Arthur Milchiorbb44f5c82023-03-14 16:14:461807 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1808 NSString* managed_bookmarks_key =
1809 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1810 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571811 @"["
1812 // The following gets filtered out from
1813 // the JSON string when parsed.
1814 " {"
1815 " \"toplevel_name\": \"Managed Bookmarks\""
1816 " },"
1817 " {"
1818 " \"name\": \"Google\","
1819 " \"url\": \"google.com\""
1820 " },"
1821 " {"
1822 " \"name\": \"Empty Folder\","
1823 " \"children\": []"
1824 " },"
1825 " {"
1826 " \"name\": \"Big Folder\","
1827 " \"children\": ["
1828 " {"
1829 " \"name\": \"Youtube\","
1830 " \"url\": \"youtube.com\""
1831 " },"
1832 " {"
1833 " \"name\": \"Chromium\","
1834 " \"url\": \"chromium.org\""
1835 " },"
1836 " {"
1837 " \"name\": \"More Stuff\","
1838 " \"children\": ["
1839 " {"
1840 " \"name\": \"Bugs\","
1841 " \"url\": \"crbug.com\""
1842 " }"
1843 " ]"
1844 " }"
1845 " ]"
1846 " }"
1847 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461848 [testing_policies addEntriesFromDictionary:@{
1849 managed_bookmarks_key : managed_bookmarks_value
1850 }];
1851 [allowed_experimental_policies addObject:managed_bookmarks_key];
1852 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241853
Guillaume Jenkins25e9bd72020-08-27 17:39:061854 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1855 // policy.
1856 if ([allowed_experimental_policies count] > 0) {
1857 [testing_policies setValue:allowed_experimental_policies
1858 forKey:base::SysUTF8ToNSString(
1859 policy::key::kEnableExperimentalPolicies)];
1860 }
1861
jlebel2eb40222022-05-06 11:15:421862 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1863 switch ([defaults integerForKey:metrics_reporting_key]) {
1864 case 1:
1865 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131866 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421867 break;
1868 case 2:
1869 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131870 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421871 break;
1872 default:
1873 // Metrics reporting not managed.
1874 break;
1875 }
1876
David Jean6f85d44f2021-08-19 08:08:451877 // Warning: Add new flags to TestingPoliciesHash() below.
1878
David Jean5ca263c2021-08-18 09:19:301879 return testing_policies;
1880}
David Jean6f85d44f2021-08-19 08:08:451881
David Jean5ca263c2021-08-18 09:19:301882} // namespace
1883
Gauthier Ambard02dbf022022-08-23 08:28:471884// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301885void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1886 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1887
1888 // Set the UA flag if UseMobileSafariUA is enabled.
1889 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1890 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1891 // Chrome puts its product token.
1892 int32_t major = 0;
1893 int32_t minor = 0;
1894 int32_t bugfix = 0;
1895 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1896 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1897
1898 command_line->AppendSwitchASCII(switches::kUserAgent,
1899 web::BuildMobileUserAgent(product));
1900 }
1901
1902 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341903 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301904
1905 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1906 // Management to enabled and add the token to the list of policies.
1907 NSString* token_key =
1908 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1909 NSString* token = [defaults stringForKey:token_key];
1910
1911 if ([token length] > 0) {
1912 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1913 [testing_policies setValue:token forKey:token_key];
1914 }
1915
Guillaume Jenkins57606d72020-08-13 17:32:551916 // If some policies were set, commit them to the app's registration defaults.
1917 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401918 NSDictionary* registration_defaults =
1919 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1920 [defaults registerDefaults:registration_defaults];
1921 }
1922
sdefresne14900ee2015-11-27 14:43:211923 // Freeform commandline flags. These are added last, so that any flags added
1924 // earlier in this function take precedence.
1925 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1926 base::CommandLine::StringVector flags;
1927 // Append an empty "program" argument.
1928 flags.push_back("");
1929
1930 // The number of flags corresponds to the number of text fields in
1931 // Experimental.plist.
1932 const int kNumFreeformFlags = 5;
1933 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1934 NSString* key =
1935 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1936 NSString* flag = [defaults stringForKey:key];
1937 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331938 // iOS keyboard replaces -- with —, so undo that.
1939 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1940 withString:@"--"
1941 options:0
1942 range:NSMakeRange(0, 1)];
1943 // To make things easier, allow flags with no dashes by prepending them
1944 // here. This also allows for flags that just have one dash if they
1945 // exist.
1946 if (![flag hasPrefix:@"-"]) {
1947 flag = [@"--" stringByAppendingString:flag];
1948 }
sdefresne14900ee2015-11-27 14:43:211949 flags.push_back(base::SysNSStringToUTF8(flag));
1950 }
1951 }
1952
1953 base::CommandLine temp_command_line(flags);
1954 command_line->AppendArguments(temp_command_line, false);
1955 }
msardafc76f662017-02-24 12:46:281956
justincohendacc85d2017-06-28 23:34:101957 // Populate command line flag for 3rd party keyboard omnibox workaround.
1958 NSString* enableThirdPartyKeyboardWorkaround =
1959 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1960 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1961 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1962 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1963 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1964 }
1965
Sylvain Defresned3cd8d92022-01-18 13:35:081966 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211967}
1968
sdefresne14900ee2015-11-27 14:43:211969void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1970 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181971 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111972 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531973 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211974}
1975
jkrcalbf073372016-07-29 07:21:311976std::vector<std::string> RegisterAllFeatureVariationParameters(
1977 flags_ui::FlagsStorage* flags_storage,
1978 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181979 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1980 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311981}
1982
sdefresne14900ee2015-11-27 14:43:211983void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1984 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501985 base::Value::List& supported_entries,
1986 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181987 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211988 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511989 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211990}
1991
1992void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1993 const std::string& internal_name,
1994 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181995 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1996 enable);
sdefresne14900ee2015-11-27 14:43:211997}
1998
1999void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:182000 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:212001}
2002
Nicolas MacBeth972e2592023-02-23 15:22:092003bool IsRestartNeededToCommitChanges() {
2004 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
2005}
2006
sdefresne14900ee2015-11-27 14:43:212007namespace testing {
2008
Elly Fong-Jones323ab1092021-08-23 22:36:312009base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
2010 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:532011 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:212012}
2013
2014} // namespace testing