blob: 74ca31888dc63f9b580593dfb944670343f4d492 [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"
28#import "components/breadcrumbs/core/features.h"
29#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
35#import "components/feature_engagement/public/feature_constants.h"
36#import "components/feature_engagement/public/feature_list.h"
37#import "components/feed/feed_feature_list.h"
38#import "components/flags_ui/feature_entry.h"
39#import "components/flags_ui/feature_entry_macros.h"
40#import "components/flags_ui/flags_storage.h"
41#import "components/flags_ui/flags_ui_switches.h"
42#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0343#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/ntp_tiles/switches.h"
45#import "components/omnibox/browser/omnibox_field_trial.h"
46#import "components/omnibox/common/omnibox_features.h"
47#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2048#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5749#import "components/password_manager/core/common/password_manager_features.h"
50#import "components/payments/core/features.h"
51#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4052#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5753#import "components/policy/policy_constants.h"
54#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2555#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
57#import "components/signin/core/browser/account_reconcilor.h"
58#import "components/signin/ios/browser/features.h"
59#import "components/signin/public/base/signin_switches.h"
60#import "components/strings/grit/components_strings.h"
61#import "components/sync/base/command_line_switches.h"
62#import "components/sync/base/features.h"
63#import "components/sync/base/pref_names.h"
64#import "components/translate/core/browser/translate_prefs.h"
65#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3466#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
68#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5469#import "ios/chrome/browser/credential_provider_promo/features.h"
Quentin Pubert154fc6a2023-01-09 15:58:5870#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1771#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5772#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1773#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1374#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5075#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3976#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2078#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Ewann Pelle903a05e62023-02-01 17:51:0680#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3081#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3482#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0583#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5784#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2185#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Guillem Perezf131a662023-02-16 02:20:3686#import "ios/chrome/browser/ui/content_suggestions/field_trial_constants.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5087#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2488#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0089#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3590#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1491#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0392#import "ios/chrome/browser/ui/ntp/field_trial_constants.h"
adamta273568472020-12-04 23:53:5793#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0194#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4995#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4596#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2697#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1998#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2899#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:57100#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17101#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57102#import "ios/chrome/browser/web/features.h"
103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57111#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
118#if !defined(__has_feature) || !__has_feature(objc_arc)
119#error "This file requires ARC support."
120#endif
sdefresne14900ee2015-11-27 14:43:21121
elawrence816f6790e2017-06-16 18:19:28122using flags_ui::FeatureEntry;
123
sdefresne14900ee2015-11-27 14:43:21124namespace {
Emily Starkbafa9062017-12-27 15:22:46125
Olivier Robin3d60411622018-02-23 10:03:22126const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
129 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
130 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
131 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
132 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
133 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
134 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
135 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
136};
137
Nohemi Fernandezc00842a2021-07-26 11:47:34138const FeatureEntry::Choice
139 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
140 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
141 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
142 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
143 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
144};
145
Stepan Khapugincc4e9842019-01-23 13:38:13146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
160
161const FeatureEntry::FeatureVariation
162 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
163 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13177
Stepan Khapuginbac467e2022-05-06 21:11:54178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
184
185const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
186 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
187 nullptr},
188 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
189 nullptr},
190 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
191 nullptr},
192};
193
Christian Xucf26d562022-07-06 09:28:36194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
200
201const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
202 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
203 nullptr},
204 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
205 nullptr},
206 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
207 nullptr},
208};
209
Cheick Cissef37087902022-10-07 19:01:41210const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
211 {kWhatsNewModuleBasedLayoutParam, "true"}};
212
213const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
214 {"Display module layout", kWhatsNewModuleLayout,
215 std::size(kWhatsNewModuleLayout), nullptr},
216};
217
Caitlin Fischer37e01232019-05-24 13:05:45218const FeatureEntry::FeatureParam
219 kAutofillUseMobileLabelDisambiguationShowAll[] = {
220 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
221 autofill::features::
222 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
223const FeatureEntry::FeatureParam
224 kAutofillUseMobileLabelDisambiguationShowOne[] = {
225 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
226 autofill::features::
227 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
228
229const FeatureEntry::FeatureVariation
230 kAutofillUseMobileLabelDisambiguationVariations[] = {
231 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53232 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45233 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53234 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45235
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10236const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59237 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
238 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
239const FeatureEntry::FeatureVariation
240 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
241 {"Remind me later",
242 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53243 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59244 nullptr}};
245
Mohammad Refaatab6bee62022-05-16 16:31:15246const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47247 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
248 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15249const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47250 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
251 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
252
Mohammad Refaatab6bee62022-05-16 16:31:15253const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
254 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
255 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
256 {"Compact", kDiscoverFeedTopSyncPromoCompact,
257 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
258
adamta4a6f2fd22023-02-13 17:37:14259const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
260 {kDisableStickyHeaderForFollowingFeed, "true"}};
261const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
262 {kOverrideFeedHeaderHeight, "43"}};
263const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
264 {kDisableStickyHeaderForFollowingFeed, "true"},
265 {kOverrideFeedHeaderHeight, "43"}};
266
267const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
268 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
269 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
270 {"Reduced header height", kFeedHeaderSettingReducedHeight,
271 std::size(kFeedHeaderSettingReducedHeight), nullptr},
272 {"All improvements", kFeedHeaderSettingAllImprovements,
273 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
274
gogerald53c6e7a2021-04-15 22:07:35275const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08276 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35277 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
278const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08279 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35280 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
281const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08282 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35283 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
284const FeatureEntry::FeatureParam
285 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
286 {kStartSurfaceShrinkLogoParam, "true"},
287 {kStartSurfaceReturnToRecentTabParam, "true"},
288 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
289const FeatureEntry::FeatureParam
290 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
291 {kStartSurfaceHideShortcutsParam, "true"},
292 {kStartSurfaceReturnToRecentTabParam, "true"},
293 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
294const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08295 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35296 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
297const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
298 {kStartSurfaceHideShortcutsParam, "true"},
299 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
300const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08301 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35302 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
303const FeatureEntry::FeatureParam
304 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
305 {kStartSurfaceShrinkLogoParam, "true"},
306 {kStartSurfaceReturnToRecentTabParam, "true"},
307 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
308const FeatureEntry::FeatureParam
309 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
310 {kStartSurfaceHideShortcutsParam, "true"},
311 {kStartSurfaceReturnToRecentTabParam, "true"},
312 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08313
gogerald0e39e3aa2021-02-10 18:41:23314const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35315 {"10s:Show Return to Recent Tab tile",
316 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53317 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35318 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53319 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35320 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53321 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35322 {"10s:Shrink Logo and show Return to Recent Tab tile",
323 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53324 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35325 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
326 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53327 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35328 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53329 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35330 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53331 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35332 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53333 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35334 {"1h:Shrink Logo and show Return to Recent Tab tile",
335 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53336 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35337 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
338 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53339 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08340};
gogerald0e39e3aa2021-02-10 18:41:23341
Chris Lu8e308dc2022-09-06 16:59:40342const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
343 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
344const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57345 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40346 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
347
348const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
349 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
350 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57351 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40352 std::size(kModuleRefreshNoHeaders), nullptr},
353};
354
Ed Chin91e44992022-07-27 13:42:34355#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26356// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01357const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04358 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
359 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01360 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04361 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01362const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04363 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
364 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01365 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04366 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01367const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04368 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
369 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01370 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04371 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01372const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04373 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
374 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01375 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04376 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01377const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04378 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
379 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01380 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
381 {kBackgroundRefreshIntervalInSeconds, "0"}};
382const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04383 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
384 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01385 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
386 {kBackgroundRefreshIntervalInSeconds, "0"}};
387const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
388 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
389 {kEnableRecurringBackgroundRefreshSchedule, "false"},
390 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
391 {kBackgroundRefreshIntervalInSeconds, "0"}};
392const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
393 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
394 {kEnableRecurringBackgroundRefreshSchedule, "true"},
395 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
396 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04397
Ed Chin178ec2a2023-02-10 22:21:26398// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04399const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01400 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
401 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
402 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
403 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
404 {"1hr Interval 1hr Max Age Recurring",
405 kOneHourIntervalOneHourMaxAgeRecurring,
406 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
407 {"4hr Interval 6hr Max Age Recurring",
408 kFourHourIntervalSixHourMaxAgeRecurring,
409 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
410 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
411 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
412 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
413 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
414 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
415 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
416 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
417 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04418};
Ed Chin91e44992022-07-27 13:42:34419#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04420
Ed Chin178ec2a2023-02-10 22:21:26421// Feed Foreground Refresh Feature Params.
422const FeatureEntry::FeatureParam kFeedRefreshPostFeedSessionOnly[] = {
423 {kEnableFeedRefreshPostFeedSession, "true"},
424 {kEnableFeedRefreshOnAppBackgrounding, "false"}};
425const FeatureEntry::FeatureParam kFeedRefreshOnAppBackgroundingOnly[] = {
426 {kEnableFeedRefreshPostFeedSession, "false"},
427 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
428const FeatureEntry::FeatureParam kFeedForegroundRefreshAll[] = {
429 {kEnableFeedRefreshPostFeedSession, "true"},
430 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
431
432// Feed Foreground Refresh Feature Variations.
433const FeatureEntry::FeatureVariation kFeedForegroundRefreshVariations[] = {
434 {"Post Feed session", kFeedRefreshPostFeedSessionOnly,
435 std::size(kFeedRefreshPostFeedSessionOnly), nullptr},
436 {"On app backgrounding", kFeedRefreshOnAppBackgroundingOnly,
437 std::size(kFeedRefreshOnAppBackgroundingOnly), nullptr},
438 {"All foreground refresh methods", kFeedForegroundRefreshAll,
439 std::size(kFeedForegroundRefreshAll), nullptr},
440};
441
Chris Luc9a5cb12022-07-20 16:11:39442const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58443 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39444const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58445 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39446const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
447 {kTrendingQueriesHideShortcutsParam, "false"},
448 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58449};
Chris Luc9a5cb12022-07-20 16:11:39450
451const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
452 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
453 std::size(kTrendingQueriesEnableAllUsers), nullptr},
454 {"Enabled All Users Hide Shortcuts",
455 kTrendingQueriesEnableAllUsersHideShortcuts,
456 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
457 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
458 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39459};
460
Igor Ruvinov44fed9f2022-06-10 22:51:42461const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
462const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
463 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
464 nullptr}};
465
Aliona DANGLA00ae7db2022-10-04 16:58:50466const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58467 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49468const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58469 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49470const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58471 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
472
Aliona DANGLAa5257ccc2022-08-29 14:01:49473const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50474 {"With legacy download", kOpenInDownloadInShareButton,
475 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49476 {"With WKDownload", kOpenInDownloadWithWKDownload,
477 std::size(kOpenInDownloadWithWKDownload), nullptr},
478 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
479 nullptr},
480};
481
Ewann Pelle3774cac532022-11-15 10:12:37482const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
483 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
Ewann Pelleca00bab2022-12-16 14:49:39484const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowBottomPosition[] = {
485 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowBottomParam}};
486const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowTopPosition[] = {
487 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowTopParam}};
Ewann Pelle3774cac532022-11-15 10:12:37488
489const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
490 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
491 std::size(kEnablePinnedTabsBottomPosition), nullptr},
Ewann Pelleca00bab2022-12-16 14:49:39492 {"overflow + bottom pinned tabs", kEnablePinnedTabsOverflowBottomPosition,
493 std::size(kEnablePinnedTabsOverflowBottomPosition), nullptr},
494 {"overflow + top pinned tabs", kEnablePinnedTabsOverflowTopPosition,
495 std::size(kEnablePinnedTabsOverflowTopPosition), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37496};
497
ginnnnnnny591a4972022-09-01 16:10:27498const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
499 {autofill::features::kAutofillBrandingIOSParam, "true"}};
500const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
501 {"(Monotone)", kAutofillBrandingIOSMonotone,
502 std::size(kAutofillBrandingIOSMonotone), nullptr}};
503
Scott Yodercb2fe632022-09-12 15:28:35504const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26505 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35506const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
507 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
508 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
509
Benjamin Williamsaa8da8142022-11-14 19:51:03510const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
511 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
512const FeatureEntry::FeatureVariation
513 kIOSPopularSitesImprovedSuggestionsVariations[] = {
514 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
515 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
516
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28517const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
518 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
519const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
520 {"with search result page", kEnableExperienceKitMapsWithSrp,
521 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
522
adamta3811f9182022-10-24 17:49:33523const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
524 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
525 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
526const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
527 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
528 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
529
530const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
531 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
532 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
533 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
534 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
535
Quentin Pubert154fc6a2023-01-09 15:58:58536const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
537 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
538const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
539 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
540 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
541
Louis Romero93e9b50a2023-01-26 01:46:12542const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
543 {kTabInactivityThresholdParameterName,
544 kTabInactivityThresholdOneWeekParam}};
545const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
546 {kTabInactivityThresholdParameterName,
547 kTabInactivityThresholdTwoWeeksParam}};
548const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
549 {kTabInactivityThresholdParameterName,
550 kTabInactivityThresholdThreeWeeksParam}};
551
552const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
553 {"One week", kTabInactivityThresholdOneWeek,
554 std::size(kTabInactivityThresholdOneWeek), nullptr},
555 {"Two weeks", kTabInactivityThresholdTwoWeeks,
556 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
557 {"Three weeks", kTabInactivityThresholdThreeWeeks,
558 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
559};
560
Guillem Perezf131a662023-02-16 02:20:36561const FeatureEntry::FeatureParam kTileAblationMVTOnlyForNewUsers[] = {
562 {kTileAblationMVTAndShortcutsForNewUsersParam, "true"}};
563const FeatureEntry::FeatureVariation
564 kTileAblationMVTAndShortcutsForNewUsersVariations[] = {
565 {"Hide Only Most Visited", kTileAblationMVTOnlyForNewUsers,
566 std::size(kTileAblationMVTOnlyForNewUsers), nullptr}};
567
Huiting Yud7d2a5322023-02-09 21:14:22568const FeatureEntry::FeatureParam
569 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
570 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
571const FeatureEntry::FeatureParam
572 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
573 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
574const FeatureEntry::FeatureParam
575 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
576 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
577
578const FeatureEntry::FeatureVariation
579 kCredentialProviderExtensionPromoVariations[] = {
580 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
581 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
582 {"On password copied",
583 kCredentialProviderExtensionPromoOnPasswordCopied,
584 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
585 {"On successful login with autofill",
586 kCredentialProviderExtensionPromoOnLoginWithAutofill,
587 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
588 nullptr},
589};
590
Cooper Knaak1e026562017-07-26 05:22:28591// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21592// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28593// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
594// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21595// macro for this type supplying the command line to the macro.
596// . MULTI_VALUE: a list of choices, the first of which should correspond to a
597// deactivated state for this lab (i.e. no command line option). To specify
598// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
599// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28600// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
601// either enabled, disabled, or uses the default value of the associated
602// base::Feature instance. To specify this type of entry use the macro
603// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
604// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
605// base::Feature instance. Choices corresponding to the default state, a
606// universally enabled state, and a universally disabled state are
607// automatically included. To specify this type of entry use the macro
608// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
609// the array of choices.
610//
sdefresne14900ee2015-11-27 14:43:21611// See the documentation of FeatureEntry for details on the fields.
612//
613// When adding a new choice, add it to the end of the list.
614const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28615 {"in-product-help-demo-mode-choice",
616 flag_descriptions::kInProductHelpDemoModeName,
617 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
618 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23619 feature_engagement::kIPHDemoMode,
620 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09621 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22622 {"enable-autofill-credit-card-upload",
623 flag_descriptions::kAutofillCreditCardUploadName,
624 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24625 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23626 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
627 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
628 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51629 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23630 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
631 {"wallet-service-use-sandbox",
632 flag_descriptions::kWalletServiceUseSandboxName,
633 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
634 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
635 autofill::switches::kWalletServiceUseSandbox,
636 "1",
637 autofill::switches::kWalletServiceUseSandbox,
638 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59639 {"show-autofill-type-predictions",
640 flag_descriptions::kShowAutofillTypePredictionsName,
641 flag_descriptions::kShowAutofillTypePredictionsDescription,
642 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46643 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26644 {"autofill-account-profiles-union-view",
645 flag_descriptions::kAutofillAccountProfilesUnionViewName,
646 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
647 flags_ui::kOsIos,
648 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22649 {"autofill-ios-delay-between-fields",
650 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
651 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
652 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20653 {"fullscreen-promos-manager",
654 flag_descriptions::kFullscreenPromosManagerName,
655 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
656 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05657 {"fullscreen-promos-manager-skip-internal-limits",
658 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
659 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
660 flags_ui::kOsIos,
661 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14662 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53663 flag_descriptions::kFullscreenSmoothScrollingName,
664 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
665 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06666 {"webpage-default-zoom-from-dynamic-type",
667 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
668 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
669 flags_ui::kOsIos,
670 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56671 {"webpage-alternative-text-zoom",
672 flag_descriptions::kWebPageAlternativeTextZoomName,
673 flag_descriptions::kWebPageAlternativeTextZoomDescription,
674 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34675 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
676 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
677 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28678 {"toolbar-container", flag_descriptions::kToolbarContainerName,
679 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
680 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13681 {"omnibox-ui-max-autocomplete-matches",
682 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
683 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
684 flags_ui::kOsIos,
685 FEATURE_WITH_PARAMS_VALUE_TYPE(
686 omnibox::kUIExperimentMaxAutocompleteMatches,
687 kOmniboxUIMaxAutocompleteMatchesVariations,
688 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35689 {"omnibox-local-history-zero-suggest-beyond-ntp",
690 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
691 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
692 flags_ui::kOsIos,
693 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54694 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
695 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
696 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
697 kOmniboxMaxZPSMatchesVariations,
698 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45699
700 {"omnibox-most-visited-tiles-on-srp",
701 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
702 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
703 flags_ui::kOsIos,
704 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30705 {"autofill-use-mobile-label-disambiguation",
706 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
707 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
708 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45709 FEATURE_WITH_PARAMS_VALUE_TYPE(
710 autofill::features::kAutofillUseMobileLabelDisambiguation,
711 kAutofillUseMobileLabelDisambiguationVariations,
712 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46713 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
714 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30715 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48716 {"force-startup-signin-promo",
717 flag_descriptions::kForceStartupSigninPromoName,
718 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29719 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06720 {"identity-status-consistency",
721 flag_descriptions::kIdentityStatusConsistencyName,
722 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
723 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22724 {"restore-session-from-cache",
725 flag_descriptions::kRestoreSessionFromCacheName,
726 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49727 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09728 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
729 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
730 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41731 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
732 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
733 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13734#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45735 {"screen-time-integration-ios",
736 flag_descriptions::kScreenTimeIntegrationName,
737 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
738 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13739#endif
Nazerke3e993f72020-09-21 13:00:06740 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
741 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
742 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55743 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
744 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
745 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14746 {"default-browser-fullscreen-promo-experiment",
747 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
748 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
749 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59750 FEATURE_WITH_PARAMS_VALUE_TYPE(
751 kDefaultBrowserFullscreenPromoExperiment,
752 kDefaultBrowserFullscreenPromoExperimentVariations,
753 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11754 {"ios-shared-highlighting-color-change",
755 flag_descriptions::kIOSSharedHighlightingColorChangeName,
756 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07757 flags_ui::kOsIos,
758 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34759 {"ios-shared-highlighting-v2",
760 flag_descriptions::kIOSSharedHighlightingV2Name,
761 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
762 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45763 {"omnibox-new-textfield-implementation",
764 flag_descriptions::kOmniboxNewImplementationName,
765 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
766 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26767 {"omnibox-on-focus-suggestions-contextual-web",
768 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
769 flag_descriptions::
770 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
771 flags_ui::kOsIos,
772 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
773 {"omnibox-on-focus-suggestions-srp",
774 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
775 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
776 flags_ui::kOsIos,
777 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12778 {"omnibox-report-assisted-query-stats",
779 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
780 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
781 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
782 {"omnibox-report-searchbox-stats",
783 flag_descriptions::kOmniboxReportSearchboxStatsName,
784 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
785 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15786 {"omnibox-fuzzy-url-suggestions",
787 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
788 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
789 flags_ui::kOsIos,
790 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19791 {"start-surface", flag_descriptions::kStartSurfaceName,
792 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23793 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
794 kStartSurfaceVariations,
795 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42796 {"autofill-address-verification-in-save-prompt",
797 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
798 flag_descriptions::
799 kEnableAutofillAddressSavePromptAddressVerificationDescription,
800 flags_ui::kOsIos,
801 FEATURE_VALUE_TYPE(
802 autofill::features::
803 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25804 {"filling-across-affiliated-websites",
805 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
806 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
807 flags_ui::kOsIos,
808 FEATURE_VALUE_TYPE(
809 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19810 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
811 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
812 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34813 {"wait-threshold-seconds-for-capabilities-api",
814 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
815 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
816 flags_ui::kOsIos,
817 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23818 {"autofill-fill-merchant-promo-code-fields",
819 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
820 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
821 flags_ui::kOsIos,
822 FEATURE_VALUE_TYPE(
823 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03824 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
825 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
826 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18827 {"new-overflow-menu-alternate-iph",
828 flag_descriptions::kNewOverflowMenuAlternateIPHName,
829 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
830 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24831 {"use-lens-to-search-for-image",
832 flag_descriptions::kUseLensToSearchForImageName,
833 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44834 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22835 {"enable-lens-in-home-screen-widget",
836 flag_descriptions::kEnableLensInHomeScreenWidgetName,
837 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
838 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
839 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
840 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
842 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
843 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
844 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03845 {"enable-lens-context-menu-alt-text",
846 flag_descriptions::kEnableLensContextMenuAltTextName,
847 flag_descriptions::kEnableLensContextMenuAltTextDescription,
848 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44849 {"enable-lens-in-omnibox-copied-image",
850 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
851 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
852 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40853 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23854 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
855 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40856 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23857 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03858 {"enable-disco-feed-endpoint",
859 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
860 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
861 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11862 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15863 {"enable-discover-feed-top-sync-promo",
864 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
865 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
866 flags_ui::kOsIos,
867 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
868 kDiscoverFeedTopSyncPromoVariations,
869 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14870 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
871 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
872 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
873 kFeedHeaderSettingsVariations,
874 "FeedHeaderSettings")},
Guillem Perezc49aeebd2023-01-25 00:00:41875 {"enable-hiding-mvt-shortcuts",
Guillem Perezf131a662023-02-16 02:20:36876 flag_descriptions::kTileAblationMVTAndShortcutsForNewUsersName,
877 flag_descriptions::kTileAblationMVTAndShortcutsForNewUsersDescription,
878 flags_ui::kOsIos,
879 FEATURE_WITH_PARAMS_VALUE_TYPE(
880 kTileAblationMVTAndShortcutsForNewUsers,
881 kTileAblationMVTAndShortcutsForNewUsersVariations,
882 "TileAblationMVTAndShortcutsForNewUser")},
Tommy Martino7393d762021-10-12 17:59:28883 {"shared-highlighting-amp",
884 flag_descriptions::kIOSSharedHighlightingAmpName,
885 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
886 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28887 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42888 commerce::flag_descriptions::kCommercePriceTrackingName,
889 commerce::flag_descriptions::kCommercePriceTrackingDescription,
890 flags_ui::kOsIos,
891 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
892 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15893 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06894 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
895 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
896 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54897 {"ntp-view-hierarchy-repair",
898 flag_descriptions::kNTPViewHierarchyRepairName,
899 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20900 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26901 {"synthesized-restore-session",
902 flag_descriptions::kSynthesizedRestoreSessionName,
903 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
904 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18905 {"ios-media-permissions-control",
906 flag_descriptions::kMediaPermissionsControlName,
907 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Ewann8c7aadc2022-05-19 15:41:05909 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
910 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
911 FEATURE_VALUE_TYPE(kUseSFSymbols)},
David Jeanc2b88ab602022-08-08 14:52:51912 {"ios-webpage-intent-annotations",
913 flag_descriptions::kEnableWebPageAnnotationsName,
914 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
915 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26916 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
917 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
918 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01919 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
920 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
921 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43922 {"enable-tailored-security-integration",
923 flag_descriptions::kTailoredSecurityIntegrationName,
924 flag_descriptions::kTailoredSecurityIntegrationDescription,
925 flags_ui::kOsIos,
926 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26927 {"autofill-enable-card-product-name",
928 flag_descriptions::kAutofillEnableCardProductNameName,
929 flag_descriptions::kAutofillEnableCardProductNameDescription,
930 flags_ui::kOsIos,
931 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00932 {"send-tab-to-self-signin-promo",
933 flag_descriptions::kSendTabToSelfSigninPromoName,
934 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
935 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22936 {"autofill-enforce-delays-in-strike-database",
937 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
938 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
939 flags_ui::kOsIos,
940 FEATURE_VALUE_TYPE(
941 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41942 {"autofill-upstream-allow-additional-email-domains",
943 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
944 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
945 flags_ui::kOsIos,
946 FEATURE_VALUE_TYPE(
947 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
948 {"autofill-upstream-allow-all-email-domains",
949 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
950 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
951 flags_ui::kOsIos,
952 FEATURE_VALUE_TYPE(
953 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52954 {"enable-download-service-foreground-session",
955 flag_descriptions::kDownloadServiceForegroundSessionName,
956 flag_descriptions::kDownloadServiceForegroundSessionDescription,
957 flags_ui::kOsIos,
958 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23959 {"enable-tflite-language-detection",
960 flag_descriptions::kTFLiteLanguageDetectionName,
961 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
962 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20963 {"optimization-guide-debug-logs",
964 flag_descriptions::kOptimizationGuideDebugLogsName,
965 flag_descriptions::kOptimizationGuideDebugLogsDescription,
966 flags_ui::kOsIos,
967 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55968 {"optimization-guide-push-notifications",
969 flag_descriptions::kOptimizationGuidePushNotificationClientName,
970 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
971 flags_ui::kOsIos,
972 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Olivier Robinffe767c2022-04-21 13:13:23973 {"optimization-guide-model-downloading",
974 flag_descriptions::kOptimizationGuideModelDownloadingName,
975 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
976 flags_ui::kOsIos,
977 FEATURE_VALUE_TYPE(
978 optimization_guide::features::kOptimizationGuideModelDownloading)},
979 {"optimization-target-prediction",
980 flag_descriptions::kOptimizationTargetPredictionName,
981 flag_descriptions::kOptimizationTargetPredictionDescription,
982 flags_ui::kOsIos,
983 FEATURE_VALUE_TYPE(
984 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54985 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
986 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
987 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
988 {"sync-standalone-invalidations-wallet-and-offer",
989 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
990 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
991 flags_ui::kOsIos,
992 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01993 {"suggestions-scrolling-ipad",
994 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
995 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
996 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00997 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
998 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
999 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:221000 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
1001 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251003 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1004 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331005 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551006 {"experience-kit-apple-calendar",
1007 flag_descriptions::kAppleCalendarExperienceKitName,
1008 flag_descriptions::kAppleCalendarExperienceKitDescription,
1009 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:391010 {"enable-expkit-calendar-text-classifier",
1011 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1012 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1013 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:081014 {"enable-expkit-text-classifier",
1015 flag_descriptions::kEnableExpKitTextClassifierName,
1016 flag_descriptions::kEnableExpKitTextClassifierDescription,
1017 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181018 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1019 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281020 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1021 kEnableExperienceKitMapsVariations,
1022 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051023 {"enable-long-press-surrounding-text",
1024 flag_descriptions::kLongPressSurroundingTextName,
1025 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1026 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331027 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1028 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1029 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011030 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1031 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1032 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251033 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1034 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1035 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221036 {"smart-sorting-new-overflow-menu",
1037 flag_descriptions::kSmartSortingNewOverflowMenuName,
1038 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1039 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251040 {"smart-sorting-price-tracking-destination",
1041 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1042 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1043 flags_ui::kOsIos,
1044 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441045 {"new-overflow-menu-share-chrome-action",
1046 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1047 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1048 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301049 {"autofill-enable-ranking-formula-address-profiles",
1050 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1051 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1052 flags_ui::kOsIos,
1053 FEATURE_VALUE_TYPE(
1054 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391055 {"autofill-enable-ranking-formula-credit-cards",
1056 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1057 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1058 flags_ui::kOsIos,
1059 FEATURE_VALUE_TYPE(
1060 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021061 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1062 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1063 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021064 {"enable-feed-bottom-sign-in-promo",
1065 flag_descriptions::kEnableFeedBottomSignInPromoName,
1066 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1067 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1068 {"enable-feed-card-menu-sign-in-promo",
1069 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1070 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1071 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271072 {"content-suggestions-ui-module-refresh",
1073 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1074 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401075 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581076 FEATURE_WITH_PARAMS_VALUE_TYPE(
1077 kContentSuggestionsUIModuleRefresh,
1078 kModuleRefreshVariations,
1079 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571080 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1081 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1082 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061083 {"default-browser-intents-show-settings",
1084 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1085 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1086 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451087 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1088 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421089 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1090 kDmTokenDeletionVariation,
1091 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191092 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1093 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1094 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291095 {"ios-password-manager-cross-origin-iframe-support",
1096 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1097 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1098 flags_ui::kOsIos,
1099 FEATURE_VALUE_TYPE(password_manager::features::
1100 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031101 {"ios-popular-sites-improved-suggestions",
1102 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1103 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1104 flags_ui::kOsIos,
1105 FEATURE_WITH_PARAMS_VALUE_TYPE(
1106 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1107 kIOSPopularSitesImprovedSuggestionsVariations,
1108 field_trial_constants::
1109 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141110 {"omnibox-adaptive-suggestions-count",
1111 flag_descriptions::kAdaptiveSuggestionsCountName,
1112 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1113 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201114 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1115 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581116 FEATURE_WITH_PARAMS_VALUE_TYPE(
1117 kTrendingQueriesModule,
1118 kTrendingQueriesModuleVariations,
1119 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321120 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191121 flag_descriptions::kAutofillParseIBANFieldsName,
1122 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1123 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361124 {"autofill-enable-new-card-unmask-prompt-view",
1125 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1126 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1127 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271128 FEATURE_VALUE_TYPE(
1129 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241130 {"omnibox-zero-suggest-prefetching",
1131 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1132 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1133 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451134 {"omnibox-zero-suggest-prefetching-on-srp",
1135 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1136 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1137 flags_ui::kOsIos,
1138 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1139 {"omnibox-zero-suggest-prefetching-on-web",
1140 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1141 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1142 flags_ui::kOsIos,
1143 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471144 {"omnibox-zero-suggest-in-memory-caching",
1145 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1146 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1147 flags_ui::kOsIos,
1148 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351149 {"omnibox-on-device-tail-suggestions",
1150 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1151 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1152 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391153 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1154 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501155 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491156 {"enable-sync-history-datatype",
1157 flag_descriptions::kSyncEnableHistoryDataTypeName,
1158 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1159 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361160 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1161 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1162 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1163 kOmniboxMaxURLMatchesVariations,
1164 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061165 {"metrickit-non-crash-reports",
1166 flag_descriptions::kMetrickitNonCrashReportName,
1167 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1168 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371169 {"autofill-enable-remade-downstream-metrics",
1170 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1171 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1172 flags_ui::kOsIos,
1173 FEATURE_VALUE_TYPE(
1174 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551175 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1176 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1177 flag_descriptions::
1178 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1179 flags_ui::kOsIos,
1180 FEATURE_VALUE_TYPE(
1181 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341182#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1183 {"feed-background-refresh-ios",
1184 flag_descriptions::kFeedBackgroundRefreshName,
1185 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1186 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1187 kFeedBackgroundRefreshVariations,
1188 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261189#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1190 {"feed-foreground-refresh-ios",
1191 flag_descriptions::kFeedForegroundRefreshName,
1192 flag_descriptions::kFeedForegroundRefreshDescription, flags_ui::kOsIos,
1193 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedForegroundRefresh,
1194 kFeedForegroundRefreshVariations,
1195 "FeedForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191196 {"omnibox-keyboard-paste-button",
1197 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1198 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1199 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261200
Aliona DANGLAa5257ccc2022-08-29 14:01:491201 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1202 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1203 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1204 kOpenInDownloadVariations,
1205 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171206 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1207 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411208 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1209 kWhatsNewLayoutVariations,
1210 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271211 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1212 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1213 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1214 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051215 "AutofillBrandingIOS")},
1216 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1217 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1218 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351219 {"ios-new-post-restore-experience",
1220 flag_descriptions::kIOSNewPostRestoreExperienceName,
1221 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1222 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261223 FEATURE_WITH_PARAMS_VALUE_TYPE(
1224 post_restore_signin::features::kIOSNewPostRestoreExperience,
1225 kIOSNewPostRestoreExperienceVariations,
1226 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021227 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1228 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1229 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501230 {"enable-tflite-language-detection-ignore",
1231 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1232 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1233 flags_ui::kOsIos,
1234 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141235 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1236 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1237 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471238 {"enable-check-visibility-on-attention-log-start",
1239 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1240 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1241 flags_ui::kOsIos,
1242 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1243 {"enable-refine-data-source-reload-reporting",
1244 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1245 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1246 flags_ui::kOsIos,
1247 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041248 {"enable-passwords-account-storage",
1249 flag_descriptions::kEnablePasswordsAccountStorageName,
1250 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1251 flags_ui::kOsIos,
1252 FEATURE_VALUE_TYPE(
1253 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331254 {"enable-default-following-feed-sort-type",
1255 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1256 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1257 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201258 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331259 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201260 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131261 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1262 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1263 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201264 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011265 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1266 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371267 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1268 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1269 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1270 kEnablePinnedTabsVariations,
1271 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031272 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1273 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1274 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411275 {"credential-provider-extension-promo",
1276 flag_descriptions::kCredentialProviderExtensionPromoName,
1277 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221278 flags_ui::kOsIos,
1279 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1280 kCredentialProviderExtensionPromoVariations,
1281 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521282 {"default-browser-blue-dot-promo",
1283 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1284 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1285 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271286 {"ios-force-translate-enabled",
1287 flag_descriptions::kIOSForceTranslateEnabledName,
1288 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251290 {"iph-price-notifications-while-browsing",
1291 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1292 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1293 flags_ui::kOsIos,
1294 FEATURE_VALUE_TYPE(
1295 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411296 {"autofill-offer-to-save-card-with-same-last-four",
1297 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1298 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1299 flags_ui::kOsIos,
1300 FEATURE_VALUE_TYPE(
1301 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041302 {"omnibox-multiline-search-suggest",
1303 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1304 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1305 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501306 {"autofill-suggest-server-card-instead-of-local-card",
1307 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1308 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1309 flags_ui::kOsIos,
1310 FEATURE_VALUE_TYPE(
1311 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581312 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1313 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1314 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1315 kNativeFindInPageVariations,
1316 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551317 {"intents-on-email", flag_descriptions::kEmailName,
1318 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331319 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341320 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1321 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1322 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351323 {"multiline-fade-truncating-label",
1324 flag_descriptions::kMultilineFadeTruncatingLabelName,
1325 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1326 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301327 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1328 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1329 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391330 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1331 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1332 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
1333 {"ios-tabstrip-context-menu", flag_descriptions::kTabStripContextMenuName,
1334 flag_descriptions::kTabStripContextMenuDescription, flags_ui::kOsIos,
Louis Romero93e9b50a2023-01-26 01:46:121335 FEATURE_VALUE_TYPE(kTabStripContextMenu)},
1336 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1337 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1338 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1339 kTabInactivityThresholdVariations,
1340 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411341 {"enable-feed-image-caching",
1342 flag_descriptions::kEnableFeedImageCachingName,
1343 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1344 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1345 {"enable-feed-synthetic-capabilities",
1346 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1347 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1348 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561349 {"ios-show-password-storage-in-save-infobar",
1350 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1351 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1352 flags_ui::kOsIos,
1353 FEATURE_VALUE_TYPE(
1354 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Louis Romero58f355022023-02-13 19:04:311355 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1356 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1357 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421358 {"ios-edit-menu-partial-translate",
1359 flag_descriptions::kIOSEditMenuPartialTranslateName,
1360 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
1361 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSEditMenuPartialTranslate)},
Olivier Robin7057bd72023-02-16 18:35:201362 {"ios-custom-browser-edit-menu",
1363 flag_descriptions::kIOSCustomBrowserEditMenuName,
1364 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1365 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Louis Romero93e9b50a2023-01-26 01:46:121366};
sdefresne14900ee2015-11-27 14:43:211367
Rohit Raobed794c2020-04-27 15:27:451368bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1369 return false;
1370}
1371
1372flags_ui::FlagsState& GetGlobalFlagsState() {
1373 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1374 nullptr);
1375 return *flags_state;
1376}
David Jean5ca263c2021-08-18 09:19:301377// Creates the experimental test policies map, used by AsyncPolicyLoader and
1378// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341379NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211380 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1381
Guillaume Jenkins25e9bd72020-08-27 17:39:061382 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551383 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061384 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551385
Guillaume Jenkins25e9bd72020-08-27 17:39:061386 // Set some sample policy values for testing if EnableSamplePolicies is set to
1387 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401388 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551389 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011390 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1391
Guillaume Jenkinseeb7007c2020-06-25 22:55:401392 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1393
1394 // 2 = Disable all variations
1395 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1396
1397 // 2 = Do not allow any site to show popups
1398 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1399
Tina Wang5abee802020-07-29 23:09:521400 // Set default search engine.
1401 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1402 @YES,
1403 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1404 @"http://www.google.com/search?q={searchTerms}",
1405 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021406 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521407
Tina Wang89068c82020-10-29 15:51:501408 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1409
Gauthier Ambard21b23702021-04-16 16:11:271410 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1411
Guillaume Jenkinseeb7007c2020-06-25 22:55:401412 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011413
1414 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531415
1416 // 2 = Enhanced safe browsing protection
1417 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1418
1419 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291420
1421 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551422 }];
1423 }
1424
Ewann227a3c02021-04-19 12:04:541425 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041426 NSString* sync_policy_key =
1427 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301428 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541429 }
Ewann227a3c02021-04-19 12:04:541430
Ewann570a6302021-08-17 07:22:421431 // SyncTypesListDisabled policy.
1432 NSString* Sync_types_list_disabled_key =
1433 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1434 NSMutableArray* Sync_types_list_disabled_values =
1435 [[NSMutableArray alloc] init];
1436 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1437 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1438 }
1439 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1440 [Sync_types_list_disabled_values addObject:@"readingList"];
1441 }
1442 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1443 [Sync_types_list_disabled_values addObject:@"preferences"];
1444 }
1445 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1446 [Sync_types_list_disabled_values addObject:@"passwords"];
1447 }
1448 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1449 [Sync_types_list_disabled_values addObject:@"autofill"];
1450 }
1451 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1452 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1453 }
1454 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1455 [Sync_types_list_disabled_values addObject:@"tabs"];
1456 }
1457 if ([Sync_types_list_disabled_values count]) {
1458 [testing_policies addEntriesFromDictionary:@{
1459 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1460 }];
Ewann570a6302021-08-17 07:22:421461 }
1462
Gauthier Ambard073eaa92021-11-22 15:24:131463 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521464 NSString* incognito_policy_key =
1465 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1466 NSInteger incognito_mode_availability =
1467 [defaults integerForKey:incognito_policy_key];
1468 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521469 [testing_policies addEntriesFromDictionary:@{
1470 incognito_policy_key : @(incognito_mode_availability),
1471 }];
1472 }
1473
Ewann40a8f8a2021-07-29 10:01:201474 NSString* restriction_pattern =
1475 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1476 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291477 NSString* restrict_key =
1478 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201479 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291480 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201481 }];
1482 }
1483
Vincent Boisselle19200bc2021-09-01 17:58:251484 // If the sign-in policy is set (not "None"), add the policy key to the list
1485 // of enabled experimental policies, and set the value.
1486 NSString* const kSigninPolicyKey = @"BrowserSignin";
1487 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1488 if (signin_policy_mode) {
1489 // Remove the mode offset that was used to represent the unset policy.
1490 --signin_policy_mode;
1491 DCHECK(signin_policy_mode >= 0);
1492
Vincent Boisselle19200bc2021-09-01 17:58:251493 [testing_policies addEntriesFromDictionary:@{
1494 kSigninPolicyKey : @(signin_policy_mode),
1495 }];
1496 }
1497
Veronique Nguyen9b1044f2022-01-11 14:41:131498 // If the New Tab Page URL is set (not empty) add the value to the list of
1499 // test policies.
1500 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1501 if ([ntp_location length] > 0) {
1502 NSString* ntp_location_key =
1503 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1504 [testing_policies
1505 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571506 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131507 }
1508
Ali Juma9ec36d22022-03-28 14:53:121509 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1510 NSString* allow_backups_key =
1511 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1512 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1513 [allowed_experimental_policies addObject:allow_backups_key];
1514 }
1515
Guillaume Jenkins25e9bd72020-08-27 17:39:061516 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1517 // policy.
1518 if ([allowed_experimental_policies count] > 0) {
1519 [testing_policies setValue:allowed_experimental_policies
1520 forKey:base::SysUTF8ToNSString(
1521 policy::key::kEnableExperimentalPolicies)];
1522 }
1523
jlebel2eb40222022-05-06 11:15:421524 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1525 switch ([defaults integerForKey:metrics_reporting_key]) {
1526 case 1:
1527 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131528 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421529 break;
1530 case 2:
1531 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131532 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421533 break;
1534 default:
1535 // Metrics reporting not managed.
1536 break;
1537 }
1538
David Jean6f85d44f2021-08-19 08:08:451539 // Warning: Add new flags to TestingPoliciesHash() below.
1540
David Jean5ca263c2021-08-18 09:19:301541 return testing_policies;
1542}
David Jean6f85d44f2021-08-19 08:08:451543
David Jean5ca263c2021-08-18 09:19:301544} // namespace
1545
Gauthier Ambard02dbf022022-08-23 08:28:471546// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301547void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1548 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1549
1550 // Set the UA flag if UseMobileSafariUA is enabled.
1551 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1552 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1553 // Chrome puts its product token.
1554 int32_t major = 0;
1555 int32_t minor = 0;
1556 int32_t bugfix = 0;
1557 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1558 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1559
1560 command_line->AppendSwitchASCII(switches::kUserAgent,
1561 web::BuildMobileUserAgent(product));
1562 }
1563
1564 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341565 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301566
1567 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1568 // Management to enabled and add the token to the list of policies.
1569 NSString* token_key =
1570 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1571 NSString* token = [defaults stringForKey:token_key];
1572
1573 if ([token length] > 0) {
1574 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1575 [testing_policies setValue:token forKey:token_key];
1576 }
1577
Guillaume Jenkins57606d72020-08-13 17:32:551578 // If some policies were set, commit them to the app's registration defaults.
1579 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401580 NSDictionary* registration_defaults =
1581 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1582 [defaults registerDefaults:registration_defaults];
1583 }
1584
sdefresne14900ee2015-11-27 14:43:211585 // Freeform commandline flags. These are added last, so that any flags added
1586 // earlier in this function take precedence.
1587 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1588 base::CommandLine::StringVector flags;
1589 // Append an empty "program" argument.
1590 flags.push_back("");
1591
1592 // The number of flags corresponds to the number of text fields in
1593 // Experimental.plist.
1594 const int kNumFreeformFlags = 5;
1595 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1596 NSString* key =
1597 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1598 NSString* flag = [defaults stringForKey:key];
1599 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331600 // iOS keyboard replaces -- with —, so undo that.
1601 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1602 withString:@"--"
1603 options:0
1604 range:NSMakeRange(0, 1)];
1605 // To make things easier, allow flags with no dashes by prepending them
1606 // here. This also allows for flags that just have one dash if they
1607 // exist.
1608 if (![flag hasPrefix:@"-"]) {
1609 flag = [@"--" stringByAppendingString:flag];
1610 }
sdefresne14900ee2015-11-27 14:43:211611 flags.push_back(base::SysNSStringToUTF8(flag));
1612 }
1613 }
1614
1615 base::CommandLine temp_command_line(flags);
1616 command_line->AppendArguments(temp_command_line, false);
1617 }
msardafc76f662017-02-24 12:46:281618
justincohendacc85d2017-06-28 23:34:101619 // Populate command line flag for 3rd party keyboard omnibox workaround.
1620 NSString* enableThirdPartyKeyboardWorkaround =
1621 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1622 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1623 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1624 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1625 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1626 }
1627
Sylvain Defresned3cd8d92022-01-18 13:35:081628 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211629}
1630
sdefresne14900ee2015-11-27 14:43:211631void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1632 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181633 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111634 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531635 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211636}
1637
jkrcalbf073372016-07-29 07:21:311638std::vector<std::string> RegisterAllFeatureVariationParameters(
1639 flags_ui::FlagsStorage* flags_storage,
1640 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181641 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1642 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311643}
1644
sdefresne14900ee2015-11-27 14:43:211645void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1646 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501647 base::Value::List& supported_entries,
1648 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181649 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211650 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511651 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211652}
1653
1654void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1655 const std::string& internal_name,
1656 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181657 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1658 enable);
sdefresne14900ee2015-11-27 14:43:211659}
1660
1661void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181662 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211663}
1664
1665namespace testing {
1666
Elly Fong-Jones323ab1092021-08-23 22:36:311667base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1668 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531669 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211670}
1671
1672} // namespace testing