blob: c64e343e0f707ee193ac1a9675ac803d57e8e83c [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
Menghan YANGf3fe2de52023-02-27 16:38:5028#import "components/bookmarks/common/bookmark_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/breadcrumbs/core/features.h"
30#import "components/commerce/core/commerce_feature_list.h"
31#import "components/commerce/core/flag_descriptions.h"
32#import "components/content_settings/core/common/features.h"
33#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5234#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5735#import "components/enterprise/browser/enterprise_switches.h"
36#import "components/feature_engagement/public/feature_constants.h"
37#import "components/feature_engagement/public/feature_list.h"
38#import "components/feed/feed_feature_list.h"
39#import "components/flags_ui/feature_entry.h"
40#import "components/flags_ui/feature_entry_macros.h"
41#import "components/flags_ui/flags_storage.h"
42#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2543#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0345#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5746#import "components/ntp_tiles/switches.h"
47#import "components/omnibox/browser/omnibox_field_trial.h"
48#import "components/omnibox/common/omnibox_features.h"
49#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2050#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5751#import "components/password_manager/core/common/password_manager_features.h"
52#import "components/payments/core/features.h"
53#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4054#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5755#import "components/policy/policy_constants.h"
Menghan YANG5b3a78a2023-03-24 17:38:2656#import "components/reading_list/features/reading_list_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5757#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2558#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5759#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
60#import "components/signin/core/browser/account_reconcilor.h"
61#import "components/signin/ios/browser/features.h"
62#import "components/signin/public/base/signin_switches.h"
63#import "components/strings/grit/components_strings.h"
64#import "components/sync/base/command_line_switches.h"
65#import "components/sync/base/features.h"
66#import "components/sync/base/pref_names.h"
67#import "components/translate/core/browser/translate_prefs.h"
68#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3469#import "ios/chrome/app/background_mode_buildflags.h"
ginnnnnnnya81c7192023-03-24 18:05:2070#import "ios/chrome/browser/bring_android_tabs/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5771#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
72#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5473#import "ios/chrome/browser/credential_provider_promo/features.h"
Scott Yoder663a2262023-03-29 14:27:0474#import "ios/chrome/browser/default_browser/utils.h"
Quentin Pubert154fc6a2023-01-09 15:58:5875#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1776#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1778#import "ios/chrome/browser/flags/system_flags.h"
Tina Wangd3f6f192023-04-05 05:22:4379#import "ios/chrome/browser/follow/follow_features.h"
Ed Chin100660bf2022-04-26 16:59:1380#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5081#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3982#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5783#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2084#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5785#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4686#import "ios/chrome/browser/shared/public/features/features.h"
Asami Doi2f2d6dc2023-03-30 12:31:1987#import "ios/chrome/browser/snapshots/features.h"
Ewann Pelle903a05e62023-02-01 17:51:0688#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3089#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3490#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0591#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5792#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2193#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Ewann1a9d33d2021-06-14 11:12:2494#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0095#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
adamta273568472020-12-04 23:53:5796#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
adamta8886def42023-03-07 19:45:2397#import "ios/chrome/browser/ui/ntp/new_tab_page_retention_field_trial_constants.h"
Christian Xub8c06cd2022-04-29 20:55:0198#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4999#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:45100#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:26101#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:19102#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Kurt Horimoto79d590b2018-09-12 19:09:28103#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Cheick Cisse87a51cb2022-09-08 21:29:17104#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57105#import "ios/chrome/browser/web/features.h"
106#import "ios/chrome/grit/ios_strings.h"
107#import "ios/components/security_interstitials/https_only_mode/feature.h"
108#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
109#import "ios/web/common/features.h"
110#import "ios/web/common/user_agent.h"
111#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21112
Sylvain Defresne9c107082020-10-27 16:39:13113#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13115#endif
116
sdefresne14900ee2015-11-27 14:43:21117#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57118#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22119#endif
stkhapuginc1be1792016-12-13 14:30:53120
121#if !defined(__has_feature) || !__has_feature(objc_arc)
122#error "This file requires ARC support."
123#endif
sdefresne14900ee2015-11-27 14:43:21124
elawrence816f6790e2017-06-16 18:19:28125using flags_ui::FeatureEntry;
126
sdefresne14900ee2015-11-27 14:43:21127namespace {
Emily Starkbafa9062017-12-27 15:22:46128
Olivier Robin3d60411622018-02-23 10:03:22129const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
130 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
131 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
132 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
133 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
134 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
135 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
136 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
137 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
138 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
139};
140
Nohemi Fernandezc00842a2021-07-26 11:47:34141const FeatureEntry::Choice
142 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
143 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
144 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
145 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
146 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
147};
148
Stepan Khapugincc4e9842019-01-23 13:38:13149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
157const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
158 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
159const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
160 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
161const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
162 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
163
164const FeatureEntry::FeatureVariation
165 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
166 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13174 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53175 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13176 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53177 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13178 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53179 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13180
Stepan Khapuginbac467e2022-05-06 21:11:54181const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
182 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
183const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
184 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
185const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
186 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
187
188const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
189 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
190 nullptr},
191 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
192 nullptr},
193 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
194 nullptr},
195};
196
Christian Xucf26d562022-07-06 09:28:36197const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
198 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
199const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
200 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
201const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
202 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
203
204const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
205 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
206 nullptr},
207 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
208 nullptr},
209 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
210 nullptr},
211};
212
Cheick Cissef37087902022-10-07 19:01:41213const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
214 {kWhatsNewModuleBasedLayoutParam, "true"}};
215
216const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
217 {"Display module layout", kWhatsNewModuleLayout,
218 std::size(kWhatsNewModuleLayout), nullptr},
219};
220
Caitlin Fischer37e01232019-05-24 13:05:45221const FeatureEntry::FeatureParam
222 kAutofillUseMobileLabelDisambiguationShowAll[] = {
223 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
224 autofill::features::
225 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
226const FeatureEntry::FeatureParam
227 kAutofillUseMobileLabelDisambiguationShowOne[] = {
228 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
229 autofill::features::
230 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
231
232const FeatureEntry::FeatureVariation
233 kAutofillUseMobileLabelDisambiguationVariations[] = {
234 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53235 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45236 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53237 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45238
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10239const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59240 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
241 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
242const FeatureEntry::FeatureVariation
243 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
244 {"Remind me later",
245 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53246 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59247 nullptr}};
248
adamta37c6b832023-03-10 20:04:09249// Uses int values from SigninPromoViewStyle enum.
250const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
251 {kDiscoverFeedTopSyncPromoStyle, "0"}};
252const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactTitled[] = {
253 {kDiscoverFeedTopSyncPromoStyle, "1"}};
254const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
255 {{kDiscoverFeedTopSyncPromoStyle, "2"}};
256const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
257 {kDiscoverFeedTopSyncPromoStyle, "3"}};
adamtadb0bfc62022-08-01 17:37:47258
Mohammad Refaatab6bee62022-05-16 16:31:15259const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09260 {"Standard", kDiscoverFeedTopSyncPromoStandard,
261 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
262 {"Compact Titled (Unpersonalized)", kDiscoverFeedTopSyncPromoCompactTitled,
263 std::size(kDiscoverFeedTopSyncPromoCompactTitled), nullptr},
264 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
265 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
266 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
267 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15268
adamta4a6f2fd22023-02-13 17:37:14269const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
270 {kDisableStickyHeaderForFollowingFeed, "true"}};
271const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18272 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14273const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
274 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18275 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14276
277const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
278 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
279 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
280 {"Reduced header height", kFeedHeaderSettingReducedHeight,
281 std::size(kFeedHeaderSettingReducedHeight), nullptr},
282 {"All improvements", kFeedHeaderSettingAllImprovements,
283 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
284
gogerald53c6e7a2021-04-15 22:07:35285const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08286 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35287 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
288const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08289 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35290 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
291const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08292 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35293 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
294const FeatureEntry::FeatureParam
295 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
296 {kStartSurfaceShrinkLogoParam, "true"},
297 {kStartSurfaceReturnToRecentTabParam, "true"},
298 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
299const FeatureEntry::FeatureParam
300 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
301 {kStartSurfaceHideShortcutsParam, "true"},
302 {kStartSurfaceReturnToRecentTabParam, "true"},
303 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
304const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08305 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35306 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
307const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
308 {kStartSurfaceHideShortcutsParam, "true"},
309 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
310const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08311 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35312 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
313const FeatureEntry::FeatureParam
314 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
315 {kStartSurfaceShrinkLogoParam, "true"},
316 {kStartSurfaceReturnToRecentTabParam, "true"},
317 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
318const FeatureEntry::FeatureParam
319 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
320 {kStartSurfaceHideShortcutsParam, "true"},
321 {kStartSurfaceReturnToRecentTabParam, "true"},
322 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08323
gogerald0e39e3aa2021-02-10 18:41:23324const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35325 {"10s:Show Return to Recent Tab tile",
326 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53327 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35328 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53329 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35330 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53331 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35332 {"10s:Shrink Logo and show Return to Recent Tab tile",
333 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53334 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35335 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
336 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53337 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35338 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53339 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35340 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53341 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35342 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53343 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35344 {"1h:Shrink Logo and show Return to Recent Tab tile",
345 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53346 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35347 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
348 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53349 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08350};
gogerald0e39e3aa2021-02-10 18:41:23351
Chris Lu8e308dc2022-09-06 16:59:40352const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
353 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
354const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57355 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40356 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
357
358const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
359 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
360 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57361 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40362 std::size(kModuleRefreshNoHeaders), nullptr},
363};
364
Ed Chin91e44992022-07-27 13:42:34365#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26366// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01367const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04368 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
369 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01370 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04371 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01372const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04373 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
374 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01375 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04376 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01377const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04378 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
379 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01380 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04381 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01382const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04383 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
384 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01385 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04386 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01387const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04388 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
389 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01390 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
391 {kBackgroundRefreshIntervalInSeconds, "0"}};
392const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04393 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
394 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01395 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
396 {kBackgroundRefreshIntervalInSeconds, "0"}};
397const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
398 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
399 {kEnableRecurringBackgroundRefreshSchedule, "false"},
400 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
401 {kBackgroundRefreshIntervalInSeconds, "0"}};
402const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
403 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
404 {kEnableRecurringBackgroundRefreshSchedule, "true"},
405 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
406 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04407
Ed Chin178ec2a2023-02-10 22:21:26408// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04409const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01410 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
411 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
412 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
413 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
414 {"1hr Interval 1hr Max Age Recurring",
415 kOneHourIntervalOneHourMaxAgeRecurring,
416 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
417 {"4hr Interval 6hr Max Age Recurring",
418 kFourHourIntervalSixHourMaxAgeRecurring,
419 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
420 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
421 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
422 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
423 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
424 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
425 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
426 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
427 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04428};
Ed Chin91e44992022-07-27 13:42:34429#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04430
Ed Chin178ec2a2023-02-10 22:21:26431// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29432const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
433 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54434 {kEnableFeedAppCloseForegroundRefresh, "false"},
435 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29436const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
437 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54438 {kEnableFeedAppCloseForegroundRefresh, "true"},
439 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
440const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
441 {kEnableFeedSessionCloseForegroundRefresh, "false"},
442 {kEnableFeedAppCloseForegroundRefresh, "false"},
443 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26444
Ed Chin5c1fd532023-03-20 17:43:29445// Feed Invisible Foreground Refresh Feature Variations.
446const FeatureEntry::FeatureVariation
447 kFeedInvisibleForegroundRefreshVariations[] = {
448 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
449 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
450 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
451 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54452 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
453 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26454};
455
Chris Luc9a5cb12022-07-20 16:11:39456const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58457 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39458const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58459 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39460const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
461 {kTrendingQueriesHideShortcutsParam, "false"},
462 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58463};
Chris Luc9a5cb12022-07-20 16:11:39464
465const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
466 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
467 std::size(kTrendingQueriesEnableAllUsers), nullptr},
468 {"Enabled All Users Hide Shortcuts",
469 kTrendingQueriesEnableAllUsersHideShortcuts,
470 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
471 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
472 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39473};
474
Igor Ruvinov44fed9f2022-06-10 22:51:42475const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
476const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
477 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
478 nullptr}};
479
Aliona DANGLA00ae7db2022-10-04 16:58:50480const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58481 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49482const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58483 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49484const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58485 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
486
Aliona DANGLAa5257ccc2022-08-29 14:01:49487const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50488 {"With legacy download", kOpenInDownloadInShareButton,
489 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49490 {"With WKDownload", kOpenInDownloadWithWKDownload,
491 std::size(kOpenInDownloadWithWKDownload), nullptr},
492 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
493 nullptr},
494};
495
Ewann Pelle87019cdf2023-02-17 14:28:16496const FeatureEntry::FeatureParam kEnablePinnedTabsOverflow[] = {
497 {kEnablePinnedTabsOverflowParam, "true"}};
Ewann Pelle3774cac532022-11-15 10:12:37498
499const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
Ewann Pelle87019cdf2023-02-17 14:28:16500 {"+ overflow entry", kEnablePinnedTabsOverflow,
501 std::size(kEnablePinnedTabsOverflow), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37502};
503
ginnnnnnny591a4972022-09-01 16:10:27504const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
505 {autofill::features::kAutofillBrandingIOSParam, "true"}};
506const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
507 {"(Monotone)", kAutofillBrandingIOSMonotone,
508 std::size(kAutofillBrandingIOSMonotone), nullptr}};
509
Scott Yodercb2fe632022-09-12 15:28:35510const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26511 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35512const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
513 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
514 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
515
adamta8886def42023-03-07 19:45:23516const FeatureEntry::FeatureParam
517 kNewTabPageRetentionPopularSitesIncludePopularApps[] = {
518 {ntp_tiles::kNewTabPageRetentionParam, "1"}};
519const FeatureEntry::FeatureParam
520 kNewTabPageRetentionPopularSitesExcludePopularApps[] = {
521 {ntp_tiles::kNewTabPageRetentionParam, "2"}};
522const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideAll[] = {
523 {ntp_tiles::kNewTabPageRetentionParam, "4"}};
524const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideMVTOnly[] =
525 {{ntp_tiles::kNewTabPageRetentionParam, "5"}};
526const FeatureEntry::FeatureVariation kNewTabPageRetentionVariations[] = {
527 {"- Improved popular sites, Include popular apps",
528 kNewTabPageRetentionPopularSitesIncludePopularApps,
529 std::size(kNewTabPageRetentionPopularSitesIncludePopularApps), nullptr},
530 {"- Improved popular sites, Exclude popular apps",
531 kNewTabPageRetentionPopularSitesExcludePopularApps,
532 std::size(kNewTabPageRetentionPopularSitesExcludePopularApps), nullptr},
533 {"- Tile ablation, Hide all", kNewTabPageRetentionTileAblationHideAll,
534 std::size(kNewTabPageRetentionTileAblationHideAll), nullptr},
535 {"- Tile ablation, Hide MVT only",
536 kNewTabPageRetentionTileAblationHideMVTOnly,
537 std::size(kNewTabPageRetentionTileAblationHideMVTOnly), nullptr}};
Benjamin Williamsaa8da8142022-11-14 19:51:03538
Raj T18a2c8c2023-03-15 17:20:15539const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
540 {"date", "true"}};
541const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
542 {"address", "true"}};
543const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
544 {"phonenumber", "true"}};
545const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
546 {"email", "true"}};
547const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
548 {"date", "true"},
549 {"address", "true"},
550 {"phonenumber", "true"},
551 {"email", "true"}};
552const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
553 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
554 std::size(kEnableExpKitTextClassifierAll), nullptr},
555 {"Enabled for date", kEnableExpKitTextClassifierDate,
556 std::size(kEnableExpKitTextClassifierDate), nullptr},
557 {"Enabled for address", kEnableExpKitTextClassifierAddress,
558 std::size(kEnableExpKitTextClassifierAddress), nullptr},
559 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
560 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
561 {"Enabled for email", kEnableExpKitTextClassifierEmail,
562 std::size(kEnableExpKitTextClassifierEmail), nullptr}};
563
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28564const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
565 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
566const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
567 {"with search result page", kEnableExperienceKitMapsWithSrp,
568 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
569
adamta3811f9182022-10-24 17:49:33570const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
571 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
572 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
573const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
574 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
575 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
576
577const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
578 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
579 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
580 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
581 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
582
Quentin Pubert154fc6a2023-01-09 15:58:58583const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
584 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
585const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
586 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
587 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
588
Louis Romero93e9b50a2023-01-26 01:46:12589const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
590 {kTabInactivityThresholdParameterName,
591 kTabInactivityThresholdOneWeekParam}};
592const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
593 {kTabInactivityThresholdParameterName,
594 kTabInactivityThresholdTwoWeeksParam}};
595const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
596 {kTabInactivityThresholdParameterName,
597 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58598const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
599 {kTabInactivityThresholdParameterName,
600 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12601
602const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
603 {"One week", kTabInactivityThresholdOneWeek,
604 std::size(kTabInactivityThresholdOneWeek), nullptr},
605 {"Two weeks", kTabInactivityThresholdTwoWeeks,
606 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
607 {"Three weeks", kTabInactivityThresholdThreeWeeks,
608 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58609 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
610 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12611};
612
Huiting Yud7d2a5322023-02-09 21:14:22613const FeatureEntry::FeatureParam
614 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
615 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
616const FeatureEntry::FeatureParam
617 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
618 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
619const FeatureEntry::FeatureParam
620 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
621 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
622
623const FeatureEntry::FeatureVariation
624 kCredentialProviderExtensionPromoVariations[] = {
625 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
626 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
627 {"On password copied",
628 kCredentialProviderExtensionPromoOnPasswordCopied,
629 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
630 {"On successful login with autofill",
631 kCredentialProviderExtensionPromoOnLoginWithAutofill,
632 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
633 nullptr},
634};
635
Olivier ROBINfd3887b72023-02-23 14:45:42636const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
637 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
638const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
639 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
640 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr}};
641
Olivier ROBIN2ca64952023-02-23 17:11:48642const FeatureEntry::FeatureParam kAddToHomeScreenDisableIncognito[] = {
643 {kAddToHomeScreenDisableIncognitoParam, "true"}};
644const FeatureEntry::FeatureVariation kAddToHomeScreenVariations[] = {
645 {"Disable on incognito", kAddToHomeScreenDisableIncognito,
646 std::size(kAddToHomeScreenDisableIncognito), nullptr}};
647
ginnnnnnny75903622023-03-01 18:00:00648const FeatureEntry::FeatureParam kBringYourOwnTabsIOSBottomMessage[] = {
649 {kBringYourOwnTabsIOSParam, "true"}};
650const FeatureEntry::FeatureVariation kBringYourOwnTabsIOSVariations[] = {
651 {"with bottom message on tab grid", kBringYourOwnTabsIOSBottomMessage,
652 std::size(kBringYourOwnTabsIOSBottomMessage), nullptr}};
653
Cooper Knaak1e026562017-07-26 05:22:28654// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21655// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28656// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
657// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21658// macro for this type supplying the command line to the macro.
659// . MULTI_VALUE: a list of choices, the first of which should correspond to a
660// deactivated state for this lab (i.e. no command line option). To specify
661// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
662// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28663// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
664// either enabled, disabled, or uses the default value of the associated
665// base::Feature instance. To specify this type of entry use the macro
666// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
667// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
668// base::Feature instance. Choices corresponding to the default state, a
669// universally enabled state, and a universally disabled state are
670// automatically included. To specify this type of entry use the macro
671// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
672// the array of choices.
673//
sdefresne14900ee2015-11-27 14:43:21674// See the documentation of FeatureEntry for details on the fields.
675//
676// When adding a new choice, add it to the end of the list.
677const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28678 {"in-product-help-demo-mode-choice",
679 flag_descriptions::kInProductHelpDemoModeName,
680 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
681 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23682 feature_engagement::kIPHDemoMode,
683 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09684 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22685 {"enable-autofill-credit-card-upload",
686 flag_descriptions::kAutofillCreditCardUploadName,
687 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24688 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23689 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
690 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
691 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51692 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23693 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
694 {"wallet-service-use-sandbox",
695 flag_descriptions::kWalletServiceUseSandboxName,
696 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
697 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
698 autofill::switches::kWalletServiceUseSandbox,
699 "1",
700 autofill::switches::kWalletServiceUseSandbox,
701 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59702 {"show-autofill-type-predictions",
703 flag_descriptions::kShowAutofillTypePredictionsName,
704 flag_descriptions::kShowAutofillTypePredictionsDescription,
705 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50706 FEATURE_VALUE_TYPE(
707 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jainb86c94b2023-04-06 14:13:57708 {"autofill-account-profiles-storage",
709 flag_descriptions::kAutofillAccountProfilesStorageName,
710 flag_descriptions::kAutofillAccountProfilesStorageDescription,
711 flags_ui::kOsIos,
712 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfileStorage)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26713 {"autofill-account-profiles-union-view",
714 flag_descriptions::kAutofillAccountProfilesUnionViewName,
715 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
716 flags_ui::kOsIos,
717 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22718 {"autofill-ios-delay-between-fields",
719 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
720 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
721 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05722 {"fullscreen-promos-manager-skip-internal-limits",
723 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
724 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
725 flags_ui::kOsIos,
726 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14727 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53728 flag_descriptions::kFullscreenSmoothScrollingName,
729 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19730 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06731 {"webpage-default-zoom-from-dynamic-type",
732 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
733 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
734 flags_ui::kOsIos,
735 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56736 {"webpage-alternative-text-zoom",
737 flag_descriptions::kWebPageAlternativeTextZoomName,
738 flag_descriptions::kWebPageAlternativeTextZoomDescription,
739 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34740 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
741 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
742 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28743 {"toolbar-container", flag_descriptions::kToolbarContainerName,
744 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
745 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13746 {"omnibox-ui-max-autocomplete-matches",
747 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
748 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
749 flags_ui::kOsIos,
750 FEATURE_WITH_PARAMS_VALUE_TYPE(
751 omnibox::kUIExperimentMaxAutocompleteMatches,
752 kOmniboxUIMaxAutocompleteMatchesVariations,
753 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35754 {"omnibox-local-history-zero-suggest-beyond-ntp",
755 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
756 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
757 flags_ui::kOsIos,
758 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54759 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
760 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
761 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
762 kOmniboxMaxZPSMatchesVariations,
763 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45764
765 {"omnibox-most-visited-tiles-on-srp",
766 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
767 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
768 flags_ui::kOsIos,
769 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30770 {"autofill-use-mobile-label-disambiguation",
771 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
772 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
773 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45774 FEATURE_WITH_PARAMS_VALUE_TYPE(
775 autofill::features::kAutofillUseMobileLabelDisambiguation,
776 kAutofillUseMobileLabelDisambiguationVariations,
777 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46778 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
779 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30780 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48781 {"force-startup-signin-promo",
782 flag_descriptions::kForceStartupSigninPromoName,
783 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29784 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06785 {"identity-status-consistency",
786 flag_descriptions::kIdentityStatusConsistencyName,
787 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
788 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22789 {"restore-session-from-cache",
790 flag_descriptions::kRestoreSessionFromCacheName,
791 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49792 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09793 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
794 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
795 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41796 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
797 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
798 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13799#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45800 {"screen-time-integration-ios",
801 flag_descriptions::kScreenTimeIntegrationName,
802 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
803 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13804#endif
Nazerke3e993f72020-09-21 13:00:06805 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
806 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
807 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55808 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
809 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14811 {"default-browser-fullscreen-promo-experiment",
812 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
813 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
814 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59815 FEATURE_WITH_PARAMS_VALUE_TYPE(
816 kDefaultBrowserFullscreenPromoExperiment,
817 kDefaultBrowserFullscreenPromoExperimentVariations,
818 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11819 {"ios-shared-highlighting-color-change",
820 flag_descriptions::kIOSSharedHighlightingColorChangeName,
821 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07822 flags_ui::kOsIos,
823 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34824 {"ios-shared-highlighting-v2",
825 flag_descriptions::kIOSSharedHighlightingV2Name,
826 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
827 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45828 {"omnibox-new-textfield-implementation",
829 flag_descriptions::kOmniboxNewImplementationName,
830 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26832 {"omnibox-on-focus-suggestions-contextual-web",
833 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
834 flag_descriptions::
835 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
836 flags_ui::kOsIos,
837 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
838 {"omnibox-on-focus-suggestions-srp",
839 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
840 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
841 flags_ui::kOsIos,
842 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12843 {"omnibox-report-assisted-query-stats",
844 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
845 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
846 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
847 {"omnibox-report-searchbox-stats",
848 flag_descriptions::kOmniboxReportSearchboxStatsName,
849 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
850 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15851 {"omnibox-fuzzy-url-suggestions",
852 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
853 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
854 flags_ui::kOsIos,
855 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19856 {"start-surface", flag_descriptions::kStartSurfaceName,
857 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23858 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
859 kStartSurfaceVariations,
860 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42861 {"autofill-address-verification-in-save-prompt",
862 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
863 flag_descriptions::
864 kEnableAutofillAddressSavePromptAddressVerificationDescription,
865 flags_ui::kOsIos,
866 FEATURE_VALUE_TYPE(
867 autofill::features::
868 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25869 {"filling-across-affiliated-websites",
870 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
871 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
872 flags_ui::kOsIos,
873 FEATURE_VALUE_TYPE(
874 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19875 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
876 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
877 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34878 {"wait-threshold-seconds-for-capabilities-api",
879 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
880 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
881 flags_ui::kOsIos,
882 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23883 {"autofill-fill-merchant-promo-code-fields",
884 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
885 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
886 flags_ui::kOsIos,
887 FEATURE_VALUE_TYPE(
888 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03889 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
890 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
891 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18892 {"new-overflow-menu-alternate-iph",
893 flag_descriptions::kNewOverflowMenuAlternateIPHName,
894 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
895 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24896 {"use-lens-to-search-for-image",
897 flag_descriptions::kUseLensToSearchForImageName,
898 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44899 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22900 {"enable-lens-in-home-screen-widget",
901 flag_descriptions::kEnableLensInHomeScreenWidgetName,
902 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
903 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
904 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
905 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
906 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
907 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
908 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
909 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03910 {"enable-lens-context-menu-alt-text",
911 flag_descriptions::kEnableLensContextMenuAltTextName,
912 flag_descriptions::kEnableLensContextMenuAltTextDescription,
913 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44914 {"enable-lens-in-omnibox-copied-image",
915 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
916 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
917 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40918 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23919 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
920 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40921 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23922 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03923 {"enable-disco-feed-endpoint",
924 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
925 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
926 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11927 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15928 {"enable-discover-feed-top-sync-promo",
929 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
930 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
931 flags_ui::kOsIos,
932 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
933 kDiscoverFeedTopSyncPromoVariations,
934 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14935 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
936 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
937 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
938 kFeedHeaderSettingsVariations,
939 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28940 {"shared-highlighting-amp",
941 flag_descriptions::kIOSSharedHighlightingAmpName,
942 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
943 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28944 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42945 commerce::flag_descriptions::kCommercePriceTrackingName,
946 commerce::flag_descriptions::kCommercePriceTrackingDescription,
947 flags_ui::kOsIos,
948 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
949 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15950 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06951 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
952 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
953 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54954 {"ntp-view-hierarchy-repair",
955 flag_descriptions::kNTPViewHierarchyRepairName,
956 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20957 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26958 {"synthesized-restore-session",
959 flag_descriptions::kSynthesizedRestoreSessionName,
960 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
961 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18962 {"ios-media-permissions-control",
963 flag_descriptions::kMediaPermissionsControlName,
964 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26966 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
967 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01969 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
970 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
971 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43972 {"enable-tailored-security-integration",
973 flag_descriptions::kTailoredSecurityIntegrationName,
974 flag_descriptions::kTailoredSecurityIntegrationDescription,
975 flags_ui::kOsIos,
976 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26977 {"autofill-enable-card-product-name",
978 flag_descriptions::kAutofillEnableCardProductNameName,
979 flag_descriptions::kAutofillEnableCardProductNameDescription,
980 flags_ui::kOsIos,
981 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00982 {"send-tab-to-self-signin-promo",
983 flag_descriptions::kSendTabToSelfSigninPromoName,
984 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
985 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22986 {"autofill-enforce-delays-in-strike-database",
987 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
988 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
989 flags_ui::kOsIos,
990 FEATURE_VALUE_TYPE(
991 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41992 {"autofill-upstream-allow-additional-email-domains",
993 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
994 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
995 flags_ui::kOsIos,
996 FEATURE_VALUE_TYPE(
997 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
998 {"autofill-upstream-allow-all-email-domains",
999 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
1000 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
1001 flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(
1003 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521004 {"enable-download-service-foreground-session",
1005 flag_descriptions::kDownloadServiceForegroundSessionName,
1006 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1007 flags_ui::kOsIos,
1008 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231009 {"enable-tflite-language-detection",
1010 flag_descriptions::kTFLiteLanguageDetectionName,
1011 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1012 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201013 {"optimization-guide-debug-logs",
1014 flag_descriptions::kOptimizationGuideDebugLogsName,
1015 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1016 flags_ui::kOsIos,
1017 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Daniel Whited02b6962023-02-14 14:19:551018 {"optimization-guide-push-notifications",
1019 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1020 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1021 flags_ui::kOsIos,
1022 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Olivier Robinffe767c2022-04-21 13:13:231023 {"optimization-guide-model-downloading",
1024 flag_descriptions::kOptimizationGuideModelDownloadingName,
1025 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
1026 flags_ui::kOsIos,
1027 FEATURE_VALUE_TYPE(
1028 optimization_guide::features::kOptimizationGuideModelDownloading)},
1029 {"optimization-target-prediction",
1030 flag_descriptions::kOptimizationTargetPredictionName,
1031 flag_descriptions::kOptimizationTargetPredictionDescription,
1032 flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(
1034 optimization_guide::features::kOptimizationTargetPrediction)},
Benjamin Williams11f39912023-04-13 19:00:251035 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
1036 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
1037 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Rushan Suleymanov727309602022-04-28 20:08:541038 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1039 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1040 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1041 {"sync-standalone-invalidations-wallet-and-offer",
1042 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1043 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1044 flags_ui::kOsIos,
1045 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011046 {"suggestions-scrolling-ipad",
1047 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1048 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1049 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001050 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1051 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1052 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251053 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1054 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331055 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551056 {"experience-kit-apple-calendar",
1057 flag_descriptions::kAppleCalendarExperienceKitName,
1058 flag_descriptions::kAppleCalendarExperienceKitDescription,
1059 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081060 {"enable-expkit-text-classifier",
1061 flag_descriptions::kEnableExpKitTextClassifierName,
1062 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151063 flags_ui::kOsIos,
1064 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1065 kEnableExpKitTextClassifierVariations,
1066 "ExpKitTextClassifier")},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:181067 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
1068 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:281069 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
1070 kEnableExperienceKitMapsVariations,
1071 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:051072 {"enable-long-press-surrounding-text",
1073 flag_descriptions::kLongPressSurroundingTextName,
1074 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
1075 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331076 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1077 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1078 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011079 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1080 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1081 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251082 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1083 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1084 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:221085 {"smart-sorting-new-overflow-menu",
1086 flag_descriptions::kSmartSortingNewOverflowMenuName,
1087 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
1088 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251089 {"smart-sorting-price-tracking-destination",
1090 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1091 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1092 flags_ui::kOsIos,
1093 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441094 {"new-overflow-menu-share-chrome-action",
1095 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1096 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1097 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301098 {"autofill-enable-ranking-formula-address-profiles",
1099 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1100 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1101 flags_ui::kOsIos,
1102 FEATURE_VALUE_TYPE(
1103 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391104 {"autofill-enable-ranking-formula-credit-cards",
1105 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1106 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1107 flags_ui::kOsIos,
1108 FEATURE_VALUE_TYPE(
1109 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021110 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1111 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1112 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021113 {"enable-feed-bottom-sign-in-promo",
1114 flag_descriptions::kEnableFeedBottomSignInPromoName,
1115 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1116 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1117 {"enable-feed-card-menu-sign-in-promo",
1118 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1119 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1120 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Luc36e3962023-04-11 21:50:521121 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1122 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
1123 FEATURE_VALUE_TYPE(kMagicStack)},
Chris Lu7f024ed2c2022-05-27 23:11:271124 {"content-suggestions-ui-module-refresh",
1125 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1126 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401127 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581128 FEATURE_WITH_PARAMS_VALUE_TYPE(
1129 kContentSuggestionsUIModuleRefresh,
1130 kModuleRefreshVariations,
1131 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Olivier Robin058c1fad2022-05-31 18:24:061132 {"default-browser-intents-show-settings",
1133 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1134 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1135 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451136 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1137 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421138 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1139 kDmTokenDeletionVariation,
1140 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191141 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1142 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1143 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Scott Yoder16bff3c2023-03-24 16:00:551144 {"ios-set-up-list", flag_descriptions::kIOSSetUpListName,
1145 flag_descriptions::kIOSSetUpListDescription, flags_ui::kOsIos,
1146 FEATURE_VALUE_TYPE(kIOSSetUpList)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291147 {"ios-password-manager-cross-origin-iframe-support",
1148 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1149 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1150 flags_ui::kOsIos,
1151 FEATURE_VALUE_TYPE(password_manager::features::
1152 kIOSPasswordManagerCrossOriginIframeSupport)},
Veronique Nguyenc3d7db52023-03-08 22:52:321153 {"ios-password-bottom-sheet",
1154 flag_descriptions::kIOSPasswordBottomSheetName,
1155 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1156 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
adamta8886def42023-03-07 19:45:231157 {"ios-new-tab-page-retention", flag_descriptions::kNewTabPageRetentionName,
1158 flag_descriptions::kNewTabPageRetentionDescription, flags_ui::kOsIos,
1159 FEATURE_WITH_PARAMS_VALUE_TYPE(ntp_tiles::kNewTabPageRetention,
1160 kNewTabPageRetentionVariations,
1161 ntp_tiles::kNewTabPageRetentionName)},
Christian Xud105a1352022-06-17 19:54:141162 {"omnibox-adaptive-suggestions-count",
1163 flag_descriptions::kAdaptiveSuggestionsCountName,
1164 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1165 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201166 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1167 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581168 FEATURE_WITH_PARAMS_VALUE_TYPE(
1169 kTrendingQueriesModule,
1170 kTrendingQueriesModuleVariations,
1171 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321172 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191173 flag_descriptions::kAutofillParseIBANFieldsName,
1174 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1175 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Moe Ahmadi098519d82022-07-27 18:34:241176 {"omnibox-zero-suggest-prefetching",
1177 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1178 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1179 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451180 {"omnibox-zero-suggest-prefetching-on-srp",
1181 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1182 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1183 flags_ui::kOsIos,
1184 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1185 {"omnibox-zero-suggest-prefetching-on-web",
1186 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1187 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1188 flags_ui::kOsIos,
1189 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471190 {"omnibox-zero-suggest-in-memory-caching",
1191 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1192 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1193 flags_ui::kOsIos,
1194 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351195 {"omnibox-on-device-tail-suggestions",
1196 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1197 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1198 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosbde5d5d2023-03-31 13:18:371199 {"enable-browser-lockdown-mode",
1200 flag_descriptions::kEnableBrowserLockdownModeName,
1201 flag_descriptions::kEnableBrowserLockdownModeDescription, flags_ui::kOsIos,
1202 FEATURE_VALUE_TYPE(web::kEnableBrowserLockdownMode)},
Joemer Ramosada1e852023-03-10 19:14:411203 {"enable-button-configuration-usage",
1204 flag_descriptions::kEnableUIButtonConfigurationName,
1205 flag_descriptions::kEnableUIButtonConfigurationDescription,
1206 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Vincent Boissellead6cbe22022-07-04 19:32:391207 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1208 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501209 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491210 {"enable-sync-history-datatype",
1211 flag_descriptions::kSyncEnableHistoryDataTypeName,
1212 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1213 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361214 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1215 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1216 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1217 kOmniboxMaxURLMatchesVariations,
1218 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061219 {"metrickit-non-crash-reports",
1220 flag_descriptions::kMetrickitNonCrashReportName,
1221 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1222 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371223 {"autofill-enable-remade-downstream-metrics",
1224 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1225 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1226 flags_ui::kOsIos,
1227 FEATURE_VALUE_TYPE(
1228 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551229 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1230 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1231 flag_descriptions::
1232 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1233 flags_ui::kOsIos,
1234 FEATURE_VALUE_TYPE(
1235 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse1a168ef2023-03-24 10:39:531236 {"default-browser-refactoring-promo-manager",
1237 flag_descriptions::kDefaultBrowserRefactoringPromoManagerName,
1238 flag_descriptions::kDefaultBrowserRefactoringPromoManagerDescription,
1239 flags_ui::kOsIos,
1240 FEATURE_VALUE_TYPE(kDefaultBrowserRefactoringPromoManager)},
Ed Chin91e44992022-07-27 13:42:341241#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1242 {"feed-background-refresh-ios",
1243 flag_descriptions::kFeedBackgroundRefreshName,
1244 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1245 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1246 kFeedBackgroundRefreshVariations,
1247 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261248#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291249 {"feed-invisible-foreground-refresh-ios",
1250 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1251 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1252 flags_ui::kOsIos,
1253 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1254 kFeedInvisibleForegroundRefreshVariations,
1255 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191256 {"omnibox-keyboard-paste-button",
1257 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1258 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1259 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261260
Aliona DANGLAa5257ccc2022-08-29 14:01:491261 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1262 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1263 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1264 kOpenInDownloadVariations,
1265 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171266 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1267 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411268 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1269 kWhatsNewLayoutVariations,
1270 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271271 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1272 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1273 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1274 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051275 "AutofillBrandingIOS")},
1276 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1277 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1278 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351279 {"ios-new-post-restore-experience",
1280 flag_descriptions::kIOSNewPostRestoreExperienceName,
1281 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1282 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261283 FEATURE_WITH_PARAMS_VALUE_TYPE(
1284 post_restore_signin::features::kIOSNewPostRestoreExperience,
1285 kIOSNewPostRestoreExperienceVariations,
1286 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021287 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1288 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501290 {"enable-tflite-language-detection-ignore",
1291 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1292 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1293 flags_ui::kOsIos,
1294 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Tina Wang89ae4252022-10-14 00:39:471295 {"enable-check-visibility-on-attention-log-start",
1296 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1297 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1298 flags_ui::kOsIos,
1299 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1300 {"enable-refine-data-source-reload-reporting",
1301 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1302 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1303 flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041305 {"enable-passwords-account-storage",
1306 flag_descriptions::kEnablePasswordsAccountStorageName,
1307 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1308 flags_ui::kOsIos,
1309 FEATURE_VALUE_TYPE(
1310 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331311 {"enable-default-following-feed-sort-type",
1312 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1313 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1314 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201315 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331316 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201317 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131318 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1319 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1320 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201321 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011322 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1323 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371324 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1325 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1326 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1327 kEnablePinnedTabsVariations,
1328 "EnablePinnedTabs")},
Hira Mahmoodea109752022-11-17 17:45:411329 {"credential-provider-extension-promo",
1330 flag_descriptions::kCredentialProviderExtensionPromoName,
1331 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221332 flags_ui::kOsIos,
1333 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1334 kCredentialProviderExtensionPromoVariations,
1335 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521336 {"default-browser-blue-dot-promo",
1337 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1338 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1339 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271340 {"ios-force-translate-enabled",
1341 flag_descriptions::kIOSForceTranslateEnabledName,
1342 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1343 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251344 {"iph-price-notifications-while-browsing",
1345 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1346 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(
1349 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411350 {"autofill-offer-to-save-card-with-same-last-four",
1351 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1352 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1353 flags_ui::kOsIos,
1354 FEATURE_VALUE_TYPE(
1355 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041356 {"omnibox-multiline-search-suggest",
1357 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1358 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1359 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501360 {"autofill-suggest-server-card-instead-of-local-card",
1361 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1362 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1363 flags_ui::kOsIos,
1364 FEATURE_VALUE_TYPE(
1365 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581366 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1367 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1368 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1369 kNativeFindInPageVariations,
1370 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551371 {"intents-on-email", flag_descriptions::kEmailName,
1372 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331373 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341374 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1375 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1376 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351377 {"multiline-fade-truncating-label",
1378 flag_descriptions::kMultilineFadeTruncatingLabelName,
1379 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1380 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301381 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1382 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1383 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391384 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1385 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1386 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Louis Romero93e9b50a2023-01-26 01:46:121387 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1388 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1389 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1390 kTabInactivityThresholdVariations,
1391 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411392 {"enable-feed-image-caching",
1393 flag_descriptions::kEnableFeedImageCachingName,
1394 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1395 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1396 {"enable-feed-synthetic-capabilities",
1397 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1398 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1399 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561400 {"ios-show-password-storage-in-save-infobar",
1401 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1402 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1403 flags_ui::kOsIos,
1404 FEATURE_VALUE_TYPE(
1405 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Louis Romero58f355022023-02-13 19:04:311406 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1407 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1408 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421409 {"ios-edit-menu-partial-translate",
1410 flag_descriptions::kIOSEditMenuPartialTranslateName,
1411 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421412 flags_ui::kOsIos,
1413 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1414 kIOSEditMenuPartialTranslateVariations,
1415 "IOSEditMenuPartialTranslate")},
Olivier Robin7057bd72023-02-16 18:35:201416 {"ios-custom-browser-edit-menu",
1417 flag_descriptions::kIOSCustomBrowserEditMenuName,
1418 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1419 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Ali Juma57849c42023-02-21 22:53:431420 {"notification-settings-menu-item",
1421 flag_descriptions::kNotificationSettingsMenuItemName,
1422 flag_descriptions::kNotificationSettingsMenuItemDescription,
1423 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
rgodba72acf82023-02-20 10:29:351424 {"password-notes", flag_descriptions::kPasswordNotesWithBackupName,
1425 flag_descriptions::kPasswordNotesWithBackupDescription, flags_ui::kOsIos,
1426 FEATURE_VALUE_TYPE(syncer::kPasswordNotesWithBackup)},
Ed Chin97560fc42023-02-20 16:48:321427 {"feed-experiment-tagging-ios",
1428 flag_descriptions::kFeedExperimentTaggingName,
1429 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1430 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061431 {"spotlight-reading-list-source",
1432 flag_descriptions::kSpotlightReadingListSourceName,
1433 flag_descriptions::kSpotlightReadingListSourceDescription,
1434 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
kalettuced6ba72cb2023-02-22 00:55:381435 {"consistency-new-account-interface",
1436 flag_descriptions::kConsistencyNewAccountInterfaceName,
1437 flag_descriptions::kConsistencyNewAccountInterfaceDescription,
1438 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kConsistencyNewAccountInterface)},
Olivier ROBINabcb8ce2023-02-22 13:55:201439 {"add-to-home-screen", flag_descriptions::kAddToHomeScreenName,
1440 flag_descriptions::kAddToHomeScreenDescription, flags_ui::kOsIos,
Olivier ROBIN2ca64952023-02-23 17:11:481441 FEATURE_WITH_PARAMS_VALUE_TYPE(kAddToHomeScreen,
1442 kAddToHomeScreenVariations,
1443 "IOSEditMenuPartialTranslate")},
Salma Elmahallawy72c5d34d2023-02-27 23:44:421444 {"policy-logs-page-ios", flag_descriptions::kPolicyLogsPageIOSName,
1445 flag_descriptions::kPolicyLogsPageIOSDescription, flags_ui::kOsIos,
1446 FEATURE_VALUE_TYPE(policy::features::kPolicyLogsPageIOS)},
Vincent Boisselle6e9780c2023-02-25 01:05:341447 {"indicate-account-storage-error-in-account-cell",
1448 flag_descriptions::kIndicateAccountStorageErrorInAccountCellName,
1449 flag_descriptions::kIndicateAccountStorageErrorInAccountCellDescription,
1450 flags_ui::kOsIos,
Mikel Astize597fc82023-03-22 01:39:491451 FEATURE_VALUE_TYPE(syncer::kIndicateAccountStorageErrorInAccountCell)},
Menghan YANGf3fe2de52023-02-27 16:38:501452 {"enable-bookmarks-account-storage",
1453 flag_descriptions::kEnableBookmarksAccountStorageName,
1454 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1455 flags_ui::kOsIos,
1456 FEATURE_VALUE_TYPE(bookmarks::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531457 {"web-feed-feedback-reroute",
1458 flag_descriptions::kWebFeedFeedbackRerouteName,
1459 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1460 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551461 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1462 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1463 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
ginnnnnnny75903622023-03-01 18:00:001464 {"bring-your-own-tabs-ios", flag_descriptions::kBringYourOwnTabsIOSName,
1465 flag_descriptions::kBringYourOwnTabsIOSDescription, flags_ui::kOsIos,
1466 FEATURE_WITH_PARAMS_VALUE_TYPE(kBringYourOwnTabsIOS,
1467 kBringYourOwnTabsIOSVariations,
1468 "BringYourOwnTabsIOS")},
Tina Wangd3f6f192023-04-05 05:22:431469 {"enable-follow-IPH-exp-params",
1470 flag_descriptions::kEnableFollowIPHExpParamsName,
1471 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1472 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031473 {"enable-follow-management-instant-reload",
1474 flag_descriptions::kEnableFollowManagementInstantReloadName,
1475 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1476 flags_ui::kOsIos,
1477 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Mustafa Acerc8c0b152023-03-09 02:41:441478 {"mixed-content-autoupgrade-ios",
1479 flag_descriptions::kMixedContentAutoupgradeName,
1480 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1481 FEATURE_VALUE_TYPE(
1482 security_interstitials::features::kMixedContentAutoupgrade)},
Menghan YANGc4c94ea22023-03-09 12:48:241483 {"enable-email-in-bookmarks-reading-list-snackbar",
1484 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarName,
1485 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarDescription,
1486 flags_ui::kOsIos,
1487 FEATURE_VALUE_TYPE(kEnableEmailInBookmarksReadingListSnackbar)},
Jared Saul5363f3962023-03-10 23:03:511488 {"autofill-upstream-authenticate-preflight-call",
1489 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallName,
1490 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallDescription,
1491 flags_ui::kOsIos,
1492 FEATURE_VALUE_TYPE(
1493 autofill::features::kAutofillUpstreamAuthenticatePreflightCall)},
Marc Treibe9f79ea72023-03-14 10:25:421494 {"enable-preferences-account-storage",
1495 flag_descriptions::kEnablePreferencesAccountStorageName,
1496 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1497 flags_ui::kOsIos,
1498 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Vincent Boisselle92fa8c472023-03-20 21:35:511499 {"indicate-identity-error-overflow-menu",
1500 flag_descriptions::kIndicateIdentityErrorInOverflowMenuName,
1501 flag_descriptions::kIndicateIdentityErrorInOverflowMenuDescription,
1502 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIndicateSyncErrorInOverflowMenu)},
Olivier ROBINa229d2132023-03-21 12:44:201503 {"ios-browser-edit-menu-metrics",
1504 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1505 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1506 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Gauthier Ambardb27b29c2023-03-29 07:43:441507 {"sf-symbols-follow-up", flag_descriptions::kSFSymbolsFollowUpName,
1508 flag_descriptions::kSFSymbolsFollowUpDescription, flags_ui::kOsIos,
1509 FEATURE_VALUE_TYPE(kSFSymbolsFollowUp)},
Menghan YANG5b3a78a2023-03-24 17:38:261510 {"enable-reading-list-account-storage",
1511 flag_descriptions::kEnableReadingListAccountStorageName,
1512 flag_descriptions::kEnableReadingListAccountStorageDescription,
1513 flags_ui::kOsIos,
1514 FEATURE_VALUE_TYPE(
1515 reading_list::switches::kReadingListEnableDualReadingListModel)},
1516 {"enable-reading-list-sign-in-promo",
1517 flag_descriptions::kEnableReadingListSignInPromoName,
1518 flag_descriptions::kEnableReadingListSignInPromoDescription,
1519 flags_ui::kOsIos,
1520 FEATURE_VALUE_TYPE(reading_list::switches::
1521 kReadingListEnableSyncTransportModeUponSignIn)},
Asami Doi2f2d6dc2023-03-30 12:31:191522 {"fix-pdf-snapshot", flag_descriptions::kPDFSnapshotName,
1523 flag_descriptions::kPDFSnapshotDescription, flags_ui::kOsIos,
1524 FEATURE_VALUE_TYPE(kPDFSnapshot)},
Stepan Khapuginb2f49522023-04-03 18:25:241525 {"omnibox-grouping-framework-zps",
1526 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1527 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1528 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1529 {"omnibox-grouping-framework-non-zps",
1530 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1531 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1532 flags_ui::kOsIos,
1533 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471534 {"enable-session-serialization-optimizations",
1535 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1536 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1537 flags_ui::kOsIos,
1538 FEATURE_VALUE_TYPE(
1539 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411540 {"bottom-omnibox-steady-state",
1541 flag_descriptions::kBottomOmniboxSteadyStateName,
1542 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1543 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Jared Saul19f8ba12023-04-11 17:44:531544 {"autofill-upstream-use-alternate-secure-data-type",
1545 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeName,
1546 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeDescription,
1547 flags_ui::kOsIos,
1548 FEATURE_VALUE_TYPE(
1549 autofill::features::kAutofillUpstreamUseAlternateSecureDataType)},
Robbie Gibson0ea280602023-04-12 01:02:391550 {"only-access-clipboard-async",
1551 flag_descriptions::kOnlyAccessClipboardAsyncName,
1552 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1553 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Christian Xue5f60232023-04-12 17:50:091554 {"omnibox-tail-suggest", flag_descriptions::kOmniboxTailSuggestName,
1555 flag_descriptions::kOmniboxTailSuggestDescription, flags_ui::kOsIos,
1556 FEATURE_VALUE_TYPE(kOmniboxTailSuggest)},
Louis Romero93e9b50a2023-01-26 01:46:121557};
sdefresne14900ee2015-11-27 14:43:211558
Rohit Raobed794c2020-04-27 15:27:451559bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1560 return false;
1561}
1562
1563flags_ui::FlagsState& GetGlobalFlagsState() {
1564 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1565 nullptr);
1566 return *flags_state;
1567}
David Jean5ca263c2021-08-18 09:19:301568// Creates the experimental test policies map, used by AsyncPolicyLoader and
1569// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341570NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211571 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1572
Guillaume Jenkins25e9bd72020-08-27 17:39:061573 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551574 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061575 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551576
Guillaume Jenkins25e9bd72020-08-27 17:39:061577 // Set some sample policy values for testing if EnableSamplePolicies is set to
1578 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401579 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551580 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011581 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1582
Guillaume Jenkinseeb7007c2020-06-25 22:55:401583 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1584
1585 // 2 = Disable all variations
1586 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1587
1588 // 2 = Do not allow any site to show popups
1589 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1590
Tina Wang5abee802020-07-29 23:09:521591 // Set default search engine.
1592 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1593 @YES,
1594 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1595 @"http://www.google.com/search?q={searchTerms}",
1596 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021597 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521598
Tina Wang89068c82020-10-29 15:51:501599 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1600
Gauthier Ambard21b23702021-04-16 16:11:271601 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1602
Tina Wang59d0b7e2020-08-11 04:41:011603 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531604
1605 // 2 = Enhanced safe browsing protection
1606 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1607
1608 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291609
1610 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551611 }];
1612 }
1613
Ewann227a3c02021-04-19 12:04:541614 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041615 NSString* sync_policy_key =
1616 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301617 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541618 }
Ewann227a3c02021-04-19 12:04:541619
Ewann570a6302021-08-17 07:22:421620 // SyncTypesListDisabled policy.
1621 NSString* Sync_types_list_disabled_key =
1622 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1623 NSMutableArray* Sync_types_list_disabled_values =
1624 [[NSMutableArray alloc] init];
1625 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1626 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1627 }
1628 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1629 [Sync_types_list_disabled_values addObject:@"readingList"];
1630 }
1631 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1632 [Sync_types_list_disabled_values addObject:@"preferences"];
1633 }
1634 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1635 [Sync_types_list_disabled_values addObject:@"passwords"];
1636 }
1637 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1638 [Sync_types_list_disabled_values addObject:@"autofill"];
1639 }
1640 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1641 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1642 }
1643 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1644 [Sync_types_list_disabled_values addObject:@"tabs"];
1645 }
1646 if ([Sync_types_list_disabled_values count]) {
1647 [testing_policies addEntriesFromDictionary:@{
1648 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1649 }];
Ewann570a6302021-08-17 07:22:421650 }
1651
Gauthier Ambard073eaa92021-11-22 15:24:131652 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521653 NSString* incognito_policy_key =
1654 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1655 NSInteger incognito_mode_availability =
1656 [defaults integerForKey:incognito_policy_key];
1657 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521658 [testing_policies addEntriesFromDictionary:@{
1659 incognito_policy_key : @(incognito_mode_availability),
1660 }];
1661 }
1662
Ewann40a8f8a2021-07-29 10:01:201663 NSString* restriction_pattern =
1664 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1665 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291666 NSString* restrict_key =
1667 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201668 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291669 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201670 }];
1671 }
1672
Vincent Boisselle19200bc2021-09-01 17:58:251673 // If the sign-in policy is set (not "None"), add the policy key to the list
1674 // of enabled experimental policies, and set the value.
1675 NSString* const kSigninPolicyKey = @"BrowserSignin";
1676 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1677 if (signin_policy_mode) {
1678 // Remove the mode offset that was used to represent the unset policy.
1679 --signin_policy_mode;
1680 DCHECK(signin_policy_mode >= 0);
1681
Vincent Boisselle19200bc2021-09-01 17:58:251682 [testing_policies addEntriesFromDictionary:@{
1683 kSigninPolicyKey : @(signin_policy_mode),
1684 }];
1685 }
1686
Veronique Nguyen9b1044f2022-01-11 14:41:131687 // If the New Tab Page URL is set (not empty) add the value to the list of
1688 // test policies.
1689 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1690 if ([ntp_location length] > 0) {
1691 NSString* ntp_location_key =
1692 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1693 [testing_policies
1694 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571695 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131696 }
1697
Ali Juma9ec36d22022-03-28 14:53:121698 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1699 NSString* allow_backups_key =
1700 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1701 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1702 [allowed_experimental_policies addObject:allow_backups_key];
1703 }
1704
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241705 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1706 NSString* password_manager_key =
1707 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1708 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1709 [allowed_experimental_policies addObject:password_manager_key];
1710 }
Arthur Milchiorbb44f5c82023-03-14 16:14:461711 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1712 NSString* managed_bookmarks_key =
1713 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1714 NSString* managed_bookmarks_value =
1715 base::SysUTF8ToNSString("["
1716 // The following gets filtered out from
1717 // the JSON string when parsed.
1718 " {"
Jérôme Lebelaaf24de2023-03-15 22:00:111719 " \"toplevel_name\": \"Managed Bookmarks\""
Arthur Milchiorbb44f5c82023-03-14 16:14:461720 " },"
1721 " {"
1722 " \"name\": \"Google\","
1723 " \"url\": \"google.com\""
1724 " },"
1725 " {"
1726 " \"name\": \"Empty Folder\","
1727 " \"children\": []"
1728 " },"
1729 " {"
1730 " \"name\": \"Big Folder\","
1731 " \"children\": ["
1732 " {"
1733 " \"name\": \"Youtube\","
1734 " \"url\": \"youtube.com\""
1735 " },"
1736 " {"
1737 " \"name\": \"Chromium\","
1738 " \"url\": \"chromium.org\""
1739 " },"
1740 " {"
1741 " \"name\": \"More Stuff\","
1742 " \"children\": ["
1743 " {"
1744 " \"name\": \"Bugs\","
1745 " \"url\": \"crbug.com\""
1746 " }"
1747 " ]"
1748 " }"
1749 " ]"
1750 " }"
1751 "]");
1752 [testing_policies addEntriesFromDictionary:@{
1753 managed_bookmarks_key : managed_bookmarks_value
1754 }];
1755 [allowed_experimental_policies addObject:managed_bookmarks_key];
1756 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241757
Guillaume Jenkins25e9bd72020-08-27 17:39:061758 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1759 // policy.
1760 if ([allowed_experimental_policies count] > 0) {
1761 [testing_policies setValue:allowed_experimental_policies
1762 forKey:base::SysUTF8ToNSString(
1763 policy::key::kEnableExperimentalPolicies)];
1764 }
1765
jlebel2eb40222022-05-06 11:15:421766 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1767 switch ([defaults integerForKey:metrics_reporting_key]) {
1768 case 1:
1769 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131770 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421771 break;
1772 case 2:
1773 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131774 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421775 break;
1776 default:
1777 // Metrics reporting not managed.
1778 break;
1779 }
1780
David Jean6f85d44f2021-08-19 08:08:451781 // Warning: Add new flags to TestingPoliciesHash() below.
1782
David Jean5ca263c2021-08-18 09:19:301783 return testing_policies;
1784}
David Jean6f85d44f2021-08-19 08:08:451785
David Jean5ca263c2021-08-18 09:19:301786} // namespace
1787
Gauthier Ambard02dbf022022-08-23 08:28:471788// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301789void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1790 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1791
1792 // Set the UA flag if UseMobileSafariUA is enabled.
1793 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1794 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1795 // Chrome puts its product token.
1796 int32_t major = 0;
1797 int32_t minor = 0;
1798 int32_t bugfix = 0;
1799 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1800 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1801
1802 command_line->AppendSwitchASCII(switches::kUserAgent,
1803 web::BuildMobileUserAgent(product));
1804 }
1805
1806 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341807 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301808
1809 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1810 // Management to enabled and add the token to the list of policies.
1811 NSString* token_key =
1812 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1813 NSString* token = [defaults stringForKey:token_key];
1814
1815 if ([token length] > 0) {
1816 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1817 [testing_policies setValue:token forKey:token_key];
1818 }
1819
Guillaume Jenkins57606d72020-08-13 17:32:551820 // If some policies were set, commit them to the app's registration defaults.
1821 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401822 NSDictionary* registration_defaults =
1823 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1824 [defaults registerDefaults:registration_defaults];
1825 }
1826
sdefresne14900ee2015-11-27 14:43:211827 // Freeform commandline flags. These are added last, so that any flags added
1828 // earlier in this function take precedence.
1829 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1830 base::CommandLine::StringVector flags;
1831 // Append an empty "program" argument.
1832 flags.push_back("");
1833
1834 // The number of flags corresponds to the number of text fields in
1835 // Experimental.plist.
1836 const int kNumFreeformFlags = 5;
1837 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1838 NSString* key =
1839 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1840 NSString* flag = [defaults stringForKey:key];
1841 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331842 // iOS keyboard replaces -- with —, so undo that.
1843 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1844 withString:@"--"
1845 options:0
1846 range:NSMakeRange(0, 1)];
1847 // To make things easier, allow flags with no dashes by prepending them
1848 // here. This also allows for flags that just have one dash if they
1849 // exist.
1850 if (![flag hasPrefix:@"-"]) {
1851 flag = [@"--" stringByAppendingString:flag];
1852 }
sdefresne14900ee2015-11-27 14:43:211853 flags.push_back(base::SysNSStringToUTF8(flag));
1854 }
1855 }
1856
1857 base::CommandLine temp_command_line(flags);
1858 command_line->AppendArguments(temp_command_line, false);
1859 }
msardafc76f662017-02-24 12:46:281860
justincohendacc85d2017-06-28 23:34:101861 // Populate command line flag for 3rd party keyboard omnibox workaround.
1862 NSString* enableThirdPartyKeyboardWorkaround =
1863 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1864 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1865 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1866 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1867 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1868 }
1869
Sylvain Defresned3cd8d92022-01-18 13:35:081870 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211871}
1872
sdefresne14900ee2015-11-27 14:43:211873void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1874 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181875 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111876 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531877 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211878}
1879
jkrcalbf073372016-07-29 07:21:311880std::vector<std::string> RegisterAllFeatureVariationParameters(
1881 flags_ui::FlagsStorage* flags_storage,
1882 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181883 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1884 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311885}
1886
sdefresne14900ee2015-11-27 14:43:211887void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1888 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501889 base::Value::List& supported_entries,
1890 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181891 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211892 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511893 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211894}
1895
1896void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1897 const std::string& internal_name,
1898 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181899 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1900 enable);
sdefresne14900ee2015-11-27 14:43:211901}
1902
1903void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181904 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211905}
1906
Nicolas MacBeth972e2592023-02-23 15:22:091907bool IsRestartNeededToCommitChanges() {
1908 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1909}
1910
sdefresne14900ee2015-11-27 14:43:211911namespace testing {
1912
Elly Fong-Jones323ab1092021-08-23 22:36:311913base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1914 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531915 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211916}
1917
1918} // namespace testing