blob: 52329b7507ba69af6e46f545e0eab27bcfaf0e52 [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
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.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"
27#import "components/autofill/ios/browser/autofill_switches.h"
Menghan YANGf3fe2de52023-02-27 16:38:5028#import "components/bookmarks/common/bookmark_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/breadcrumbs/core/features.h"
30#import "components/commerce/core/commerce_feature_list.h"
31#import "components/commerce/core/flag_descriptions.h"
32#import "components/content_settings/core/common/features.h"
33#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5234#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5735#import "components/enterprise/browser/enterprise_switches.h"
36#import "components/feature_engagement/public/feature_constants.h"
37#import "components/feature_engagement/public/feature_list.h"
38#import "components/feed/feed_feature_list.h"
39#import "components/flags_ui/feature_entry.h"
40#import "components/flags_ui/feature_entry_macros.h"
41#import "components/flags_ui/flags_storage.h"
42#import "components/flags_ui/flags_ui_switches.h"
43#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0344#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5745#import "components/ntp_tiles/switches.h"
46#import "components/omnibox/browser/omnibox_field_trial.h"
47#import "components/omnibox/common/omnibox_features.h"
48#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2049#import "components/optimization_guide/core/optimization_guide_switches.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"
55#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2556#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5757#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
58#import "components/signin/core/browser/account_reconcilor.h"
59#import "components/signin/ios/browser/features.h"
60#import "components/signin/public/base/signin_switches.h"
61#import "components/strings/grit/components_strings.h"
62#import "components/sync/base/command_line_switches.h"
63#import "components/sync/base/features.h"
64#import "components/sync/base/pref_names.h"
65#import "components/translate/core/browser/translate_prefs.h"
66#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3467#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard999088c2022-09-13 08:36:5768#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
69#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5470#import "ios/chrome/browser/credential_provider_promo/features.h"
Quentin Pubert154fc6a2023-01-09 15:58:5871#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1772#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5773#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1774#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1375#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5076#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3977#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5778#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2079#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5780#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Ewann Pelle903a05e62023-02-01 17:51:0681#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3082#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3483#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0584#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5785#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2186#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Guillem Perezf131a662023-02-16 02:20:3687#import "ios/chrome/browser/ui/content_suggestions/field_trial_constants.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5088#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2489#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0090#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3591#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1492#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0393#import "ios/chrome/browser/ui/ntp/field_trial_constants.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"
Aliona DANGLAa5257ccc2022-08-29 14:01:4996#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4597#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2698#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1999#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Kurt Horimoto79d590b2018-09-12 19:09:28100#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17102#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57103#import "ios/chrome/browser/web/features.h"
104#import "ios/chrome/grit/ios_strings.h"
105#import "ios/components/security_interstitials/https_only_mode/feature.h"
106#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
107#import "ios/web/common/features.h"
108#import "ios/web/common/user_agent.h"
109#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21110
Sylvain Defresne9c107082020-10-27 16:39:13111#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57112#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13113#endif
114
sdefresne14900ee2015-11-27 14:43:21115#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57116#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22117#endif
stkhapuginc1be1792016-12-13 14:30:53118
119#if !defined(__has_feature) || !__has_feature(objc_arc)
120#error "This file requires ARC support."
121#endif
sdefresne14900ee2015-11-27 14:43:21122
elawrence816f6790e2017-06-16 18:19:28123using flags_ui::FeatureEntry;
124
sdefresne14900ee2015-11-27 14:43:21125namespace {
Emily Starkbafa9062017-12-27 15:22:46126
Olivier Robin3d60411622018-02-23 10:03:22127const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
128 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
129 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
130 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
131 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
132 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
133 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
134 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
135 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
136 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
137};
138
Nohemi Fernandezc00842a2021-07-26 11:47:34139const FeatureEntry::Choice
140 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
141 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
142 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
143 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
144 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
145};
146
Stepan Khapugincc4e9842019-01-23 13:38:13147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
157const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
158 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
159const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
160 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
161
162const FeatureEntry::FeatureVariation
163 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
164 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13174 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53175 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13176 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53177 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13178
Stepan Khapuginbac467e2022-05-06 21:11:54179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
181const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
182 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
183const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
184 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
185
186const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
187 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
188 nullptr},
189 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
190 nullptr},
191 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
192 nullptr},
193};
194
Christian Xucf26d562022-07-06 09:28:36195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
197const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
198 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
199const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
200 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
201
202const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
203 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
204 nullptr},
205 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
206 nullptr},
207 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
208 nullptr},
209};
210
Cheick Cissef37087902022-10-07 19:01:41211const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
212 {kWhatsNewModuleBasedLayoutParam, "true"}};
213
214const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
215 {"Display module layout", kWhatsNewModuleLayout,
216 std::size(kWhatsNewModuleLayout), nullptr},
217};
218
Caitlin Fischer37e01232019-05-24 13:05:45219const FeatureEntry::FeatureParam
220 kAutofillUseMobileLabelDisambiguationShowAll[] = {
221 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
222 autofill::features::
223 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
224const FeatureEntry::FeatureParam
225 kAutofillUseMobileLabelDisambiguationShowOne[] = {
226 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
227 autofill::features::
228 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
229
230const FeatureEntry::FeatureVariation
231 kAutofillUseMobileLabelDisambiguationVariations[] = {
232 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53233 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45234 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53235 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45236
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10237const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59238 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
239 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
240const FeatureEntry::FeatureVariation
241 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
242 {"Remind me later",
243 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53244 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59245 nullptr}};
246
Mohammad Refaatab6bee62022-05-16 16:31:15247const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47248 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
249 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15250const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47251 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
252 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
253
Mohammad Refaatab6bee62022-05-16 16:31:15254const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
255 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
256 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
257 {"Compact", kDiscoverFeedTopSyncPromoCompact,
258 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
259
adamta4a6f2fd22023-02-13 17:37:14260const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
261 {kDisableStickyHeaderForFollowingFeed, "true"}};
262const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
263 {kOverrideFeedHeaderHeight, "43"}};
264const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
265 {kDisableStickyHeaderForFollowingFeed, "true"},
266 {kOverrideFeedHeaderHeight, "43"}};
267
268const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
269 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
270 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
271 {"Reduced header height", kFeedHeaderSettingReducedHeight,
272 std::size(kFeedHeaderSettingReducedHeight), nullptr},
273 {"All improvements", kFeedHeaderSettingAllImprovements,
274 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
275
gogerald53c6e7a2021-04-15 22:07:35276const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08277 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35278 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
279const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08280 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35281 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
282const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08283 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35284 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
285const FeatureEntry::FeatureParam
286 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
287 {kStartSurfaceShrinkLogoParam, "true"},
288 {kStartSurfaceReturnToRecentTabParam, "true"},
289 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
290const FeatureEntry::FeatureParam
291 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
292 {kStartSurfaceHideShortcutsParam, "true"},
293 {kStartSurfaceReturnToRecentTabParam, "true"},
294 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
295const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08296 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35297 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
298const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
299 {kStartSurfaceHideShortcutsParam, "true"},
300 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
301const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08302 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35303 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
304const FeatureEntry::FeatureParam
305 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
306 {kStartSurfaceShrinkLogoParam, "true"},
307 {kStartSurfaceReturnToRecentTabParam, "true"},
308 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
309const FeatureEntry::FeatureParam
310 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
311 {kStartSurfaceHideShortcutsParam, "true"},
312 {kStartSurfaceReturnToRecentTabParam, "true"},
313 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08314
gogerald0e39e3aa2021-02-10 18:41:23315const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35316 {"10s:Show Return to Recent Tab tile",
317 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53318 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35319 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53320 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35321 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53322 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35323 {"10s:Shrink Logo and show Return to Recent Tab tile",
324 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53325 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35326 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
327 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53328 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35329 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53330 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35331 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53332 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35333 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53334 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35335 {"1h:Shrink Logo and show Return to Recent Tab tile",
336 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53337 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35338 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
339 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53340 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08341};
gogerald0e39e3aa2021-02-10 18:41:23342
Chris Lu8e308dc2022-09-06 16:59:40343const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
344 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
345const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57346 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40347 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
348
349const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
350 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
351 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57352 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40353 std::size(kModuleRefreshNoHeaders), nullptr},
354};
355
Ed Chin91e44992022-07-27 13:42:34356#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26357// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01358const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04359 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
360 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01361 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04362 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01363const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04364 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
365 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01366 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04367 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01368const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04369 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
370 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01371 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04372 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01373const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04374 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
375 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01376 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04377 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01378const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04379 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
380 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01381 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
382 {kBackgroundRefreshIntervalInSeconds, "0"}};
383const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04384 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
385 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01386 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
387 {kBackgroundRefreshIntervalInSeconds, "0"}};
388const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
389 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
390 {kEnableRecurringBackgroundRefreshSchedule, "false"},
391 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
392 {kBackgroundRefreshIntervalInSeconds, "0"}};
393const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
394 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
395 {kEnableRecurringBackgroundRefreshSchedule, "true"},
396 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
397 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04398
Ed Chin178ec2a2023-02-10 22:21:26399// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04400const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01401 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
402 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
403 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
404 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
405 {"1hr Interval 1hr Max Age Recurring",
406 kOneHourIntervalOneHourMaxAgeRecurring,
407 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
408 {"4hr Interval 6hr Max Age Recurring",
409 kFourHourIntervalSixHourMaxAgeRecurring,
410 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
411 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
412 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
413 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
414 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
415 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
416 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
417 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
418 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04419};
Ed Chin91e44992022-07-27 13:42:34420#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04421
Ed Chin178ec2a2023-02-10 22:21:26422// Feed Foreground Refresh Feature Params.
423const FeatureEntry::FeatureParam kFeedRefreshPostFeedSessionOnly[] = {
424 {kEnableFeedRefreshPostFeedSession, "true"},
425 {kEnableFeedRefreshOnAppBackgrounding, "false"}};
426const FeatureEntry::FeatureParam kFeedRefreshOnAppBackgroundingOnly[] = {
427 {kEnableFeedRefreshPostFeedSession, "false"},
428 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
429const FeatureEntry::FeatureParam kFeedForegroundRefreshAll[] = {
430 {kEnableFeedRefreshPostFeedSession, "true"},
431 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
432
433// Feed Foreground Refresh Feature Variations.
434const FeatureEntry::FeatureVariation kFeedForegroundRefreshVariations[] = {
435 {"Post Feed session", kFeedRefreshPostFeedSessionOnly,
436 std::size(kFeedRefreshPostFeedSessionOnly), nullptr},
437 {"On app backgrounding", kFeedRefreshOnAppBackgroundingOnly,
438 std::size(kFeedRefreshOnAppBackgroundingOnly), nullptr},
439 {"All foreground refresh methods", kFeedForegroundRefreshAll,
440 std::size(kFeedForegroundRefreshAll), nullptr},
441};
442
Chris Luc9a5cb12022-07-20 16:11:39443const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58444 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39445const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58446 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39447const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
448 {kTrendingQueriesHideShortcutsParam, "false"},
449 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58450};
Chris Luc9a5cb12022-07-20 16:11:39451
452const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
453 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
454 std::size(kTrendingQueriesEnableAllUsers), nullptr},
455 {"Enabled All Users Hide Shortcuts",
456 kTrendingQueriesEnableAllUsersHideShortcuts,
457 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
458 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
459 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39460};
461
Igor Ruvinov44fed9f2022-06-10 22:51:42462const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
463const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
464 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
465 nullptr}};
466
Aliona DANGLA00ae7db2022-10-04 16:58:50467const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58468 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49469const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58470 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49471const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58472 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
473
Aliona DANGLAa5257ccc2022-08-29 14:01:49474const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50475 {"With legacy download", kOpenInDownloadInShareButton,
476 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49477 {"With WKDownload", kOpenInDownloadWithWKDownload,
478 std::size(kOpenInDownloadWithWKDownload), nullptr},
479 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
480 nullptr},
481};
482
Ewann Pelle87019cdf2023-02-17 14:28:16483const FeatureEntry::FeatureParam kEnablePinnedTabsOverflow[] = {
484 {kEnablePinnedTabsOverflowParam, "true"}};
Ewann Pelle3774cac532022-11-15 10:12:37485
486const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
Ewann Pelle87019cdf2023-02-17 14:28:16487 {"+ overflow entry", kEnablePinnedTabsOverflow,
488 std::size(kEnablePinnedTabsOverflow), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37489};
490
ginnnnnnny591a4972022-09-01 16:10:27491const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
492 {autofill::features::kAutofillBrandingIOSParam, "true"}};
493const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
494 {"(Monotone)", kAutofillBrandingIOSMonotone,
495 std::size(kAutofillBrandingIOSMonotone), nullptr}};
496
Scott Yodercb2fe632022-09-12 15:28:35497const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26498 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35499const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
500 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
501 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
502
Benjamin Williamsaa8da8142022-11-14 19:51:03503const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
504 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
505const FeatureEntry::FeatureVariation
506 kIOSPopularSitesImprovedSuggestionsVariations[] = {
507 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
508 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
509
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28510const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
511 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
512const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
513 {"with search result page", kEnableExperienceKitMapsWithSrp,
514 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
515
adamta3811f9182022-10-24 17:49:33516const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
517 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
518 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
519const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
520 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
521 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
522
523const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
524 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
525 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
526 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
527 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
528
Quentin Pubert154fc6a2023-01-09 15:58:58529const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
530 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
531const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
532 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
533 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
534
Louis Romero93e9b50a2023-01-26 01:46:12535const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
536 {kTabInactivityThresholdParameterName,
537 kTabInactivityThresholdOneWeekParam}};
538const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
539 {kTabInactivityThresholdParameterName,
540 kTabInactivityThresholdTwoWeeksParam}};
541const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
542 {kTabInactivityThresholdParameterName,
543 kTabInactivityThresholdThreeWeeksParam}};
544
545const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
546 {"One week", kTabInactivityThresholdOneWeek,
547 std::size(kTabInactivityThresholdOneWeek), nullptr},
548 {"Two weeks", kTabInactivityThresholdTwoWeeks,
549 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
550 {"Three weeks", kTabInactivityThresholdThreeWeeks,
551 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
552};
553
adamta8b1be5c2023-02-24 16:36:10554const FeatureEntry::FeatureParam kTileAblationMVTOnly[] = {
555 {kTileAblationMVTOnlyParam, "true"}};
556const FeatureEntry::FeatureVariation kTileAblationVariations[] = {
557 {"Hide Only Most Visited", kTileAblationMVTOnly,
558 std::size(kTileAblationMVTOnly), nullptr}};
Guillem Perezf131a662023-02-16 02:20:36559
Huiting Yud7d2a5322023-02-09 21:14:22560const FeatureEntry::FeatureParam
561 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
562 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
563const FeatureEntry::FeatureParam
564 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
565 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
566const FeatureEntry::FeatureParam
567 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
568 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
569
570const FeatureEntry::FeatureVariation
571 kCredentialProviderExtensionPromoVariations[] = {
572 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
573 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
574 {"On password copied",
575 kCredentialProviderExtensionPromoOnPasswordCopied,
576 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
577 {"On successful login with autofill",
578 kCredentialProviderExtensionPromoOnLoginWithAutofill,
579 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
580 nullptr},
581};
582
Olivier ROBINfd3887b72023-02-23 14:45:42583const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
584 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
585const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
586 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
587 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr}};
588
Olivier ROBIN2ca64952023-02-23 17:11:48589const FeatureEntry::FeatureParam kAddToHomeScreenDisableIncognito[] = {
590 {kAddToHomeScreenDisableIncognitoParam, "true"}};
591const FeatureEntry::FeatureVariation kAddToHomeScreenVariations[] = {
592 {"Disable on incognito", kAddToHomeScreenDisableIncognito,
593 std::size(kAddToHomeScreenDisableIncognito), nullptr}};
594
Cooper Knaak1e026562017-07-26 05:22:28595// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21596// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28597// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
598// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21599// macro for this type supplying the command line to the macro.
600// . MULTI_VALUE: a list of choices, the first of which should correspond to a
601// deactivated state for this lab (i.e. no command line option). To specify
602// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
603// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28604// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
605// either enabled, disabled, or uses the default value of the associated
606// base::Feature instance. To specify this type of entry use the macro
607// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
608// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
609// base::Feature instance. Choices corresponding to the default state, a
610// universally enabled state, and a universally disabled state are
611// automatically included. To specify this type of entry use the macro
612// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
613// the array of choices.
614//
sdefresne14900ee2015-11-27 14:43:21615// See the documentation of FeatureEntry for details on the fields.
616//
617// When adding a new choice, add it to the end of the list.
618const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28619 {"in-product-help-demo-mode-choice",
620 flag_descriptions::kInProductHelpDemoModeName,
621 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
622 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23623 feature_engagement::kIPHDemoMode,
624 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09625 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22626 {"enable-autofill-credit-card-upload",
627 flag_descriptions::kAutofillCreditCardUploadName,
628 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24629 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23630 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
631 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
632 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51633 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23634 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
635 {"wallet-service-use-sandbox",
636 flag_descriptions::kWalletServiceUseSandboxName,
637 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
638 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
639 autofill::switches::kWalletServiceUseSandbox,
640 "1",
641 autofill::switches::kWalletServiceUseSandbox,
642 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59643 {"show-autofill-type-predictions",
644 flag_descriptions::kShowAutofillTypePredictionsName,
645 flag_descriptions::kShowAutofillTypePredictionsDescription,
646 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50647 FEATURE_VALUE_TYPE(
648 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26649 {"autofill-account-profiles-union-view",
650 flag_descriptions::kAutofillAccountProfilesUnionViewName,
651 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
652 flags_ui::kOsIos,
653 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22654 {"autofill-ios-delay-between-fields",
655 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
656 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
657 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20658 {"fullscreen-promos-manager",
659 flag_descriptions::kFullscreenPromosManagerName,
660 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
661 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05662 {"fullscreen-promos-manager-skip-internal-limits",
663 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
664 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
665 flags_ui::kOsIos,
666 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14667 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53668 flag_descriptions::kFullscreenSmoothScrollingName,
669 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
670 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06671 {"webpage-default-zoom-from-dynamic-type",
672 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
673 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
674 flags_ui::kOsIos,
675 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56676 {"webpage-alternative-text-zoom",
677 flag_descriptions::kWebPageAlternativeTextZoomName,
678 flag_descriptions::kWebPageAlternativeTextZoomDescription,
679 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34680 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
681 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
682 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28683 {"toolbar-container", flag_descriptions::kToolbarContainerName,
684 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
685 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13686 {"omnibox-ui-max-autocomplete-matches",
687 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
688 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
689 flags_ui::kOsIos,
690 FEATURE_WITH_PARAMS_VALUE_TYPE(
691 omnibox::kUIExperimentMaxAutocompleteMatches,
692 kOmniboxUIMaxAutocompleteMatchesVariations,
693 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35694 {"omnibox-local-history-zero-suggest-beyond-ntp",
695 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
696 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
697 flags_ui::kOsIos,
698 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54699 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
700 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
701 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
702 kOmniboxMaxZPSMatchesVariations,
703 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45704
705 {"omnibox-most-visited-tiles-on-srp",
706 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
707 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
708 flags_ui::kOsIos,
709 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30710 {"autofill-use-mobile-label-disambiguation",
711 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
712 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
713 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45714 FEATURE_WITH_PARAMS_VALUE_TYPE(
715 autofill::features::kAutofillUseMobileLabelDisambiguation,
716 kAutofillUseMobileLabelDisambiguationVariations,
717 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46718 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
719 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30720 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48721 {"force-startup-signin-promo",
722 flag_descriptions::kForceStartupSigninPromoName,
723 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29724 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06725 {"identity-status-consistency",
726 flag_descriptions::kIdentityStatusConsistencyName,
727 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
728 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22729 {"restore-session-from-cache",
730 flag_descriptions::kRestoreSessionFromCacheName,
731 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49732 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09733 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
734 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
735 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41736 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
737 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
738 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13739#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45740 {"screen-time-integration-ios",
741 flag_descriptions::kScreenTimeIntegrationName,
742 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
743 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13744#endif
Nazerke3e993f72020-09-21 13:00:06745 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
746 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
747 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55748 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
749 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
750 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14751 {"default-browser-fullscreen-promo-experiment",
752 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
753 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
754 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59755 FEATURE_WITH_PARAMS_VALUE_TYPE(
756 kDefaultBrowserFullscreenPromoExperiment,
757 kDefaultBrowserFullscreenPromoExperimentVariations,
758 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11759 {"ios-shared-highlighting-color-change",
760 flag_descriptions::kIOSSharedHighlightingColorChangeName,
761 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07762 flags_ui::kOsIos,
763 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34764 {"ios-shared-highlighting-v2",
765 flag_descriptions::kIOSSharedHighlightingV2Name,
766 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
767 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45768 {"omnibox-new-textfield-implementation",
769 flag_descriptions::kOmniboxNewImplementationName,
770 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
771 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26772 {"omnibox-on-focus-suggestions-contextual-web",
773 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
774 flag_descriptions::
775 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
776 flags_ui::kOsIos,
777 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
778 {"omnibox-on-focus-suggestions-srp",
779 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
780 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
781 flags_ui::kOsIos,
782 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12783 {"omnibox-report-assisted-query-stats",
784 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
785 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
786 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
787 {"omnibox-report-searchbox-stats",
788 flag_descriptions::kOmniboxReportSearchboxStatsName,
789 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
790 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15791 {"omnibox-fuzzy-url-suggestions",
792 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
793 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
794 flags_ui::kOsIos,
795 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19796 {"start-surface", flag_descriptions::kStartSurfaceName,
797 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23798 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
799 kStartSurfaceVariations,
800 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42801 {"autofill-address-verification-in-save-prompt",
802 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
803 flag_descriptions::
804 kEnableAutofillAddressSavePromptAddressVerificationDescription,
805 flags_ui::kOsIos,
806 FEATURE_VALUE_TYPE(
807 autofill::features::
808 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25809 {"filling-across-affiliated-websites",
810 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
811 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
812 flags_ui::kOsIos,
813 FEATURE_VALUE_TYPE(
814 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19815 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
816 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
817 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34818 {"wait-threshold-seconds-for-capabilities-api",
819 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
820 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
821 flags_ui::kOsIos,
822 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23823 {"autofill-fill-merchant-promo-code-fields",
824 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
825 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
826 flags_ui::kOsIos,
827 FEATURE_VALUE_TYPE(
828 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03829 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
830 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18832 {"new-overflow-menu-alternate-iph",
833 flag_descriptions::kNewOverflowMenuAlternateIPHName,
834 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
835 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24836 {"use-lens-to-search-for-image",
837 flag_descriptions::kUseLensToSearchForImageName,
838 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44839 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22840 {"enable-lens-in-home-screen-widget",
841 flag_descriptions::kEnableLensInHomeScreenWidgetName,
842 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
843 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
844 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
845 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
847 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
848 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
849 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03850 {"enable-lens-context-menu-alt-text",
851 flag_descriptions::kEnableLensContextMenuAltTextName,
852 flag_descriptions::kEnableLensContextMenuAltTextDescription,
853 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44854 {"enable-lens-in-omnibox-copied-image",
855 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
856 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
857 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40858 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23859 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
860 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40861 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23862 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03863 {"enable-disco-feed-endpoint",
864 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
865 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
866 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11867 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15868 {"enable-discover-feed-top-sync-promo",
869 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
870 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
871 flags_ui::kOsIos,
872 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
873 kDiscoverFeedTopSyncPromoVariations,
874 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14875 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
876 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
877 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
878 kFeedHeaderSettingsVariations,
879 "FeedHeaderSettings")},
adamta8b1be5c2023-02-24 16:36:10880 {"enable-tile-ablation", flag_descriptions::kTileAblationName,
881 flag_descriptions::kTileAblationDescription, flags_ui::kOsIos,
882 FEATURE_WITH_PARAMS_VALUE_TYPE(kTileAblation,
883 kTileAblationVariations,
884 "TileAblation")},
Tommy Martino7393d762021-10-12 17:59:28885 {"shared-highlighting-amp",
886 flag_descriptions::kIOSSharedHighlightingAmpName,
887 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
888 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28889 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42890 commerce::flag_descriptions::kCommercePriceTrackingName,
891 commerce::flag_descriptions::kCommercePriceTrackingDescription,
892 flags_ui::kOsIos,
893 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
894 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15895 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06896 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
897 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
898 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54899 {"ntp-view-hierarchy-repair",
900 flag_descriptions::kNTPViewHierarchyRepairName,
901 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20902 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26903 {"synthesized-restore-session",
904 flag_descriptions::kSynthesizedRestoreSessionName,
905 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
906 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18907 {"ios-media-permissions-control",
908 flag_descriptions::kMediaPermissionsControlName,
909 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Ewann8c7aadc2022-05-19 15:41:05911 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
912 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
913 FEATURE_VALUE_TYPE(kUseSFSymbols)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26914 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
915 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
916 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01917 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
918 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
919 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43920 {"enable-tailored-security-integration",
921 flag_descriptions::kTailoredSecurityIntegrationName,
922 flag_descriptions::kTailoredSecurityIntegrationDescription,
923 flags_ui::kOsIos,
924 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26925 {"autofill-enable-card-product-name",
926 flag_descriptions::kAutofillEnableCardProductNameName,
927 flag_descriptions::kAutofillEnableCardProductNameDescription,
928 flags_ui::kOsIos,
929 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00930 {"send-tab-to-self-signin-promo",
931 flag_descriptions::kSendTabToSelfSigninPromoName,
932 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
933 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22934 {"autofill-enforce-delays-in-strike-database",
935 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
936 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
937 flags_ui::kOsIos,
938 FEATURE_VALUE_TYPE(
939 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41940 {"autofill-upstream-allow-additional-email-domains",
941 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
942 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
943 flags_ui::kOsIos,
944 FEATURE_VALUE_TYPE(
945 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
946 {"autofill-upstream-allow-all-email-domains",
947 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
948 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
949 flags_ui::kOsIos,
950 FEATURE_VALUE_TYPE(
951 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52952 {"enable-download-service-foreground-session",
953 flag_descriptions::kDownloadServiceForegroundSessionName,
954 flag_descriptions::kDownloadServiceForegroundSessionDescription,
955 flags_ui::kOsIos,
956 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23957 {"enable-tflite-language-detection",
958 flag_descriptions::kTFLiteLanguageDetectionName,
959 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
960 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20961 {"optimization-guide-debug-logs",
962 flag_descriptions::kOptimizationGuideDebugLogsName,
963 flag_descriptions::kOptimizationGuideDebugLogsDescription,
964 flags_ui::kOsIos,
965 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55966 {"optimization-guide-push-notifications",
967 flag_descriptions::kOptimizationGuidePushNotificationClientName,
968 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
969 flags_ui::kOsIos,
970 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Olivier Robinffe767c2022-04-21 13:13:23971 {"optimization-guide-model-downloading",
972 flag_descriptions::kOptimizationGuideModelDownloadingName,
973 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
974 flags_ui::kOsIos,
975 FEATURE_VALUE_TYPE(
976 optimization_guide::features::kOptimizationGuideModelDownloading)},
977 {"optimization-target-prediction",
978 flag_descriptions::kOptimizationTargetPredictionName,
979 flag_descriptions::kOptimizationTargetPredictionDescription,
980 flags_ui::kOsIos,
981 FEATURE_VALUE_TYPE(
982 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54983 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
984 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
985 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
986 {"sync-standalone-invalidations-wallet-and-offer",
987 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
988 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
989 flags_ui::kOsIos,
990 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01991 {"suggestions-scrolling-ipad",
992 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
993 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
994 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00995 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
996 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
997 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:22998 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
999 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
1000 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251001 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1002 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331003 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551004 {"experience-kit-apple-calendar",
1005 flag_descriptions::kAppleCalendarExperienceKitName,
1006 flag_descriptions::kAppleCalendarExperienceKitDescription,
1007 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:391008 {"enable-expkit-calendar-text-classifier",
1009 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1010 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1011 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:081012 {"enable-expkit-text-classifier",
1013 flag_descriptions::kEnableExpKitTextClassifierName,
1014 flag_descriptions::kEnableExpKitTextClassifierDescription,
1015 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181016 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1017 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281018 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1019 kEnableExperienceKitMapsVariations,
1020 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051021 {"enable-long-press-surrounding-text",
1022 flag_descriptions::kLongPressSurroundingTextName,
1023 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1024 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331025 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1026 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1027 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011028 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1029 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1030 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251031 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1032 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221034 {"smart-sorting-new-overflow-menu",
1035 flag_descriptions::kSmartSortingNewOverflowMenuName,
1036 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1037 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251038 {"smart-sorting-price-tracking-destination",
1039 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1040 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1041 flags_ui::kOsIos,
1042 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441043 {"new-overflow-menu-share-chrome-action",
1044 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1045 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1046 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301047 {"autofill-enable-ranking-formula-address-profiles",
1048 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1049 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1050 flags_ui::kOsIos,
1051 FEATURE_VALUE_TYPE(
1052 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391053 {"autofill-enable-ranking-formula-credit-cards",
1054 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1055 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1056 flags_ui::kOsIos,
1057 FEATURE_VALUE_TYPE(
1058 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021059 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1060 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1061 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021062 {"enable-feed-bottom-sign-in-promo",
1063 flag_descriptions::kEnableFeedBottomSignInPromoName,
1064 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1065 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1066 {"enable-feed-card-menu-sign-in-promo",
1067 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1068 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1069 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271070 {"content-suggestions-ui-module-refresh",
1071 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1072 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401073 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581074 FEATURE_WITH_PARAMS_VALUE_TYPE(
1075 kContentSuggestionsUIModuleRefresh,
1076 kModuleRefreshVariations,
1077 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Olivier Robin058c1fad2022-05-31 18:24:061078 {"default-browser-intents-show-settings",
1079 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1080 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1081 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451082 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1083 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421084 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1085 kDmTokenDeletionVariation,
1086 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191087 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1088 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291090 {"ios-password-manager-cross-origin-iframe-support",
1091 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1092 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1093 flags_ui::kOsIos,
1094 FEATURE_VALUE_TYPE(password_manager::features::
1095 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031096 {"ios-popular-sites-improved-suggestions",
1097 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1098 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1099 flags_ui::kOsIos,
1100 FEATURE_WITH_PARAMS_VALUE_TYPE(
1101 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1102 kIOSPopularSitesImprovedSuggestionsVariations,
1103 field_trial_constants::
1104 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141105 {"omnibox-adaptive-suggestions-count",
1106 flag_descriptions::kAdaptiveSuggestionsCountName,
1107 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1108 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201109 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1110 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581111 FEATURE_WITH_PARAMS_VALUE_TYPE(
1112 kTrendingQueriesModule,
1113 kTrendingQueriesModuleVariations,
1114 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321115 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191116 flag_descriptions::kAutofillParseIBANFieldsName,
1117 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1118 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361119 {"autofill-enable-new-card-unmask-prompt-view",
1120 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1121 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1122 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271123 FEATURE_VALUE_TYPE(
1124 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241125 {"omnibox-zero-suggest-prefetching",
1126 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1127 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1128 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451129 {"omnibox-zero-suggest-prefetching-on-srp",
1130 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1131 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1132 flags_ui::kOsIos,
1133 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1134 {"omnibox-zero-suggest-prefetching-on-web",
1135 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1136 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1137 flags_ui::kOsIos,
1138 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471139 {"omnibox-zero-suggest-in-memory-caching",
1140 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1141 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1142 flags_ui::kOsIos,
1143 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351144 {"omnibox-on-device-tail-suggestions",
1145 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1146 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1147 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391148 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1149 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501150 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491151 {"enable-sync-history-datatype",
1152 flag_descriptions::kSyncEnableHistoryDataTypeName,
1153 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1154 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361155 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1156 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1157 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1158 kOmniboxMaxURLMatchesVariations,
1159 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061160 {"metrickit-non-crash-reports",
1161 flag_descriptions::kMetrickitNonCrashReportName,
1162 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1163 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371164 {"autofill-enable-remade-downstream-metrics",
1165 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1166 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1167 flags_ui::kOsIos,
1168 FEATURE_VALUE_TYPE(
1169 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551170 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1171 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1172 flag_descriptions::
1173 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1174 flags_ui::kOsIos,
1175 FEATURE_VALUE_TYPE(
1176 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341177#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1178 {"feed-background-refresh-ios",
1179 flag_descriptions::kFeedBackgroundRefreshName,
1180 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1181 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1182 kFeedBackgroundRefreshVariations,
1183 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261184#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1185 {"feed-foreground-refresh-ios",
1186 flag_descriptions::kFeedForegroundRefreshName,
1187 flag_descriptions::kFeedForegroundRefreshDescription, flags_ui::kOsIos,
1188 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedForegroundRefresh,
1189 kFeedForegroundRefreshVariations,
1190 "FeedForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191191 {"omnibox-keyboard-paste-button",
1192 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1193 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1194 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261195
Aliona DANGLAa5257ccc2022-08-29 14:01:491196 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1197 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1198 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1199 kOpenInDownloadVariations,
1200 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171201 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1202 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411203 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1204 kWhatsNewLayoutVariations,
1205 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271206 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1207 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1208 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1209 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051210 "AutofillBrandingIOS")},
1211 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1212 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1213 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351214 {"ios-new-post-restore-experience",
1215 flag_descriptions::kIOSNewPostRestoreExperienceName,
1216 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1217 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261218 FEATURE_WITH_PARAMS_VALUE_TYPE(
1219 post_restore_signin::features::kIOSNewPostRestoreExperience,
1220 kIOSNewPostRestoreExperienceVariations,
1221 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021222 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1223 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1224 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501225 {"enable-tflite-language-detection-ignore",
1226 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1227 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1228 flags_ui::kOsIos,
1229 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141230 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1231 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1232 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471233 {"enable-check-visibility-on-attention-log-start",
1234 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1235 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1236 flags_ui::kOsIos,
1237 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1238 {"enable-refine-data-source-reload-reporting",
1239 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1240 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1241 flags_ui::kOsIos,
1242 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041243 {"enable-passwords-account-storage",
1244 flag_descriptions::kEnablePasswordsAccountStorageName,
1245 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1246 flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(
1248 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331249 {"enable-default-following-feed-sort-type",
1250 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1251 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1252 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201253 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331254 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201255 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131256 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1257 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1258 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201259 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011260 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1261 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371262 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1263 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1264 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1265 kEnablePinnedTabsVariations,
1266 "EnablePinnedTabs")},
Ewann Pelledb88a5462023-02-17 14:34:591267 {"enable-pinned-tabs-ipad", flag_descriptions::kEnablePinnedTabsIpadName,
1268 flag_descriptions::kEnablePinnedTabsIpadDescription, flags_ui::kOsIos,
1269 FEATURE_VALUE_TYPE(kEnablePinnedTabsIpad)},
Justin Cohen726a70bc42022-11-15 23:15:031270 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1271 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1272 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411273 {"credential-provider-extension-promo",
1274 flag_descriptions::kCredentialProviderExtensionPromoName,
1275 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221276 flags_ui::kOsIos,
1277 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1278 kCredentialProviderExtensionPromoVariations,
1279 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521280 {"default-browser-blue-dot-promo",
1281 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1282 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1283 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271284 {"ios-force-translate-enabled",
1285 flag_descriptions::kIOSForceTranslateEnabledName,
1286 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1287 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251288 {"iph-price-notifications-while-browsing",
1289 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1290 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1291 flags_ui::kOsIos,
1292 FEATURE_VALUE_TYPE(
1293 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411294 {"autofill-offer-to-save-card-with-same-last-four",
1295 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1296 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1297 flags_ui::kOsIos,
1298 FEATURE_VALUE_TYPE(
1299 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041300 {"omnibox-multiline-search-suggest",
1301 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1302 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1303 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501304 {"autofill-suggest-server-card-instead-of-local-card",
1305 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1306 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1307 flags_ui::kOsIos,
1308 FEATURE_VALUE_TYPE(
1309 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581310 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1311 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1312 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1313 kNativeFindInPageVariations,
1314 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551315 {"intents-on-email", flag_descriptions::kEmailName,
1316 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331317 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341318 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1319 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1320 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351321 {"multiline-fade-truncating-label",
1322 flag_descriptions::kMultilineFadeTruncatingLabelName,
1323 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1324 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301325 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1326 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1327 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391328 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1329 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1330 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Louis Romero93e9b50a2023-01-26 01:46:121331 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1332 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1333 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1334 kTabInactivityThresholdVariations,
1335 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411336 {"enable-feed-image-caching",
1337 flag_descriptions::kEnableFeedImageCachingName,
1338 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1339 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1340 {"enable-feed-synthetic-capabilities",
1341 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1342 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1343 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561344 {"ios-show-password-storage-in-save-infobar",
1345 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1346 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(
1349 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Louis Romero58f355022023-02-13 19:04:311350 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1351 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1352 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421353 {"ios-edit-menu-partial-translate",
1354 flag_descriptions::kIOSEditMenuPartialTranslateName,
1355 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421356 flags_ui::kOsIos,
1357 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1358 kIOSEditMenuPartialTranslateVariations,
1359 "IOSEditMenuPartialTranslate")},
Olivier Robin7057bd72023-02-16 18:35:201360 {"ios-custom-browser-edit-menu",
1361 flag_descriptions::kIOSCustomBrowserEditMenuName,
1362 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1363 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Ali Juma57849c42023-02-21 22:53:431364 {"notification-settings-menu-item",
1365 flag_descriptions::kNotificationSettingsMenuItemName,
1366 flag_descriptions::kNotificationSettingsMenuItemDescription,
1367 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
rgodba72acf82023-02-20 10:29:351368 {"password-notes", flag_descriptions::kPasswordNotesWithBackupName,
1369 flag_descriptions::kPasswordNotesWithBackupDescription, flags_ui::kOsIos,
1370 FEATURE_VALUE_TYPE(syncer::kPasswordNotesWithBackup)},
Ed Chin97560fc42023-02-20 16:48:321371 {"feed-experiment-tagging-ios",
1372 flag_descriptions::kFeedExperimentTaggingName,
1373 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1374 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061375 {"spotlight-reading-list-source",
1376 flag_descriptions::kSpotlightReadingListSourceName,
1377 flag_descriptions::kSpotlightReadingListSourceDescription,
1378 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
kalettuced6ba72cb2023-02-22 00:55:381379 {"consistency-new-account-interface",
1380 flag_descriptions::kConsistencyNewAccountInterfaceName,
1381 flag_descriptions::kConsistencyNewAccountInterfaceDescription,
1382 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kConsistencyNewAccountInterface)},
Olivier ROBINabcb8ce2023-02-22 13:55:201383 {"add-to-home-screen", flag_descriptions::kAddToHomeScreenName,
1384 flag_descriptions::kAddToHomeScreenDescription, flags_ui::kOsIos,
Olivier ROBIN2ca64952023-02-23 17:11:481385 FEATURE_WITH_PARAMS_VALUE_TYPE(kAddToHomeScreen,
1386 kAddToHomeScreenVariations,
1387 "IOSEditMenuPartialTranslate")},
Salma Elmahallawy72c5d34d2023-02-27 23:44:421388 {"policy-logs-page-ios", flag_descriptions::kPolicyLogsPageIOSName,
1389 flag_descriptions::kPolicyLogsPageIOSDescription, flags_ui::kOsIos,
1390 FEATURE_VALUE_TYPE(policy::features::kPolicyLogsPageIOS)},
Vincent Boisselle6e9780c2023-02-25 01:05:341391 {"indicate-account-storage-error-in-account-cell",
1392 flag_descriptions::kIndicateAccountStorageErrorInAccountCellName,
1393 flag_descriptions::kIndicateAccountStorageErrorInAccountCellDescription,
1394 flags_ui::kOsIos,
1395 FEATURE_VALUE_TYPE(kIndicateAccountStorageErrorInAccountCell)},
Menghan YANGf3fe2de52023-02-27 16:38:501396 {"enable-bookmarks-account-storage",
1397 flag_descriptions::kEnableBookmarksAccountStorageName,
1398 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1399 flags_ui::kOsIos,
1400 FEATURE_VALUE_TYPE(bookmarks::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531401 {"web-feed-feedback-reroute",
1402 flag_descriptions::kWebFeedFeedbackRerouteName,
1403 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1404 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551405 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1406 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1407 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
Louis Romero93e9b50a2023-01-26 01:46:121408};
sdefresne14900ee2015-11-27 14:43:211409
Rohit Raobed794c2020-04-27 15:27:451410bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1411 return false;
1412}
1413
1414flags_ui::FlagsState& GetGlobalFlagsState() {
1415 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1416 nullptr);
1417 return *flags_state;
1418}
David Jean5ca263c2021-08-18 09:19:301419// Creates the experimental test policies map, used by AsyncPolicyLoader and
1420// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341421NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211422 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1423
Guillaume Jenkins25e9bd72020-08-27 17:39:061424 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551425 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061426 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551427
Guillaume Jenkins25e9bd72020-08-27 17:39:061428 // Set some sample policy values for testing if EnableSamplePolicies is set to
1429 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401430 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551431 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011432 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1433
Guillaume Jenkinseeb7007c2020-06-25 22:55:401434 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1435
1436 // 2 = Disable all variations
1437 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1438
1439 // 2 = Do not allow any site to show popups
1440 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1441
Tina Wang5abee802020-07-29 23:09:521442 // Set default search engine.
1443 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1444 @YES,
1445 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1446 @"http://www.google.com/search?q={searchTerms}",
1447 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021448 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521449
Tina Wang89068c82020-10-29 15:51:501450 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1451
Gauthier Ambard21b23702021-04-16 16:11:271452 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1453
Tina Wang59d0b7e2020-08-11 04:41:011454 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531455
1456 // 2 = Enhanced safe browsing protection
1457 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1458
1459 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291460
1461 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551462 }];
1463 }
1464
Ewann227a3c02021-04-19 12:04:541465 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041466 NSString* sync_policy_key =
1467 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301468 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541469 }
Ewann227a3c02021-04-19 12:04:541470
Ewann570a6302021-08-17 07:22:421471 // SyncTypesListDisabled policy.
1472 NSString* Sync_types_list_disabled_key =
1473 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1474 NSMutableArray* Sync_types_list_disabled_values =
1475 [[NSMutableArray alloc] init];
1476 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1477 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1478 }
1479 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1480 [Sync_types_list_disabled_values addObject:@"readingList"];
1481 }
1482 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1483 [Sync_types_list_disabled_values addObject:@"preferences"];
1484 }
1485 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1486 [Sync_types_list_disabled_values addObject:@"passwords"];
1487 }
1488 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1489 [Sync_types_list_disabled_values addObject:@"autofill"];
1490 }
1491 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1492 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1493 }
1494 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1495 [Sync_types_list_disabled_values addObject:@"tabs"];
1496 }
1497 if ([Sync_types_list_disabled_values count]) {
1498 [testing_policies addEntriesFromDictionary:@{
1499 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1500 }];
Ewann570a6302021-08-17 07:22:421501 }
1502
Gauthier Ambard073eaa92021-11-22 15:24:131503 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521504 NSString* incognito_policy_key =
1505 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1506 NSInteger incognito_mode_availability =
1507 [defaults integerForKey:incognito_policy_key];
1508 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521509 [testing_policies addEntriesFromDictionary:@{
1510 incognito_policy_key : @(incognito_mode_availability),
1511 }];
1512 }
1513
Ewann40a8f8a2021-07-29 10:01:201514 NSString* restriction_pattern =
1515 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1516 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291517 NSString* restrict_key =
1518 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201519 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291520 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201521 }];
1522 }
1523
Vincent Boisselle19200bc2021-09-01 17:58:251524 // If the sign-in policy is set (not "None"), add the policy key to the list
1525 // of enabled experimental policies, and set the value.
1526 NSString* const kSigninPolicyKey = @"BrowserSignin";
1527 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1528 if (signin_policy_mode) {
1529 // Remove the mode offset that was used to represent the unset policy.
1530 --signin_policy_mode;
1531 DCHECK(signin_policy_mode >= 0);
1532
Vincent Boisselle19200bc2021-09-01 17:58:251533 [testing_policies addEntriesFromDictionary:@{
1534 kSigninPolicyKey : @(signin_policy_mode),
1535 }];
1536 }
1537
Veronique Nguyen9b1044f2022-01-11 14:41:131538 // If the New Tab Page URL is set (not empty) add the value to the list of
1539 // test policies.
1540 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1541 if ([ntp_location length] > 0) {
1542 NSString* ntp_location_key =
1543 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1544 [testing_policies
1545 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571546 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131547 }
1548
Ali Juma9ec36d22022-03-28 14:53:121549 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1550 NSString* allow_backups_key =
1551 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1552 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1553 [allowed_experimental_policies addObject:allow_backups_key];
1554 }
1555
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241556 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1557 NSString* password_manager_key =
1558 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1559 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1560 [allowed_experimental_policies addObject:password_manager_key];
1561 }
1562
Guillaume Jenkins25e9bd72020-08-27 17:39:061563 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1564 // policy.
1565 if ([allowed_experimental_policies count] > 0) {
1566 [testing_policies setValue:allowed_experimental_policies
1567 forKey:base::SysUTF8ToNSString(
1568 policy::key::kEnableExperimentalPolicies)];
1569 }
1570
jlebel2eb40222022-05-06 11:15:421571 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1572 switch ([defaults integerForKey:metrics_reporting_key]) {
1573 case 1:
1574 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131575 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421576 break;
1577 case 2:
1578 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131579 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421580 break;
1581 default:
1582 // Metrics reporting not managed.
1583 break;
1584 }
1585
David Jean6f85d44f2021-08-19 08:08:451586 // Warning: Add new flags to TestingPoliciesHash() below.
1587
David Jean5ca263c2021-08-18 09:19:301588 return testing_policies;
1589}
David Jean6f85d44f2021-08-19 08:08:451590
David Jean5ca263c2021-08-18 09:19:301591} // namespace
1592
Gauthier Ambard02dbf022022-08-23 08:28:471593// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301594void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1595 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1596
1597 // Set the UA flag if UseMobileSafariUA is enabled.
1598 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1599 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1600 // Chrome puts its product token.
1601 int32_t major = 0;
1602 int32_t minor = 0;
1603 int32_t bugfix = 0;
1604 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1605 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1606
1607 command_line->AppendSwitchASCII(switches::kUserAgent,
1608 web::BuildMobileUserAgent(product));
1609 }
1610
1611 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341612 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301613
1614 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1615 // Management to enabled and add the token to the list of policies.
1616 NSString* token_key =
1617 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1618 NSString* token = [defaults stringForKey:token_key];
1619
1620 if ([token length] > 0) {
1621 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1622 [testing_policies setValue:token forKey:token_key];
1623 }
1624
Guillaume Jenkins57606d72020-08-13 17:32:551625 // If some policies were set, commit them to the app's registration defaults.
1626 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401627 NSDictionary* registration_defaults =
1628 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1629 [defaults registerDefaults:registration_defaults];
1630 }
1631
sdefresne14900ee2015-11-27 14:43:211632 // Freeform commandline flags. These are added last, so that any flags added
1633 // earlier in this function take precedence.
1634 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1635 base::CommandLine::StringVector flags;
1636 // Append an empty "program" argument.
1637 flags.push_back("");
1638
1639 // The number of flags corresponds to the number of text fields in
1640 // Experimental.plist.
1641 const int kNumFreeformFlags = 5;
1642 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1643 NSString* key =
1644 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1645 NSString* flag = [defaults stringForKey:key];
1646 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331647 // iOS keyboard replaces -- with —, so undo that.
1648 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1649 withString:@"--"
1650 options:0
1651 range:NSMakeRange(0, 1)];
1652 // To make things easier, allow flags with no dashes by prepending them
1653 // here. This also allows for flags that just have one dash if they
1654 // exist.
1655 if (![flag hasPrefix:@"-"]) {
1656 flag = [@"--" stringByAppendingString:flag];
1657 }
sdefresne14900ee2015-11-27 14:43:211658 flags.push_back(base::SysNSStringToUTF8(flag));
1659 }
1660 }
1661
1662 base::CommandLine temp_command_line(flags);
1663 command_line->AppendArguments(temp_command_line, false);
1664 }
msardafc76f662017-02-24 12:46:281665
justincohendacc85d2017-06-28 23:34:101666 // Populate command line flag for 3rd party keyboard omnibox workaround.
1667 NSString* enableThirdPartyKeyboardWorkaround =
1668 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1669 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1670 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1671 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1672 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1673 }
1674
Sylvain Defresned3cd8d92022-01-18 13:35:081675 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211676}
1677
sdefresne14900ee2015-11-27 14:43:211678void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1679 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181680 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111681 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531682 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211683}
1684
jkrcalbf073372016-07-29 07:21:311685std::vector<std::string> RegisterAllFeatureVariationParameters(
1686 flags_ui::FlagsStorage* flags_storage,
1687 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181688 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1689 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311690}
1691
sdefresne14900ee2015-11-27 14:43:211692void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1693 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501694 base::Value::List& supported_entries,
1695 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181696 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211697 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511698 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211699}
1700
1701void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1702 const std::string& internal_name,
1703 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181704 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1705 enable);
sdefresne14900ee2015-11-27 14:43:211706}
1707
1708void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181709 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211710}
1711
Nicolas MacBeth972e2592023-02-23 15:22:091712bool IsRestartNeededToCommitChanges() {
1713 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1714}
1715
sdefresne14900ee2015-11-27 14:43:211716namespace testing {
1717
Elly Fong-Jones323ab1092021-08-23 22:36:311718base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1719 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531720 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211721}
1722
1723} // namespace testing