blob: 443fe1b4f428138990a7cd7476f38ec9ea7b2992 [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"
Zhixiang Teoh40027a22022-07-28 03:24:3481#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0582#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5783#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2184#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5085#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2486#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0087#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3588#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1489#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0390#import "ios/chrome/browser/ui/ntp/field_trial_constants.h"
adamta273568472020-12-04 23:53:5791#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0192#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4993#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4594#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2695#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1996#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Louis Romero93e9b50a2023-01-26 01:46:1297#import "ios/chrome/browser/ui/tab_switcher/tab_grid/inactive_tabs/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2898#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5799#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17100#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/web/features.h"
102#import "ios/chrome/grit/ios_strings.h"
103#import "ios/components/security_interstitials/https_only_mode/feature.h"
104#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
105#import "ios/web/common/features.h"
106#import "ios/web/common/user_agent.h"
107#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21108
Sylvain Defresne9c107082020-10-27 16:39:13109#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57110#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13111#endif
112
sdefresne14900ee2015-11-27 14:43:21113#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22115#endif
stkhapuginc1be1792016-12-13 14:30:53116
117#if !defined(__has_feature) || !__has_feature(objc_arc)
118#error "This file requires ARC support."
119#endif
sdefresne14900ee2015-11-27 14:43:21120
elawrence816f6790e2017-06-16 18:19:28121using flags_ui::FeatureEntry;
122
sdefresne14900ee2015-11-27 14:43:21123namespace {
Emily Starkbafa9062017-12-27 15:22:46124
Olivier Robin3d60411622018-02-23 10:03:22125const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
126 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
127 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
128 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
129 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
130 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
131 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
132 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
133 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
134 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
135};
136
Nohemi Fernandezc00842a2021-07-26 11:47:34137const FeatureEntry::Choice
138 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
139 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
140 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
141 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
142 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
143};
144
Stepan Khapugincc4e9842019-01-23 13:38:13145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
157const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
158 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
159
160const FeatureEntry::FeatureVariation
161 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
162 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13174 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53175 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13176
Stepan Khapuginbac467e2022-05-06 21:11:54177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
181const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
182 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
183
184const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
185 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
186 nullptr},
187 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
188 nullptr},
189 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
190 nullptr},
191};
192
Christian Xucf26d562022-07-06 09:28:36193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
197const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
198 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
199
200const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
201 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
202 nullptr},
203 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
204 nullptr},
205 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
206 nullptr},
207};
208
Cheick Cissef37087902022-10-07 19:01:41209const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
210 {kWhatsNewModuleBasedLayoutParam, "true"}};
211
212const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
213 {"Display module layout", kWhatsNewModuleLayout,
214 std::size(kWhatsNewModuleLayout), nullptr},
215};
216
Caitlin Fischer37e01232019-05-24 13:05:45217const FeatureEntry::FeatureParam
218 kAutofillUseMobileLabelDisambiguationShowAll[] = {
219 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
220 autofill::features::
221 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
222const FeatureEntry::FeatureParam
223 kAutofillUseMobileLabelDisambiguationShowOne[] = {
224 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
225 autofill::features::
226 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
227
228const FeatureEntry::FeatureVariation
229 kAutofillUseMobileLabelDisambiguationVariations[] = {
230 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53231 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45232 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53233 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45234
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10235const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59236 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
237 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
238const FeatureEntry::FeatureVariation
239 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
240 {"Remind me later",
241 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53242 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59243 nullptr}};
244
Mohammad Refaatab6bee62022-05-16 16:31:15245const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47246 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
247 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15248const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47249 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
250 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
251
Mohammad Refaatab6bee62022-05-16 16:31:15252const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
253 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
254 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
255 {"Compact", kDiscoverFeedTopSyncPromoCompact,
256 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
257
adamta4a6f2fd22023-02-13 17:37:14258const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
259 {kDisableStickyHeaderForFollowingFeed, "true"}};
260const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
261 {kOverrideFeedHeaderHeight, "43"}};
262const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
263 {kDisableStickyHeaderForFollowingFeed, "true"},
264 {kOverrideFeedHeaderHeight, "43"}};
265
266const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
267 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
268 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
269 {"Reduced header height", kFeedHeaderSettingReducedHeight,
270 std::size(kFeedHeaderSettingReducedHeight), nullptr},
271 {"All improvements", kFeedHeaderSettingAllImprovements,
272 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
273
gogerald53c6e7a2021-04-15 22:07:35274const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08275 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35276 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
277const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08278 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35279 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
280const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08281 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35282 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
283const FeatureEntry::FeatureParam
284 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
285 {kStartSurfaceShrinkLogoParam, "true"},
286 {kStartSurfaceReturnToRecentTabParam, "true"},
287 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
288const FeatureEntry::FeatureParam
289 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
290 {kStartSurfaceHideShortcutsParam, "true"},
291 {kStartSurfaceReturnToRecentTabParam, "true"},
292 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
293const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08294 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35295 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
296const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
297 {kStartSurfaceHideShortcutsParam, "true"},
298 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
299const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08300 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35301 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
302const FeatureEntry::FeatureParam
303 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
304 {kStartSurfaceShrinkLogoParam, "true"},
305 {kStartSurfaceReturnToRecentTabParam, "true"},
306 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
307const FeatureEntry::FeatureParam
308 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
309 {kStartSurfaceHideShortcutsParam, "true"},
310 {kStartSurfaceReturnToRecentTabParam, "true"},
311 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08312
gogerald0e39e3aa2021-02-10 18:41:23313const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35314 {"10s:Show Return to Recent Tab tile",
315 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53316 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35317 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53318 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35319 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53320 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35321 {"10s:Shrink Logo and show Return to Recent Tab tile",
322 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53323 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35324 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
325 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53326 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35327 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53328 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35329 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53330 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35331 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53332 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35333 {"1h:Shrink Logo and show Return to Recent Tab tile",
334 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53335 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35336 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
337 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53338 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08339};
gogerald0e39e3aa2021-02-10 18:41:23340
Chris Lu8e308dc2022-09-06 16:59:40341const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
342 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
343const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57344 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40345 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
346
347const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
348 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
349 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57350 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40351 std::size(kModuleRefreshNoHeaders), nullptr},
352};
353
Ed Chin91e44992022-07-27 13:42:34354#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26355// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01356const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04357 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
358 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01359 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04360 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01361const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04362 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
363 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01364 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04365 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01366const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04367 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
368 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01369 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04370 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01371const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04372 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
373 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01374 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04375 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01376const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04377 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
378 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01379 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
380 {kBackgroundRefreshIntervalInSeconds, "0"}};
381const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04382 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
383 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01384 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
385 {kBackgroundRefreshIntervalInSeconds, "0"}};
386const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
387 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
388 {kEnableRecurringBackgroundRefreshSchedule, "false"},
389 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
390 {kBackgroundRefreshIntervalInSeconds, "0"}};
391const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
392 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
393 {kEnableRecurringBackgroundRefreshSchedule, "true"},
394 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
395 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04396
Ed Chin178ec2a2023-02-10 22:21:26397// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04398const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01399 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
400 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
401 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
402 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
403 {"1hr Interval 1hr Max Age Recurring",
404 kOneHourIntervalOneHourMaxAgeRecurring,
405 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
406 {"4hr Interval 6hr Max Age Recurring",
407 kFourHourIntervalSixHourMaxAgeRecurring,
408 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
409 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
410 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
411 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
412 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
413 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
414 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
415 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
416 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04417};
Ed Chin91e44992022-07-27 13:42:34418#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04419
Ed Chin178ec2a2023-02-10 22:21:26420// Feed Foreground Refresh Feature Params.
421const FeatureEntry::FeatureParam kFeedRefreshPostFeedSessionOnly[] = {
422 {kEnableFeedRefreshPostFeedSession, "true"},
423 {kEnableFeedRefreshOnAppBackgrounding, "false"}};
424const FeatureEntry::FeatureParam kFeedRefreshOnAppBackgroundingOnly[] = {
425 {kEnableFeedRefreshPostFeedSession, "false"},
426 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
427const FeatureEntry::FeatureParam kFeedForegroundRefreshAll[] = {
428 {kEnableFeedRefreshPostFeedSession, "true"},
429 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
430
431// Feed Foreground Refresh Feature Variations.
432const FeatureEntry::FeatureVariation kFeedForegroundRefreshVariations[] = {
433 {"Post Feed session", kFeedRefreshPostFeedSessionOnly,
434 std::size(kFeedRefreshPostFeedSessionOnly), nullptr},
435 {"On app backgrounding", kFeedRefreshOnAppBackgroundingOnly,
436 std::size(kFeedRefreshOnAppBackgroundingOnly), nullptr},
437 {"All foreground refresh methods", kFeedForegroundRefreshAll,
438 std::size(kFeedForegroundRefreshAll), nullptr},
439};
440
Chris Luc9a5cb12022-07-20 16:11:39441const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58442 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39443const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58444 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39445const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
446 {kTrendingQueriesHideShortcutsParam, "false"},
447 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58448};
Chris Luc9a5cb12022-07-20 16:11:39449
450const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
451 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
452 std::size(kTrendingQueriesEnableAllUsers), nullptr},
453 {"Enabled All Users Hide Shortcuts",
454 kTrendingQueriesEnableAllUsersHideShortcuts,
455 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
456 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
457 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39458};
459
Igor Ruvinov44fed9f2022-06-10 22:51:42460const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
461const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
462 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
463 nullptr}};
464
Aliona DANGLA00ae7db2022-10-04 16:58:50465const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58466 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49467const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58468 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49469const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58470 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
471
Aliona DANGLAa5257ccc2022-08-29 14:01:49472const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50473 {"With legacy download", kOpenInDownloadInShareButton,
474 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49475 {"With WKDownload", kOpenInDownloadWithWKDownload,
476 std::size(kOpenInDownloadWithWKDownload), nullptr},
477 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
478 nullptr},
479};
480
Ewann Pelle3774cac532022-11-15 10:12:37481const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
482 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
Ewann Pelleca00bab2022-12-16 14:49:39483const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowBottomPosition[] = {
484 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowBottomParam}};
485const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowTopPosition[] = {
486 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowTopParam}};
Ewann Pelle3774cac532022-11-15 10:12:37487
488const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
489 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
490 std::size(kEnablePinnedTabsBottomPosition), nullptr},
Ewann Pelleca00bab2022-12-16 14:49:39491 {"overflow + bottom pinned tabs", kEnablePinnedTabsOverflowBottomPosition,
492 std::size(kEnablePinnedTabsOverflowBottomPosition), nullptr},
493 {"overflow + top pinned tabs", kEnablePinnedTabsOverflowTopPosition,
494 std::size(kEnablePinnedTabsOverflowTopPosition), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37495};
496
ginnnnnnny591a4972022-09-01 16:10:27497const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
498 {autofill::features::kAutofillBrandingIOSParam, "true"}};
499const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
500 {"(Monotone)", kAutofillBrandingIOSMonotone,
501 std::size(kAutofillBrandingIOSMonotone), nullptr}};
502
Scott Yodercb2fe632022-09-12 15:28:35503const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26504 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35505const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
506 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
507 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
508
Benjamin Williamsaa8da8142022-11-14 19:51:03509const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
510 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
511const FeatureEntry::FeatureVariation
512 kIOSPopularSitesImprovedSuggestionsVariations[] = {
513 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
514 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
515
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28516const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
517 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
518const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
519 {"with search result page", kEnableExperienceKitMapsWithSrp,
520 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
521
adamta3811f9182022-10-24 17:49:33522const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
523 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
524 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
525const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
526 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
527 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
528
529const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
530 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
531 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
532 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
533 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
534
Quentin Pubert154fc6a2023-01-09 15:58:58535const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
536 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
537const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
538 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
539 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
540
Louis Romero93e9b50a2023-01-26 01:46:12541const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
542 {kTabInactivityThresholdParameterName,
543 kTabInactivityThresholdOneWeekParam}};
544const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
545 {kTabInactivityThresholdParameterName,
546 kTabInactivityThresholdTwoWeeksParam}};
547const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
548 {kTabInactivityThresholdParameterName,
549 kTabInactivityThresholdThreeWeeksParam}};
550
551const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
552 {"One week", kTabInactivityThresholdOneWeek,
553 std::size(kTabInactivityThresholdOneWeek), nullptr},
554 {"Two weeks", kTabInactivityThresholdTwoWeeks,
555 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
556 {"Three weeks", kTabInactivityThresholdThreeWeeks,
557 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
558};
559
Huiting Yud7d2a5322023-02-09 21:14:22560const FeatureEntry::FeatureParam
561 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
562 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
563const FeatureEntry::FeatureParam
564 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
565 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
566const FeatureEntry::FeatureParam
567 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
568 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
569
570const FeatureEntry::FeatureVariation
571 kCredentialProviderExtensionPromoVariations[] = {
572 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
573 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
574 {"On password copied",
575 kCredentialProviderExtensionPromoOnPasswordCopied,
576 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
577 {"On successful login with autofill",
578 kCredentialProviderExtensionPromoOnLoginWithAutofill,
579 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
580 nullptr},
581};
582
Cooper Knaak1e026562017-07-26 05:22:28583// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21584// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28585// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
586// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21587// macro for this type supplying the command line to the macro.
588// . MULTI_VALUE: a list of choices, the first of which should correspond to a
589// deactivated state for this lab (i.e. no command line option). To specify
590// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
591// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28592// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
593// either enabled, disabled, or uses the default value of the associated
594// base::Feature instance. To specify this type of entry use the macro
595// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
596// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
597// base::Feature instance. Choices corresponding to the default state, a
598// universally enabled state, and a universally disabled state are
599// automatically included. To specify this type of entry use the macro
600// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
601// the array of choices.
602//
sdefresne14900ee2015-11-27 14:43:21603// See the documentation of FeatureEntry for details on the fields.
604//
605// When adding a new choice, add it to the end of the list.
606const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28607 {"in-product-help-demo-mode-choice",
608 flag_descriptions::kInProductHelpDemoModeName,
609 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
610 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23611 feature_engagement::kIPHDemoMode,
612 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09613 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22614 {"enable-autofill-credit-card-upload",
615 flag_descriptions::kAutofillCreditCardUploadName,
616 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24617 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23618 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
619 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
620 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51621 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23622 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
623 {"wallet-service-use-sandbox",
624 flag_descriptions::kWalletServiceUseSandboxName,
625 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
626 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
627 autofill::switches::kWalletServiceUseSandbox,
628 "1",
629 autofill::switches::kWalletServiceUseSandbox,
630 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59631 {"show-autofill-type-predictions",
632 flag_descriptions::kShowAutofillTypePredictionsName,
633 flag_descriptions::kShowAutofillTypePredictionsDescription,
634 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46635 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26636 {"autofill-account-profiles-union-view",
637 flag_descriptions::kAutofillAccountProfilesUnionViewName,
638 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
639 flags_ui::kOsIos,
640 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22641 {"autofill-ios-delay-between-fields",
642 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
643 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
644 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20645 {"fullscreen-promos-manager",
646 flag_descriptions::kFullscreenPromosManagerName,
647 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
648 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05649 {"fullscreen-promos-manager-skip-internal-limits",
650 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
651 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
652 flags_ui::kOsIos,
653 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14654 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53655 flag_descriptions::kFullscreenSmoothScrollingName,
656 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
657 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06658 {"webpage-default-zoom-from-dynamic-type",
659 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
660 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
661 flags_ui::kOsIos,
662 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56663 {"webpage-alternative-text-zoom",
664 flag_descriptions::kWebPageAlternativeTextZoomName,
665 flag_descriptions::kWebPageAlternativeTextZoomDescription,
666 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34667 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
668 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
669 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28670 {"toolbar-container", flag_descriptions::kToolbarContainerName,
671 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
672 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13673 {"omnibox-ui-max-autocomplete-matches",
674 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
675 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
676 flags_ui::kOsIos,
677 FEATURE_WITH_PARAMS_VALUE_TYPE(
678 omnibox::kUIExperimentMaxAutocompleteMatches,
679 kOmniboxUIMaxAutocompleteMatchesVariations,
680 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35681 {"omnibox-local-history-zero-suggest-beyond-ntp",
682 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
683 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
684 flags_ui::kOsIos,
685 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54686 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
687 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
688 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
689 kOmniboxMaxZPSMatchesVariations,
690 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45691
692 {"omnibox-most-visited-tiles-on-srp",
693 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
694 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
695 flags_ui::kOsIos,
696 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30697 {"autofill-use-mobile-label-disambiguation",
698 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
699 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
700 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45701 FEATURE_WITH_PARAMS_VALUE_TYPE(
702 autofill::features::kAutofillUseMobileLabelDisambiguation,
703 kAutofillUseMobileLabelDisambiguationVariations,
704 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46705 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
706 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30707 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48708 {"force-startup-signin-promo",
709 flag_descriptions::kForceStartupSigninPromoName,
710 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29711 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06712 {"identity-status-consistency",
713 flag_descriptions::kIdentityStatusConsistencyName,
714 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
715 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22716 {"restore-session-from-cache",
717 flag_descriptions::kRestoreSessionFromCacheName,
718 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49719 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09720 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
721 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
722 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41723 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
724 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13726#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45727 {"screen-time-integration-ios",
728 flag_descriptions::kScreenTimeIntegrationName,
729 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
730 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13731#endif
Nazerke3e993f72020-09-21 13:00:06732 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
733 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
734 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55735 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
736 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
737 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14738 {"default-browser-fullscreen-promo-experiment",
739 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
740 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
741 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59742 FEATURE_WITH_PARAMS_VALUE_TYPE(
743 kDefaultBrowserFullscreenPromoExperiment,
744 kDefaultBrowserFullscreenPromoExperimentVariations,
745 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11746 {"ios-shared-highlighting-color-change",
747 flag_descriptions::kIOSSharedHighlightingColorChangeName,
748 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07749 flags_ui::kOsIos,
750 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34751 {"ios-shared-highlighting-v2",
752 flag_descriptions::kIOSSharedHighlightingV2Name,
753 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
754 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45755 {"omnibox-new-textfield-implementation",
756 flag_descriptions::kOmniboxNewImplementationName,
757 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
758 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26759 {"omnibox-on-focus-suggestions-contextual-web",
760 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
761 flag_descriptions::
762 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
763 flags_ui::kOsIos,
764 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
765 {"omnibox-on-focus-suggestions-srp",
766 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
767 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
768 flags_ui::kOsIos,
769 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12770 {"omnibox-report-assisted-query-stats",
771 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
772 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
773 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
774 {"omnibox-report-searchbox-stats",
775 flag_descriptions::kOmniboxReportSearchboxStatsName,
776 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
777 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15778 {"omnibox-fuzzy-url-suggestions",
779 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
780 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
781 flags_ui::kOsIos,
782 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19783 {"start-surface", flag_descriptions::kStartSurfaceName,
784 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23785 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
786 kStartSurfaceVariations,
787 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42788 {"autofill-address-verification-in-save-prompt",
789 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
790 flag_descriptions::
791 kEnableAutofillAddressSavePromptAddressVerificationDescription,
792 flags_ui::kOsIos,
793 FEATURE_VALUE_TYPE(
794 autofill::features::
795 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25796 {"filling-across-affiliated-websites",
797 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
798 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
799 flags_ui::kOsIos,
800 FEATURE_VALUE_TYPE(
801 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19802 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
803 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
804 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34805 {"wait-threshold-seconds-for-capabilities-api",
806 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
807 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
808 flags_ui::kOsIos,
809 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23810 {"autofill-fill-merchant-promo-code-fields",
811 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
812 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
813 flags_ui::kOsIos,
814 FEATURE_VALUE_TYPE(
815 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03816 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
817 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
818 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18819 {"new-overflow-menu-alternate-iph",
820 flag_descriptions::kNewOverflowMenuAlternateIPHName,
821 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
822 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24823 {"use-lens-to-search-for-image",
824 flag_descriptions::kUseLensToSearchForImageName,
825 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44826 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22827 {"enable-lens-in-home-screen-widget",
828 flag_descriptions::kEnableLensInHomeScreenWidgetName,
829 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
830 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
831 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
832 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
833 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
834 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
835 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
836 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03837 {"enable-lens-context-menu-alt-text",
838 flag_descriptions::kEnableLensContextMenuAltTextName,
839 flag_descriptions::kEnableLensContextMenuAltTextDescription,
840 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44841 {"enable-lens-in-omnibox-copied-image",
842 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
843 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
844 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40845 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23846 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
847 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40848 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23849 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03850 {"enable-disco-feed-endpoint",
851 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
852 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
853 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11854 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15855 {"enable-discover-feed-top-sync-promo",
856 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
857 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
858 flags_ui::kOsIos,
859 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
860 kDiscoverFeedTopSyncPromoVariations,
861 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14862 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
863 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
864 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
865 kFeedHeaderSettingsVariations,
866 "FeedHeaderSettings")},
Guillem Perezc49aeebd2023-01-25 00:00:41867 {"enable-hiding-mvt-shortcuts",
868 flag_descriptions::kHideMVTAndShortcutsForNewUsersName,
869 flag_descriptions::kHideMVTAndShortcutsForNewUsersDescription,
870 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kHideMVTAndShortcutsForNewUsers)},
871
Tommy Martino7393d762021-10-12 17:59:28872 {"shared-highlighting-amp",
873 flag_descriptions::kIOSSharedHighlightingAmpName,
874 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28876 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42877 commerce::flag_descriptions::kCommercePriceTrackingName,
878 commerce::flag_descriptions::kCommercePriceTrackingDescription,
879 flags_ui::kOsIos,
880 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
881 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15882 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06883 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
884 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
885 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54886 {"ntp-view-hierarchy-repair",
887 flag_descriptions::kNTPViewHierarchyRepairName,
888 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20889 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26890 {"synthesized-restore-session",
891 flag_descriptions::kSynthesizedRestoreSessionName,
892 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
893 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18894 {"ios-media-permissions-control",
895 flag_descriptions::kMediaPermissionsControlName,
896 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
897 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Ewann8c7aadc2022-05-19 15:41:05898 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
899 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kUseSFSymbols)},
David Jeanc2b88ab602022-08-08 14:52:51901 {"ios-webpage-intent-annotations",
902 flag_descriptions::kEnableWebPageAnnotationsName,
903 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
904 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26905 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
906 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
907 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01908 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
909 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43911 {"enable-tailored-security-integration",
912 flag_descriptions::kTailoredSecurityIntegrationName,
913 flag_descriptions::kTailoredSecurityIntegrationDescription,
914 flags_ui::kOsIos,
915 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26916 {"autofill-enable-card-product-name",
917 flag_descriptions::kAutofillEnableCardProductNameName,
918 flag_descriptions::kAutofillEnableCardProductNameDescription,
919 flags_ui::kOsIos,
920 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00921 {"send-tab-to-self-signin-promo",
922 flag_descriptions::kSendTabToSelfSigninPromoName,
923 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
924 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22925 {"autofill-enforce-delays-in-strike-database",
926 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
927 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
928 flags_ui::kOsIos,
929 FEATURE_VALUE_TYPE(
930 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41931 {"autofill-upstream-allow-additional-email-domains",
932 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
933 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
934 flags_ui::kOsIos,
935 FEATURE_VALUE_TYPE(
936 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
937 {"autofill-upstream-allow-all-email-domains",
938 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
939 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
940 flags_ui::kOsIos,
941 FEATURE_VALUE_TYPE(
942 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52943 {"enable-download-service-foreground-session",
944 flag_descriptions::kDownloadServiceForegroundSessionName,
945 flag_descriptions::kDownloadServiceForegroundSessionDescription,
946 flags_ui::kOsIos,
947 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23948 {"enable-tflite-language-detection",
949 flag_descriptions::kTFLiteLanguageDetectionName,
950 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
951 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20952 {"optimization-guide-debug-logs",
953 flag_descriptions::kOptimizationGuideDebugLogsName,
954 flag_descriptions::kOptimizationGuideDebugLogsDescription,
955 flags_ui::kOsIos,
956 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:55957 {"optimization-guide-push-notifications",
958 flag_descriptions::kOptimizationGuidePushNotificationClientName,
959 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
960 flags_ui::kOsIos,
961 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Olivier Robinffe767c2022-04-21 13:13:23962 {"optimization-guide-model-downloading",
963 flag_descriptions::kOptimizationGuideModelDownloadingName,
964 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
965 flags_ui::kOsIos,
966 FEATURE_VALUE_TYPE(
967 optimization_guide::features::kOptimizationGuideModelDownloading)},
968 {"optimization-target-prediction",
969 flag_descriptions::kOptimizationTargetPredictionName,
970 flag_descriptions::kOptimizationTargetPredictionDescription,
971 flags_ui::kOsIos,
972 FEATURE_VALUE_TYPE(
973 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54974 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
975 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
976 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
977 {"sync-standalone-invalidations-wallet-and-offer",
978 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
979 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
980 flags_ui::kOsIos,
981 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01982 {"suggestions-scrolling-ipad",
983 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
984 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
985 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00986 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
987 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:22989 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
990 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
991 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25992 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
993 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:33994 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:55995 {"experience-kit-apple-calendar",
996 flag_descriptions::kAppleCalendarExperienceKitName,
997 flag_descriptions::kAppleCalendarExperienceKitDescription,
998 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:39999 {"enable-expkit-calendar-text-classifier",
1000 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
1001 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
1002 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:081003 {"enable-expkit-text-classifier",
1004 flag_descriptions::kEnableExpKitTextClassifierName,
1005 flag_descriptions::kEnableExpKitTextClassifierDescription,
1006 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181007 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1008 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281009 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1010 kEnableExperienceKitMapsVariations,
1011 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051012 {"enable-long-press-surrounding-text",
1013 flag_descriptions::kLongPressSurroundingTextName,
1014 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1015 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331016 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1017 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1018 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011019 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1020 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1021 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251022 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1023 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1024 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221025 {"smart-sorting-new-overflow-menu",
1026 flag_descriptions::kSmartSortingNewOverflowMenuName,
1027 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1028 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251029 {"smart-sorting-price-tracking-destination",
1030 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1031 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1032 flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441034 {"new-overflow-menu-share-chrome-action",
1035 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1036 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1037 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301038 {"autofill-enable-ranking-formula-address-profiles",
1039 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1040 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1041 flags_ui::kOsIos,
1042 FEATURE_VALUE_TYPE(
1043 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391044 {"autofill-enable-ranking-formula-credit-cards",
1045 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1046 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1047 flags_ui::kOsIos,
1048 FEATURE_VALUE_TYPE(
1049 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021050 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1051 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1052 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021053 {"enable-feed-bottom-sign-in-promo",
1054 flag_descriptions::kEnableFeedBottomSignInPromoName,
1055 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1056 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1057 {"enable-feed-card-menu-sign-in-promo",
1058 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1059 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1060 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271061 {"content-suggestions-ui-module-refresh",
1062 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1063 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401064 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581065 FEATURE_WITH_PARAMS_VALUE_TYPE(
1066 kContentSuggestionsUIModuleRefresh,
1067 kModuleRefreshVariations,
1068 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571069 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1070 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1071 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061072 {"default-browser-intents-show-settings",
1073 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1074 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1075 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451076 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1077 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421078 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1079 kDmTokenDeletionVariation,
1080 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191081 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1082 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291084 {"ios-password-manager-cross-origin-iframe-support",
1085 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1086 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1087 flags_ui::kOsIos,
1088 FEATURE_VALUE_TYPE(password_manager::features::
1089 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031090 {"ios-popular-sites-improved-suggestions",
1091 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1092 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1093 flags_ui::kOsIos,
1094 FEATURE_WITH_PARAMS_VALUE_TYPE(
1095 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1096 kIOSPopularSitesImprovedSuggestionsVariations,
1097 field_trial_constants::
1098 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141099 {"omnibox-adaptive-suggestions-count",
1100 flag_descriptions::kAdaptiveSuggestionsCountName,
1101 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1102 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201103 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1104 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581105 FEATURE_WITH_PARAMS_VALUE_TYPE(
1106 kTrendingQueriesModule,
1107 kTrendingQueriesModuleVariations,
1108 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321109 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191110 flag_descriptions::kAutofillParseIBANFieldsName,
1111 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1112 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361113 {"autofill-enable-new-card-unmask-prompt-view",
1114 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1115 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1116 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271117 FEATURE_VALUE_TYPE(
1118 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241119 {"omnibox-zero-suggest-prefetching",
1120 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1121 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1122 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451123 {"omnibox-zero-suggest-prefetching-on-srp",
1124 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1125 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1126 flags_ui::kOsIos,
1127 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1128 {"omnibox-zero-suggest-prefetching-on-web",
1129 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1130 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1131 flags_ui::kOsIos,
1132 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471133 {"omnibox-zero-suggest-in-memory-caching",
1134 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1135 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1136 flags_ui::kOsIos,
1137 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351138 {"omnibox-on-device-tail-suggestions",
1139 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1140 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1141 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391142 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1143 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501144 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491145 {"enable-sync-history-datatype",
1146 flag_descriptions::kSyncEnableHistoryDataTypeName,
1147 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1148 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361149 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1150 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1151 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1152 kOmniboxMaxURLMatchesVariations,
1153 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061154 {"metrickit-non-crash-reports",
1155 flag_descriptions::kMetrickitNonCrashReportName,
1156 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1157 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371158 {"autofill-enable-remade-downstream-metrics",
1159 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1160 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1161 flags_ui::kOsIos,
1162 FEATURE_VALUE_TYPE(
1163 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551164 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1165 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1166 flag_descriptions::
1167 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1168 flags_ui::kOsIos,
1169 FEATURE_VALUE_TYPE(
1170 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341171#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1172 {"feed-background-refresh-ios",
1173 flag_descriptions::kFeedBackgroundRefreshName,
1174 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1175 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1176 kFeedBackgroundRefreshVariations,
1177 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261178#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1179 {"feed-foreground-refresh-ios",
1180 flag_descriptions::kFeedForegroundRefreshName,
1181 flag_descriptions::kFeedForegroundRefreshDescription, flags_ui::kOsIos,
1182 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedForegroundRefresh,
1183 kFeedForegroundRefreshVariations,
1184 "FeedForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191185 {"omnibox-keyboard-paste-button",
1186 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1187 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1188 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261189
Aliona DANGLAa5257ccc2022-08-29 14:01:491190 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1191 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1192 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1193 kOpenInDownloadVariations,
1194 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171195 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1196 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411197 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1198 kWhatsNewLayoutVariations,
1199 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271200 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1201 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1202 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1203 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051204 "AutofillBrandingIOS")},
1205 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1206 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1207 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351208 {"ios-new-post-restore-experience",
1209 flag_descriptions::kIOSNewPostRestoreExperienceName,
1210 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1211 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261212 FEATURE_WITH_PARAMS_VALUE_TYPE(
1213 post_restore_signin::features::kIOSNewPostRestoreExperience,
1214 kIOSNewPostRestoreExperienceVariations,
1215 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021216 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1217 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1218 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501219 {"enable-tflite-language-detection-ignore",
1220 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1221 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1222 flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141224 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1225 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1226 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471227 {"enable-check-visibility-on-attention-log-start",
1228 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1229 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1230 flags_ui::kOsIos,
1231 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1232 {"enable-refine-data-source-reload-reporting",
1233 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1234 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1235 flags_ui::kOsIos,
1236 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041237 {"enable-passwords-account-storage",
1238 flag_descriptions::kEnablePasswordsAccountStorageName,
1239 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1240 flags_ui::kOsIos,
1241 FEATURE_VALUE_TYPE(
1242 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331243 {"enable-default-following-feed-sort-type",
1244 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1245 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1246 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201247 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331248 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201249 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131250 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1251 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1252 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201253 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011254 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1255 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371256 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1257 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1258 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1259 kEnablePinnedTabsVariations,
1260 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031261 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1262 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1263 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411264 {"credential-provider-extension-promo",
1265 flag_descriptions::kCredentialProviderExtensionPromoName,
1266 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221267 flags_ui::kOsIos,
1268 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1269 kCredentialProviderExtensionPromoVariations,
1270 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521271 {"default-browser-blue-dot-promo",
1272 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1273 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1274 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271275 {"ios-force-translate-enabled",
1276 flag_descriptions::kIOSForceTranslateEnabledName,
1277 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1278 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251279 {"iph-price-notifications-while-browsing",
1280 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1281 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1282 flags_ui::kOsIos,
1283 FEATURE_VALUE_TYPE(
1284 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411285 {"autofill-offer-to-save-card-with-same-last-four",
1286 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1287 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1288 flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(
1290 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041291 {"omnibox-multiline-search-suggest",
1292 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1293 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1294 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501295 {"autofill-suggest-server-card-instead-of-local-card",
1296 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1297 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1298 flags_ui::kOsIos,
1299 FEATURE_VALUE_TYPE(
1300 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581301 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1302 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1303 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1304 kNativeFindInPageVariations,
1305 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551306 {"intents-on-email", flag_descriptions::kEmailName,
1307 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331308 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341309 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1310 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1311 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351312 {"multiline-fade-truncating-label",
1313 flag_descriptions::kMultilineFadeTruncatingLabelName,
1314 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1315 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301316 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1317 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1318 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391319 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1320 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1321 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
1322 {"ios-tabstrip-context-menu", flag_descriptions::kTabStripContextMenuName,
1323 flag_descriptions::kTabStripContextMenuDescription, flags_ui::kOsIos,
Louis Romero93e9b50a2023-01-26 01:46:121324 FEATURE_VALUE_TYPE(kTabStripContextMenu)},
1325 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1326 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1327 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1328 kTabInactivityThresholdVariations,
1329 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411330 {"enable-feed-image-caching",
1331 flag_descriptions::kEnableFeedImageCachingName,
1332 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1333 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1334 {"enable-feed-synthetic-capabilities",
1335 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1336 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1337 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561338 {"ios-show-password-storage-in-save-infobar",
1339 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1340 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1341 flags_ui::kOsIos,
1342 FEATURE_VALUE_TYPE(
1343 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Menghan YANGc41b2542023-02-13 14:42:261344 {"enable-bookmark-account-storage-on-ios",
1345 flag_descriptions::kEnableBookmarkAccountStoragePromoOnIOSName,
1346 flag_descriptions::kEnableBookmarkAccountStoragePromoOnIOSDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(kEnableBookmarkAccountStoragePromoOnIOS)},
Louis Romero58f355022023-02-13 19:04:311349 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1350 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1351 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421352 {"ios-edit-menu-partial-translate",
1353 flag_descriptions::kIOSEditMenuPartialTranslateName,
1354 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
1355 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIOSEditMenuPartialTranslate)},
Louis Romero93e9b50a2023-01-26 01:46:121356};
sdefresne14900ee2015-11-27 14:43:211357
Rohit Raobed794c2020-04-27 15:27:451358bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1359 return false;
1360}
1361
1362flags_ui::FlagsState& GetGlobalFlagsState() {
1363 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1364 nullptr);
1365 return *flags_state;
1366}
David Jean5ca263c2021-08-18 09:19:301367// Creates the experimental test policies map, used by AsyncPolicyLoader and
1368// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341369NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211370 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1371
Guillaume Jenkins25e9bd72020-08-27 17:39:061372 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551373 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061374 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551375
Guillaume Jenkins25e9bd72020-08-27 17:39:061376 // Set some sample policy values for testing if EnableSamplePolicies is set to
1377 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401378 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551379 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011380 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1381
Guillaume Jenkinseeb7007c2020-06-25 22:55:401382 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1383
1384 // 2 = Disable all variations
1385 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1386
1387 // 2 = Do not allow any site to show popups
1388 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1389
Tina Wang5abee802020-07-29 23:09:521390 // Set default search engine.
1391 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1392 @YES,
1393 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1394 @"http://www.google.com/search?q={searchTerms}",
1395 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021396 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521397
Tina Wang89068c82020-10-29 15:51:501398 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1399
Gauthier Ambard21b23702021-04-16 16:11:271400 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1401
Guillaume Jenkinseeb7007c2020-06-25 22:55:401402 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011403
1404 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531405
1406 // 2 = Enhanced safe browsing protection
1407 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1408
1409 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291410
1411 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551412 }];
1413 }
1414
Ewann227a3c02021-04-19 12:04:541415 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041416 NSString* sync_policy_key =
1417 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301418 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541419 }
Ewann227a3c02021-04-19 12:04:541420
Ewann570a6302021-08-17 07:22:421421 // SyncTypesListDisabled policy.
1422 NSString* Sync_types_list_disabled_key =
1423 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1424 NSMutableArray* Sync_types_list_disabled_values =
1425 [[NSMutableArray alloc] init];
1426 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1427 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1428 }
1429 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1430 [Sync_types_list_disabled_values addObject:@"readingList"];
1431 }
1432 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1433 [Sync_types_list_disabled_values addObject:@"preferences"];
1434 }
1435 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1436 [Sync_types_list_disabled_values addObject:@"passwords"];
1437 }
1438 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1439 [Sync_types_list_disabled_values addObject:@"autofill"];
1440 }
1441 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1442 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1443 }
1444 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1445 [Sync_types_list_disabled_values addObject:@"tabs"];
1446 }
1447 if ([Sync_types_list_disabled_values count]) {
1448 [testing_policies addEntriesFromDictionary:@{
1449 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1450 }];
Ewann570a6302021-08-17 07:22:421451 }
1452
Gauthier Ambard073eaa92021-11-22 15:24:131453 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521454 NSString* incognito_policy_key =
1455 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1456 NSInteger incognito_mode_availability =
1457 [defaults integerForKey:incognito_policy_key];
1458 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521459 [testing_policies addEntriesFromDictionary:@{
1460 incognito_policy_key : @(incognito_mode_availability),
1461 }];
1462 }
1463
Ewann40a8f8a2021-07-29 10:01:201464 NSString* restriction_pattern =
1465 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1466 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291467 NSString* restrict_key =
1468 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201469 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291470 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201471 }];
1472 }
1473
Vincent Boisselle19200bc2021-09-01 17:58:251474 // If the sign-in policy is set (not "None"), add the policy key to the list
1475 // of enabled experimental policies, and set the value.
1476 NSString* const kSigninPolicyKey = @"BrowserSignin";
1477 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1478 if (signin_policy_mode) {
1479 // Remove the mode offset that was used to represent the unset policy.
1480 --signin_policy_mode;
1481 DCHECK(signin_policy_mode >= 0);
1482
Vincent Boisselle19200bc2021-09-01 17:58:251483 [testing_policies addEntriesFromDictionary:@{
1484 kSigninPolicyKey : @(signin_policy_mode),
1485 }];
1486 }
1487
Veronique Nguyen9b1044f2022-01-11 14:41:131488 // If the New Tab Page URL is set (not empty) add the value to the list of
1489 // test policies.
1490 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1491 if ([ntp_location length] > 0) {
1492 NSString* ntp_location_key =
1493 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1494 [testing_policies
1495 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571496 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131497 }
1498
Ali Juma9ec36d22022-03-28 14:53:121499 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1500 NSString* allow_backups_key =
1501 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1502 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1503 [allowed_experimental_policies addObject:allow_backups_key];
1504 }
1505
Guillaume Jenkins25e9bd72020-08-27 17:39:061506 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1507 // policy.
1508 if ([allowed_experimental_policies count] > 0) {
1509 [testing_policies setValue:allowed_experimental_policies
1510 forKey:base::SysUTF8ToNSString(
1511 policy::key::kEnableExperimentalPolicies)];
1512 }
1513
jlebel2eb40222022-05-06 11:15:421514 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1515 switch ([defaults integerForKey:metrics_reporting_key]) {
1516 case 1:
1517 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131518 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421519 break;
1520 case 2:
1521 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131522 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421523 break;
1524 default:
1525 // Metrics reporting not managed.
1526 break;
1527 }
1528
David Jean6f85d44f2021-08-19 08:08:451529 // Warning: Add new flags to TestingPoliciesHash() below.
1530
David Jean5ca263c2021-08-18 09:19:301531 return testing_policies;
1532}
David Jean6f85d44f2021-08-19 08:08:451533
David Jean5ca263c2021-08-18 09:19:301534} // namespace
1535
Gauthier Ambard02dbf022022-08-23 08:28:471536// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301537void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1538 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1539
1540 // Set the UA flag if UseMobileSafariUA is enabled.
1541 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1542 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1543 // Chrome puts its product token.
1544 int32_t major = 0;
1545 int32_t minor = 0;
1546 int32_t bugfix = 0;
1547 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1548 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1549
1550 command_line->AppendSwitchASCII(switches::kUserAgent,
1551 web::BuildMobileUserAgent(product));
1552 }
1553
1554 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341555 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301556
1557 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1558 // Management to enabled and add the token to the list of policies.
1559 NSString* token_key =
1560 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1561 NSString* token = [defaults stringForKey:token_key];
1562
1563 if ([token length] > 0) {
1564 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1565 [testing_policies setValue:token forKey:token_key];
1566 }
1567
Guillaume Jenkins57606d72020-08-13 17:32:551568 // If some policies were set, commit them to the app's registration defaults.
1569 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401570 NSDictionary* registration_defaults =
1571 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1572 [defaults registerDefaults:registration_defaults];
1573 }
1574
sdefresne14900ee2015-11-27 14:43:211575 // Freeform commandline flags. These are added last, so that any flags added
1576 // earlier in this function take precedence.
1577 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1578 base::CommandLine::StringVector flags;
1579 // Append an empty "program" argument.
1580 flags.push_back("");
1581
1582 // The number of flags corresponds to the number of text fields in
1583 // Experimental.plist.
1584 const int kNumFreeformFlags = 5;
1585 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1586 NSString* key =
1587 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1588 NSString* flag = [defaults stringForKey:key];
1589 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331590 // iOS keyboard replaces -- with —, so undo that.
1591 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1592 withString:@"--"
1593 options:0
1594 range:NSMakeRange(0, 1)];
1595 // To make things easier, allow flags with no dashes by prepending them
1596 // here. This also allows for flags that just have one dash if they
1597 // exist.
1598 if (![flag hasPrefix:@"-"]) {
1599 flag = [@"--" stringByAppendingString:flag];
1600 }
sdefresne14900ee2015-11-27 14:43:211601 flags.push_back(base::SysNSStringToUTF8(flag));
1602 }
1603 }
1604
1605 base::CommandLine temp_command_line(flags);
1606 command_line->AppendArguments(temp_command_line, false);
1607 }
msardafc76f662017-02-24 12:46:281608
justincohendacc85d2017-06-28 23:34:101609 // Populate command line flag for 3rd party keyboard omnibox workaround.
1610 NSString* enableThirdPartyKeyboardWorkaround =
1611 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1612 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1613 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1614 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1615 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1616 }
1617
Sylvain Defresned3cd8d92022-01-18 13:35:081618 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211619}
1620
sdefresne14900ee2015-11-27 14:43:211621void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1622 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181623 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111624 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531625 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211626}
1627
jkrcalbf073372016-07-29 07:21:311628std::vector<std::string> RegisterAllFeatureVariationParameters(
1629 flags_ui::FlagsStorage* flags_storage,
1630 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181631 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1632 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311633}
1634
sdefresne14900ee2015-11-27 14:43:211635void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1636 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501637 base::Value::List& supported_entries,
1638 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181639 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211640 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511641 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211642}
1643
1644void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1645 const std::string& internal_name,
1646 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181647 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1648 enable);
sdefresne14900ee2015-11-27 14:43:211649}
1650
1651void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181652 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211653}
1654
1655namespace testing {
1656
Elly Fong-Jones323ab1092021-08-23 22:36:311657base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1658 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531659 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211660}
1661
1662} // namespace testing