blob: 454c55cadd7ddb858cb090962a60511b30b6ea10 [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"
Ewann Pelle903a05e62023-02-01 17:51:0687#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3088#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3489#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0590#import "ios/chrome/browser/ui/app_store_rating/features.h"
Samar6b87cade2023-05-04 16:39:1491#import "ios/chrome/browser/ui/authentication/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"
adamta273568472020-12-04 23:53:5795#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
adamta8886def42023-03-07 19:45:2396#import "ios/chrome/browser/ui/ntp/new_tab_page_retention_field_trial_constants.h"
Christian Xub8c06cd2022-04-29 20:55:0197#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Robbie Gibson686c56732021-10-04 17:11:4598#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2699#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:19100#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse87a51cb2022-09-08 21:29:17101#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57102#import "ios/chrome/browser/web/features.h"
103#import "ios/chrome/grit/ios_strings.h"
104#import "ios/components/security_interstitials/https_only_mode/feature.h"
105#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
106#import "ios/web/common/features.h"
107#import "ios/web/common/user_agent.h"
108#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21109
Sylvain Defresne9c107082020-10-27 16:39:13110#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57111#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13112#endif
113
sdefresne14900ee2015-11-27 14:43:21114#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57115#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22116#endif
stkhapuginc1be1792016-12-13 14:30:53117
118#if !defined(__has_feature) || !__has_feature(objc_arc)
119#error "This file requires ARC support."
120#endif
sdefresne14900ee2015-11-27 14:43:21121
elawrence816f6790e2017-06-16 18:19:28122using flags_ui::FeatureEntry;
123
sdefresne14900ee2015-11-27 14:43:21124namespace {
Emily Starkbafa9062017-12-27 15:22:46125
Olivier Robin3d60411622018-02-23 10:03:22126const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
127 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
128 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
129 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
130 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
131 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
132 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
133 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
134 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
135 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
136};
137
Nohemi Fernandezc00842a2021-07-26 11:47:34138const FeatureEntry::Choice
139 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
140 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
141 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
142 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
143 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
144};
145
Stepan Khapugincc4e9842019-01-23 13:38:13146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
150const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
151 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
152const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
153 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
154const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
155 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
156const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
157 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
160
161const FeatureEntry::FeatureVariation
162 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
163 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13167 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53168 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13169 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53170 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13171 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53172 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13173 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53174 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13175 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13177
Stepan Khapuginbac467e2022-05-06 21:11:54178const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
179 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
180const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
181 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
182const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
183 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
184
185const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
186 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
187 nullptr},
188 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
189 nullptr},
190 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
191 nullptr},
192};
193
Christian Xucf26d562022-07-06 09:28:36194const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
195 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
196const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
197 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
198const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
199 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
200
201const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
202 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
203 nullptr},
204 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
205 nullptr},
206 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
207 nullptr},
208};
209
Cheick Cissef37087902022-10-07 19:01:41210const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
211 {kWhatsNewModuleBasedLayoutParam, "true"}};
212
213const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
214 {"Display module layout", kWhatsNewModuleLayout,
215 std::size(kWhatsNewModuleLayout), nullptr},
216};
217
Cheick Cisse2806f082b2023-04-25 14:20:01218const FeatureEntry::FeatureParam kDefaultBrowserVideoPromoHalfscreen[] = {
219 {"default_browser_video_promo_halfscreen", "true"}};
220const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
221 {"Show half screen ui", kDefaultBrowserVideoPromoHalfscreen,
222 std::size(kDefaultBrowserVideoPromoHalfscreen), nullptr},
223};
224
Caitlin Fischer37e01232019-05-24 13:05:45225const FeatureEntry::FeatureParam
226 kAutofillUseMobileLabelDisambiguationShowAll[] = {
227 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
228 autofill::features::
229 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
230const FeatureEntry::FeatureParam
231 kAutofillUseMobileLabelDisambiguationShowOne[] = {
232 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
233 autofill::features::
234 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
235
236const FeatureEntry::FeatureVariation
237 kAutofillUseMobileLabelDisambiguationVariations[] = {
238 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53239 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45240 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53241 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45242
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10243const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59244 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
245 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
246const FeatureEntry::FeatureVariation
247 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
248 {"Remind me later",
249 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53250 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59251 nullptr}};
252
adamta37c6b832023-03-10 20:04:09253// Uses int values from SigninPromoViewStyle enum.
254const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
255 {kDiscoverFeedTopSyncPromoStyle, "0"}};
256const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactTitled[] = {
257 {kDiscoverFeedTopSyncPromoStyle, "1"}};
258const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
259 {{kDiscoverFeedTopSyncPromoStyle, "2"}};
260const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
261 {kDiscoverFeedTopSyncPromoStyle, "3"}};
adamtadb0bfc62022-08-01 17:37:47262
Mohammad Refaatab6bee62022-05-16 16:31:15263const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09264 {"Standard", kDiscoverFeedTopSyncPromoStandard,
265 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
266 {"Compact Titled (Unpersonalized)", kDiscoverFeedTopSyncPromoCompactTitled,
267 std::size(kDiscoverFeedTopSyncPromoCompactTitled), nullptr},
268 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
269 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
270 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
271 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15272
adamta4a6f2fd22023-02-13 17:37:14273const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
274 {kDisableStickyHeaderForFollowingFeed, "true"}};
275const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18276 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14277const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
278 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18279 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14280
281const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
282 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
283 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
284 {"Reduced header height", kFeedHeaderSettingReducedHeight,
285 std::size(kFeedHeaderSettingReducedHeight), nullptr},
286 {"All improvements", kFeedHeaderSettingAllImprovements,
287 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
288
gogerald53c6e7a2021-04-15 22:07:35289const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08290 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35291 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
292const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08293 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35294 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
295const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08296 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35297 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
298const FeatureEntry::FeatureParam
299 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
300 {kStartSurfaceShrinkLogoParam, "true"},
301 {kStartSurfaceReturnToRecentTabParam, "true"},
302 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
303const FeatureEntry::FeatureParam
304 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
305 {kStartSurfaceHideShortcutsParam, "true"},
306 {kStartSurfaceReturnToRecentTabParam, "true"},
307 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
308const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08309 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35310 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
311const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
312 {kStartSurfaceHideShortcutsParam, "true"},
313 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
314const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08315 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35316 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
317const FeatureEntry::FeatureParam
318 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
319 {kStartSurfaceShrinkLogoParam, "true"},
320 {kStartSurfaceReturnToRecentTabParam, "true"},
321 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
322const FeatureEntry::FeatureParam
323 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
324 {kStartSurfaceHideShortcutsParam, "true"},
325 {kStartSurfaceReturnToRecentTabParam, "true"},
326 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08327
gogerald0e39e3aa2021-02-10 18:41:23328const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35329 {"10s:Show Return to Recent Tab tile",
330 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53331 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35332 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53333 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35334 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53335 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35336 {"10s:Shrink Logo and show Return to Recent Tab tile",
337 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53338 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35339 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
340 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53341 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35342 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53343 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35344 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53345 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35346 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53347 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35348 {"1h:Shrink Logo and show Return to Recent Tab tile",
349 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53350 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35351 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
352 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53353 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08354};
gogerald0e39e3aa2021-02-10 18:41:23355
Chris Luce928eb2023-05-12 21:36:26356const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
357 {kMagicStackMostVisitedModuleParam, "true"},
358 {kReducedSpaceParam, "-80"}};
359const FeatureEntry::FeatureParam kMagicStackPushedDown[] = {
360 {kMagicStackMostVisitedModuleParam, "false"},
361 {kReducedSpaceParam, "-30"}};
362const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
363 {kMagicStackMostVisitedModuleParam, "false"},
364 {kReducedSpaceParam, "20"}};
365
366const FeatureEntry::FeatureVariation kMagicStackVariations[]{
367 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
368 std::size(kMagicStackMostVisitedModule), nullptr},
369 {"Magic Stack with more NTP Top Space", kMagicStackPushedDown,
370 std::size(kMagicStackPushedDown), nullptr},
371 {"Magic Stack with Reduced NTP Top Space", kMagicStackReducedNTPTopSpace,
372 std::size(kMagicStackReducedNTPTopSpace), nullptr},
373};
374
Ed Chin91e44992022-07-27 13:42:34375#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26376// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01377const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04378 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
379 {kEnableRecurringBackgroundRefreshSchedule, "false"},
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 kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04383 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
384 {kEnableRecurringBackgroundRefreshSchedule, "false"},
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 kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04388 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
389 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01390 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04391 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01392const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04393 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
394 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01395 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04396 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01397const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04398 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
399 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01400 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
401 {kBackgroundRefreshIntervalInSeconds, "0"}};
402const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04403 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
404 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01405 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
406 {kBackgroundRefreshIntervalInSeconds, "0"}};
407const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
408 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
409 {kEnableRecurringBackgroundRefreshSchedule, "false"},
410 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
411 {kBackgroundRefreshIntervalInSeconds, "0"}};
412const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
413 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
414 {kEnableRecurringBackgroundRefreshSchedule, "true"},
415 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
416 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04417
Ed Chin178ec2a2023-02-10 22:21:26418// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04419const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01420 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
421 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
422 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
423 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
424 {"1hr Interval 1hr Max Age Recurring",
425 kOneHourIntervalOneHourMaxAgeRecurring,
426 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
427 {"4hr Interval 6hr Max Age Recurring",
428 kFourHourIntervalSixHourMaxAgeRecurring,
429 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
430 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
431 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
432 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
433 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
434 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
435 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
436 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
437 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04438};
Ed Chin91e44992022-07-27 13:42:34439#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04440
Ed Chin178ec2a2023-02-10 22:21:26441// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29442const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
443 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54444 {kEnableFeedAppCloseForegroundRefresh, "false"},
445 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29446const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
447 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54448 {kEnableFeedAppCloseForegroundRefresh, "true"},
449 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
450const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
451 {kEnableFeedSessionCloseForegroundRefresh, "false"},
452 {kEnableFeedAppCloseForegroundRefresh, "false"},
453 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26454
Ed Chin5c1fd532023-03-20 17:43:29455// Feed Invisible Foreground Refresh Feature Variations.
456const FeatureEntry::FeatureVariation
457 kFeedInvisibleForegroundRefreshVariations[] = {
458 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
459 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
460 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
461 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54462 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
463 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26464};
465
Ewann Pelle87019cdf2023-02-17 14:28:16466const FeatureEntry::FeatureParam kEnablePinnedTabsOverflow[] = {
467 {kEnablePinnedTabsOverflowParam, "true"}};
Ewann Pelle3774cac532022-11-15 10:12:37468
469const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
Ewann Pelle87019cdf2023-02-17 14:28:16470 {"+ overflow entry", kEnablePinnedTabsOverflow,
471 std::size(kEnablePinnedTabsOverflow), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37472};
473
ginnnnnnnycde6fcbb2023-05-23 16:18:07474const FeatureEntry::FeatureParam
475 kAutofillBrandingIOSDismissWhenInteractedNoAnimation[] = {
476 {autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
477 autofill::features::
478 kAutofillBrandingIOSParamFrequencyTypeDismissWhenInteracted},
479 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
480 autofill::features::
481 kAutofillBrandingIOSParamFrequencyTypeDismissWhenInteracted}};
482const FeatureEntry::FeatureParam kAutofillBrandingIOSAlwaysShowAndDismiss[] = {
483 {autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
484 autofill::features::
485 kAutofillBrandingIOSParamFrequencyTypeAlwaysShowAndDismiss},
486 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
487 autofill::features::kAutofillBrandingIOSParamFrequencyTypeAlways}};
488const FeatureEntry::FeatureParam
489 kAutofillBrandingIOSDismissWhenInteractedWithAnimation[] = {
490 {autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
491 autofill::features::
492 kAutofillBrandingIOSParamFrequencyTypeDismissWhenInteracted},
493 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
494 autofill::features::kAutofillBrandingIOSParamFrequencyTypeAlways}};
ginnnnnnny591a4972022-09-01 16:10:27495const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
ginnnnnnnycde6fcbb2023-05-23 16:18:07496 {"(will not show again after user interacts with keyboard accessories)",
497 kAutofillBrandingIOSDismissWhenInteractedNoAnimation,
498 std::size(kAutofillBrandingIOSDismissWhenInteractedNoAnimation), nullptr},
499 {"(shows and fades to the left every time)",
500 kAutofillBrandingIOSAlwaysShowAndDismiss,
501 std::size(kAutofillBrandingIOSAlwaysShowAndDismiss), nullptr},
502 {"(fades to the left after user interacts with keyboard accessories)",
503 kAutofillBrandingIOSDismissWhenInteractedWithAnimation,
504 std::size(kAutofillBrandingIOSDismissWhenInteractedWithAnimation),
505 nullptr}};
ginnnnnnny591a4972022-09-01 16:10:27506
Scott Yodercb2fe632022-09-12 15:28:35507const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26508 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35509const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
510 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
511 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
512
adamta8886def42023-03-07 19:45:23513const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideAll[] = {
Benjamin Williamsf97b7352023-05-03 21:55:28514 {ntp_tiles::kNewTabPageRetentionParam, "1"}};
adamta8886def42023-03-07 19:45:23515const FeatureEntry::FeatureParam kNewTabPageRetentionTileAblationHideMVTOnly[] =
Benjamin Williamsf97b7352023-05-03 21:55:28516 {{ntp_tiles::kNewTabPageRetentionParam, "2"}};
adamta8886def42023-03-07 19:45:23517const FeatureEntry::FeatureVariation kNewTabPageRetentionVariations[] = {
adamta8886def42023-03-07 19:45:23518 {"- Tile ablation, Hide all", kNewTabPageRetentionTileAblationHideAll,
519 std::size(kNewTabPageRetentionTileAblationHideAll), nullptr},
520 {"- Tile ablation, Hide MVT only",
521 kNewTabPageRetentionTileAblationHideMVTOnly,
522 std::size(kNewTabPageRetentionTileAblationHideMVTOnly), nullptr}};
Benjamin Williamsaa8da8142022-11-14 19:51:03523
Raj T18a2c8c2023-03-15 17:20:15524const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
525 {"date", "true"}};
526const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
527 {"address", "true"}};
528const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
529 {"phonenumber", "true"}};
530const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
531 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50532const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
533 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15534const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
535 {"date", "true"},
536 {"address", "true"},
537 {"phonenumber", "true"},
538 {"email", "true"}};
539const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
540 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
541 std::size(kEnableExpKitTextClassifierAll), nullptr},
542 {"Enabled for date", kEnableExpKitTextClassifierDate,
543 std::size(kEnableExpKitTextClassifierDate), nullptr},
544 {"Enabled for address", kEnableExpKitTextClassifierAddress,
545 std::size(kEnableExpKitTextClassifierAddress), nullptr},
546 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
547 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
548 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50549 std::size(kEnableExpKitTextClassifierEmail), nullptr},
550 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
551 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15552
adamta3811f9182022-10-24 17:49:33553const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
554 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
555 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
556const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
557 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
558 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
559
560const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
561 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
562 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
563 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
564 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
565
Quentin Pubert154fc6a2023-01-09 15:58:58566const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
567 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
568const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
569 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
570 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
571
Louis Romero93e9b50a2023-01-26 01:46:12572const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
573 {kTabInactivityThresholdParameterName,
574 kTabInactivityThresholdOneWeekParam}};
575const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
576 {kTabInactivityThresholdParameterName,
577 kTabInactivityThresholdTwoWeeksParam}};
578const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
579 {kTabInactivityThresholdParameterName,
580 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58581const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
582 {kTabInactivityThresholdParameterName,
583 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12584
585const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
586 {"One week", kTabInactivityThresholdOneWeek,
587 std::size(kTabInactivityThresholdOneWeek), nullptr},
588 {"Two weeks", kTabInactivityThresholdTwoWeeks,
589 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
590 {"Three weeks", kTabInactivityThresholdThreeWeeks,
591 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58592 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
593 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12594};
595
Huiting Yud7d2a5322023-02-09 21:14:22596const FeatureEntry::FeatureParam
597 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
598 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
599const FeatureEntry::FeatureParam
600 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
601 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
602const FeatureEntry::FeatureParam
603 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
604 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
Hira Mahmoodb3581452023-05-23 15:19:04605const FeatureEntry::FeatureParam
606 kCredentialProviderExtensionPromoOnAllTriggers[] = {
607 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"},
608 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
609 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22610
611const FeatureEntry::FeatureVariation
612 kCredentialProviderExtensionPromoVariations[] = {
613 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
614 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
615 {"On password copied",
616 kCredentialProviderExtensionPromoOnPasswordCopied,
617 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
618 {"On successful login with autofill",
619 kCredentialProviderExtensionPromoOnLoginWithAutofill,
620 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
621 nullptr},
Hira Mahmoodb3581452023-05-23 15:19:04622 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
623 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr},
Huiting Yud7d2a5322023-02-09 21:14:22624};
625
Olivier ROBINfd3887b72023-02-23 14:45:42626const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
627 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
628const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
629 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
630 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr}};
631
Olivier ROBIN2ca64952023-02-23 17:11:48632const FeatureEntry::FeatureParam kAddToHomeScreenDisableIncognito[] = {
633 {kAddToHomeScreenDisableIncognitoParam, "true"}};
634const FeatureEntry::FeatureVariation kAddToHomeScreenVariations[] = {
635 {"Disable on incognito", kAddToHomeScreenDisableIncognito,
636 std::size(kAddToHomeScreenDisableIncognito), nullptr}};
637
ginnnnnnny75903622023-03-01 18:00:00638const FeatureEntry::FeatureParam kBringYourOwnTabsIOSBottomMessage[] = {
639 {kBringYourOwnTabsIOSParam, "true"}};
640const FeatureEntry::FeatureVariation kBringYourOwnTabsIOSVariations[] = {
641 {"with bottom message on tab grid", kBringYourOwnTabsIOSBottomMessage,
642 std::size(kBringYourOwnTabsIOSBottomMessage), nullptr}};
643
Olivier ROBIN2613bcd02023-04-20 10:00:47644const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
645 {kIOSEditMenuSearchWithTitleParamTitle,
646 kIOSEditMenuSearchWithTitleSearchWithParam}};
647const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
648 {kIOSEditMenuSearchWithTitleParamTitle,
649 kIOSEditMenuSearchWithTitleSearchParam}};
650const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
651 {kIOSEditMenuSearchWithTitleParamTitle,
652 kIOSEditMenuSearchWithTitleWebSearchParam}};
653const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
654 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
655 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
656 {"Search", kIOSEditMenuSearchWithTitleSearch,
657 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
658 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
659 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
660};
661
Cooper Knaak1e026562017-07-26 05:22:28662// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21663// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28664// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
665// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21666// macro for this type supplying the command line to the macro.
667// . MULTI_VALUE: a list of choices, the first of which should correspond to a
668// deactivated state for this lab (i.e. no command line option). To specify
669// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
670// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28671// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
672// either enabled, disabled, or uses the default value of the associated
673// base::Feature instance. To specify this type of entry use the macro
674// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
675// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
676// base::Feature instance. Choices corresponding to the default state, a
677// universally enabled state, and a universally disabled state are
678// automatically included. To specify this type of entry use the macro
679// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
680// the array of choices.
681//
sdefresne14900ee2015-11-27 14:43:21682// See the documentation of FeatureEntry for details on the fields.
683//
684// When adding a new choice, add it to the end of the list.
685const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28686 {"in-product-help-demo-mode-choice",
687 flag_descriptions::kInProductHelpDemoModeName,
688 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
689 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23690 feature_engagement::kIPHDemoMode,
691 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09692 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22693 {"enable-autofill-credit-card-upload",
694 flag_descriptions::kAutofillCreditCardUploadName,
695 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24696 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23697 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
698 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
699 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51700 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23701 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
702 {"wallet-service-use-sandbox",
703 flag_descriptions::kWalletServiceUseSandboxName,
704 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
705 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
706 autofill::switches::kWalletServiceUseSandbox,
707 "1",
708 autofill::switches::kWalletServiceUseSandbox,
709 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59710 {"show-autofill-type-predictions",
711 flag_descriptions::kShowAutofillTypePredictionsName,
712 flag_descriptions::kShowAutofillTypePredictionsDescription,
713 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50714 FEATURE_VALUE_TYPE(
715 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jainb86c94b2023-04-06 14:13:57716 {"autofill-account-profiles-storage",
717 flag_descriptions::kAutofillAccountProfilesStorageName,
718 flag_descriptions::kAutofillAccountProfilesStorageDescription,
719 flags_ui::kOsIos,
720 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfileStorage)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26721 {"autofill-account-profiles-union-view",
722 flag_descriptions::kAutofillAccountProfilesUnionViewName,
723 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
724 flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22726 {"autofill-ios-delay-between-fields",
727 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
728 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
729 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05730 {"fullscreen-promos-manager-skip-internal-limits",
731 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
732 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
733 flags_ui::kOsIos,
734 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14735 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53736 flag_descriptions::kFullscreenSmoothScrollingName,
737 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19738 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06739 {"webpage-default-zoom-from-dynamic-type",
740 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
741 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
742 flags_ui::kOsIos,
743 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56744 {"webpage-alternative-text-zoom",
745 flag_descriptions::kWebPageAlternativeTextZoomName,
746 flag_descriptions::kWebPageAlternativeTextZoomDescription,
747 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34748 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
749 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
750 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13751 {"omnibox-ui-max-autocomplete-matches",
752 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
753 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
754 flags_ui::kOsIos,
755 FEATURE_WITH_PARAMS_VALUE_TYPE(
756 omnibox::kUIExperimentMaxAutocompleteMatches,
757 kOmniboxUIMaxAutocompleteMatchesVariations,
758 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35759 {"omnibox-local-history-zero-suggest-beyond-ntp",
760 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
761 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
762 flags_ui::kOsIos,
763 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54764 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
765 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
766 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
767 kOmniboxMaxZPSMatchesVariations,
768 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45769
770 {"omnibox-most-visited-tiles-on-srp",
771 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
772 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
773 flags_ui::kOsIos,
774 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30775 {"autofill-use-mobile-label-disambiguation",
776 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
777 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
778 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45779 FEATURE_WITH_PARAMS_VALUE_TYPE(
780 autofill::features::kAutofillUseMobileLabelDisambiguation,
781 kAutofillUseMobileLabelDisambiguationVariations,
782 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46783 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
784 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30785 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48786 {"force-startup-signin-promo",
787 flag_descriptions::kForceStartupSigninPromoName,
788 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29789 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06790 {"identity-status-consistency",
791 flag_descriptions::kIdentityStatusConsistencyName,
792 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
793 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22794 {"restore-session-from-cache",
795 flag_descriptions::kRestoreSessionFromCacheName,
796 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49797 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09798 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
799 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
800 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41801 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
802 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
803 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13804#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45805 {"screen-time-integration-ios",
806 flag_descriptions::kScreenTimeIntegrationName,
807 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
808 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13809#endif
Nazerke3e993f72020-09-21 13:00:06810 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
811 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
812 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55813 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
814 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
815 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14816 {"default-browser-fullscreen-promo-experiment",
817 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
818 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
819 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59820 FEATURE_WITH_PARAMS_VALUE_TYPE(
821 kDefaultBrowserFullscreenPromoExperiment,
822 kDefaultBrowserFullscreenPromoExperimentVariations,
823 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11824 {"ios-shared-highlighting-color-change",
825 flag_descriptions::kIOSSharedHighlightingColorChangeName,
826 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07827 flags_ui::kOsIos,
828 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34829 {"ios-shared-highlighting-v2",
830 flag_descriptions::kIOSSharedHighlightingV2Name,
831 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
832 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45833 {"omnibox-new-textfield-implementation",
834 flag_descriptions::kOmniboxNewImplementationName,
835 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
836 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26837 {"omnibox-on-focus-suggestions-contextual-web",
838 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
839 flag_descriptions::
840 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
841 flags_ui::kOsIos,
842 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
843 {"omnibox-on-focus-suggestions-srp",
844 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
845 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
846 flags_ui::kOsIos,
847 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12848 {"omnibox-report-assisted-query-stats",
849 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
850 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
851 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
852 {"omnibox-report-searchbox-stats",
853 flag_descriptions::kOmniboxReportSearchboxStatsName,
854 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
855 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15856 {"omnibox-fuzzy-url-suggestions",
857 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
858 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
859 flags_ui::kOsIos,
860 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19861 {"start-surface", flag_descriptions::kStartSurfaceName,
862 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23863 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
864 kStartSurfaceVariations,
865 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42866 {"autofill-address-verification-in-save-prompt",
867 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
868 flag_descriptions::
869 kEnableAutofillAddressSavePromptAddressVerificationDescription,
870 flags_ui::kOsIos,
871 FEATURE_VALUE_TYPE(
872 autofill::features::
873 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25874 {"filling-across-affiliated-websites",
875 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
876 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
877 flags_ui::kOsIos,
878 FEATURE_VALUE_TYPE(
879 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19880 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
881 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
882 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34883 {"wait-threshold-seconds-for-capabilities-api",
884 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
885 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
886 flags_ui::kOsIos,
887 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23888 {"autofill-fill-merchant-promo-code-fields",
889 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
890 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
891 flags_ui::kOsIos,
892 FEATURE_VALUE_TYPE(
893 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03894 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
895 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
896 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57897 {"overflow-menu-customization",
898 flag_descriptions::kOverflowMenuCustomizationName,
899 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
900 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu3830a072022-08-19 20:56:22901 {"enable-lens-in-home-screen-widget",
902 flag_descriptions::kEnableLensInHomeScreenWidgetName,
903 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
904 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
905 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
906 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
907 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
908 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
909 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
910 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03911 {"enable-lens-context-menu-alt-text",
912 flag_descriptions::kEnableLensContextMenuAltTextName,
913 flag_descriptions::kEnableLensContextMenuAltTextDescription,
914 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44915 {"enable-lens-in-omnibox-copied-image",
916 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
917 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
918 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40919 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23920 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
921 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40922 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23923 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03924 {"enable-disco-feed-endpoint",
925 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
926 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
927 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11928 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15929 {"enable-discover-feed-top-sync-promo",
930 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
931 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
932 flags_ui::kOsIos,
933 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
934 kDiscoverFeedTopSyncPromoVariations,
935 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14936 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
937 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
938 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
939 kFeedHeaderSettingsVariations,
940 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28941 {"shared-highlighting-amp",
942 flag_descriptions::kIOSSharedHighlightingAmpName,
943 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
944 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28945 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42946 commerce::flag_descriptions::kCommercePriceTrackingName,
947 commerce::flag_descriptions::kCommercePriceTrackingDescription,
948 flags_ui::kOsIos,
949 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
950 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15951 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06952 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
953 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
954 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54955 {"ntp-view-hierarchy-repair",
956 flag_descriptions::kNTPViewHierarchyRepairName,
957 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20958 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26959 {"synthesized-restore-session",
960 flag_descriptions::kSynthesizedRestoreSessionName,
961 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
962 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26963 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
964 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01966 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
967 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43969 {"enable-tailored-security-integration",
970 flag_descriptions::kTailoredSecurityIntegrationName,
971 flag_descriptions::kTailoredSecurityIntegrationDescription,
972 flags_ui::kOsIos,
973 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26974 {"autofill-enable-card-product-name",
975 flag_descriptions::kAutofillEnableCardProductNameName,
976 flag_descriptions::kAutofillEnableCardProductNameDescription,
977 flags_ui::kOsIos,
978 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00979 {"send-tab-to-self-signin-promo",
980 flag_descriptions::kSendTabToSelfSigninPromoName,
981 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
982 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22983 {"autofill-enforce-delays-in-strike-database",
984 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
985 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
986 flags_ui::kOsIos,
987 FEATURE_VALUE_TYPE(
988 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41989 {"autofill-upstream-allow-additional-email-domains",
990 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
991 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
992 flags_ui::kOsIos,
993 FEATURE_VALUE_TYPE(
994 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
995 {"autofill-upstream-allow-all-email-domains",
996 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
997 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
998 flags_ui::kOsIos,
999 FEATURE_VALUE_TYPE(
1000 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521001 {"enable-download-service-foreground-session",
1002 flag_descriptions::kDownloadServiceForegroundSessionName,
1003 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1004 flags_ui::kOsIos,
1005 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231006 {"enable-tflite-language-detection",
1007 flag_descriptions::kTFLiteLanguageDetectionName,
1008 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1009 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201010 {"optimization-guide-debug-logs",
1011 flag_descriptions::kOptimizationGuideDebugLogsName,
1012 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1013 flags_ui::kOsIos,
1014 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Raj T5aacebd2023-05-22 19:45:091015 {"optimization-guide-install-wide-model-store",
1016 flag_descriptions::kOptimizationGuideInstallWideModelStoreName,
1017 flag_descriptions::kOptimizationGuideInstallWideModelStoreDescription,
1018 flags_ui::kOsIos,
1019 FEATURE_VALUE_TYPE(optimization_guide::features::
1020 kOptimizationGuideInstallWideModelStore)},
Daniel Whited02b6962023-02-14 14:19:551021 {"optimization-guide-push-notifications",
1022 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1023 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1024 flags_ui::kOsIos,
1025 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:251026 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
1027 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
1028 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Rushan Suleymanov727309602022-04-28 20:08:541029 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
1030 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
1031 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
1032 {"sync-standalone-invalidations-wallet-and-offer",
1033 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
1034 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
1035 flags_ui::kOsIos,
1036 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:011037 {"suggestions-scrolling-ipad",
1038 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1039 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1040 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001041 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1042 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1043 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251044 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1045 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331046 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551047 {"experience-kit-apple-calendar",
1048 flag_descriptions::kAppleCalendarExperienceKitName,
1049 flag_descriptions::kAppleCalendarExperienceKitDescription,
1050 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081051 {"enable-expkit-text-classifier",
1052 flag_descriptions::kEnableExpKitTextClassifierName,
1053 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151054 flags_ui::kOsIos,
1055 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1056 kEnableExpKitTextClassifierVariations,
1057 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331058 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1059 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1060 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011061 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1062 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1063 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251064 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1065 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1066 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williamsf721fc22023-01-10 23:28:251067 {"smart-sorting-price-tracking-destination",
1068 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1069 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1070 flags_ui::kOsIos,
1071 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441072 {"new-overflow-menu-share-chrome-action",
1073 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1074 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1075 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301076 {"autofill-enable-ranking-formula-address-profiles",
1077 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1078 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1079 flags_ui::kOsIos,
1080 FEATURE_VALUE_TYPE(
1081 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391082 {"autofill-enable-ranking-formula-credit-cards",
1083 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1084 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1085 flags_ui::kOsIos,
1086 FEATURE_VALUE_TYPE(
1087 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021088 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1089 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1090 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021091 {"enable-feed-bottom-sign-in-promo",
1092 flag_descriptions::kEnableFeedBottomSignInPromoName,
1093 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1094 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1095 {"enable-feed-card-menu-sign-in-promo",
1096 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1097 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1098 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Luc36e3962023-04-11 21:50:521099 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1100 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261101 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1102 kMagicStackVariations,
1103 flag_descriptions::kMagicStackName)},
Olivier Robin058c1fad2022-05-31 18:24:061104 {"default-browser-intents-show-settings",
1105 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1106 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1107 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Tommy Martinoad42be52022-06-13 11:51:191108 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1109 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1110 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Scott Yoder16bff3c2023-03-24 16:00:551111 {"ios-set-up-list", flag_descriptions::kIOSSetUpListName,
1112 flag_descriptions::kIOSSetUpListDescription, flags_ui::kOsIos,
1113 FEATURE_VALUE_TYPE(kIOSSetUpList)},
Veronique Nguyenc3d7db52023-03-08 22:52:321114 {"ios-password-bottom-sheet",
1115 flag_descriptions::kIOSPasswordBottomSheetName,
1116 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1117 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
adamta8886def42023-03-07 19:45:231118 {"ios-new-tab-page-retention", flag_descriptions::kNewTabPageRetentionName,
1119 flag_descriptions::kNewTabPageRetentionDescription, flags_ui::kOsIos,
1120 FEATURE_WITH_PARAMS_VALUE_TYPE(ntp_tiles::kNewTabPageRetention,
1121 kNewTabPageRetentionVariations,
1122 ntp_tiles::kNewTabPageRetentionName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321123 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191124 flag_descriptions::kAutofillParseIBANFieldsName,
1125 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1126 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Moe Ahmadi098519d82022-07-27 18:34:241127 {"omnibox-zero-suggest-prefetching",
1128 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1129 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1130 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451131 {"omnibox-zero-suggest-prefetching-on-srp",
1132 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1133 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1134 flags_ui::kOsIos,
1135 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1136 {"omnibox-zero-suggest-prefetching-on-web",
1137 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1138 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1139 flags_ui::kOsIos,
1140 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471141 {"omnibox-zero-suggest-in-memory-caching",
1142 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1143 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1144 flags_ui::kOsIos,
1145 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351146 {"omnibox-on-device-tail-suggestions",
1147 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1148 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1149 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosbde5d5d2023-03-31 13:18:371150 {"enable-browser-lockdown-mode",
Joemer Ramos944cbc792023-05-11 16:58:411151 flag_descriptions::kBrowserLockdownModeAvailableName,
1152 flag_descriptions::kBrowserLockdownModeAvailableDescription,
1153 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kBrowserLockdownModeAvailable)},
Joemer Ramosada1e852023-03-10 19:14:411154 {"enable-button-configuration-usage",
1155 flag_descriptions::kEnableUIButtonConfigurationName,
1156 flag_descriptions::kEnableUIButtonConfigurationDescription,
1157 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Vincent Boissellead6cbe22022-07-04 19:32:391158 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1159 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501160 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491161 {"enable-sync-history-datatype",
1162 flag_descriptions::kSyncEnableHistoryDataTypeName,
1163 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1164 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361165 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1166 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1167 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1168 kOmniboxMaxURLMatchesVariations,
1169 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061170 {"metrickit-non-crash-reports",
1171 flag_descriptions::kMetrickitNonCrashReportName,
1172 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1173 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371174 {"autofill-enable-remade-downstream-metrics",
1175 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1176 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1177 flags_ui::kOsIos,
1178 FEATURE_VALUE_TYPE(
1179 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551180 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1181 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1182 flag_descriptions::
1183 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1184 flags_ui::kOsIos,
1185 FEATURE_VALUE_TYPE(
1186 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse1a168ef2023-03-24 10:39:531187 {"default-browser-refactoring-promo-manager",
1188 flag_descriptions::kDefaultBrowserRefactoringPromoManagerName,
1189 flag_descriptions::kDefaultBrowserRefactoringPromoManagerDescription,
1190 flags_ui::kOsIos,
1191 FEATURE_VALUE_TYPE(kDefaultBrowserRefactoringPromoManager)},
Cheick Cisse2806f082b2023-04-25 14:20:011192 {"default-browser-video-promo",
1193 flag_descriptions::kDefaultBrowserVideoPromoName,
1194 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1195 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1196 kDefaultBrowserVideoPromoVariations,
1197 "DefaultBrowserVideoPromoVariations")},
Ed Chin91e44992022-07-27 13:42:341198#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1199 {"feed-background-refresh-ios",
1200 flag_descriptions::kFeedBackgroundRefreshName,
1201 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1202 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1203 kFeedBackgroundRefreshVariations,
1204 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261205#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291206 {"feed-invisible-foreground-refresh-ios",
1207 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1208 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1209 flags_ui::kOsIos,
1210 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1211 kFeedInvisibleForegroundRefreshVariations,
1212 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191213 {"omnibox-keyboard-paste-button",
1214 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1215 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1216 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261217
Cheick Cisse87a51cb2022-09-08 21:29:171218 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1219 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411220 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1221 kWhatsNewLayoutVariations,
1222 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271223 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1224 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1225 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1226 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051227 "AutofillBrandingIOS")},
1228 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1229 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1230 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351231 {"ios-new-post-restore-experience",
1232 flag_descriptions::kIOSNewPostRestoreExperienceName,
1233 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1234 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261235 FEATURE_WITH_PARAMS_VALUE_TYPE(
1236 post_restore_signin::features::kIOSNewPostRestoreExperience,
1237 kIOSNewPostRestoreExperienceVariations,
1238 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021239 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1240 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1241 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501242 {"enable-tflite-language-detection-ignore",
1243 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1244 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1245 flags_ui::kOsIos,
1246 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Tina Wang89ae4252022-10-14 00:39:471247 {"enable-check-visibility-on-attention-log-start",
1248 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1249 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1250 flags_ui::kOsIos,
1251 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1252 {"enable-refine-data-source-reload-reporting",
1253 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1254 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1255 flags_ui::kOsIos,
1256 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041257 {"enable-passwords-account-storage",
1258 flag_descriptions::kEnablePasswordsAccountStorageName,
1259 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1260 flags_ui::kOsIos,
1261 FEATURE_VALUE_TYPE(
1262 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331263 {"enable-default-following-feed-sort-type",
1264 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1265 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1266 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201267 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331268 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201269 "EnableFollowingFeedDefaultSortType")},
Louis Romero1e2a88e92023-01-18 17:08:201270 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011271 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1272 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571273 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1274 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1275 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Ewann Pelle3774cac532022-11-15 10:12:371276 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1277 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1278 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1279 kEnablePinnedTabsVariations,
1280 "EnablePinnedTabs")},
Hira Mahmoodea109752022-11-17 17:45:411281 {"credential-provider-extension-promo",
1282 flag_descriptions::kCredentialProviderExtensionPromoName,
1283 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221284 flags_ui::kOsIos,
1285 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1286 kCredentialProviderExtensionPromoVariations,
1287 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521288 {"default-browser-blue-dot-promo",
1289 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1290 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1291 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271292 {"ios-force-translate-enabled",
1293 flag_descriptions::kIOSForceTranslateEnabledName,
1294 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1295 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251296 {"iph-price-notifications-while-browsing",
1297 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1298 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1299 flags_ui::kOsIos,
1300 FEATURE_VALUE_TYPE(
1301 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411302 {"autofill-offer-to-save-card-with-same-last-four",
1303 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1304 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1305 flags_ui::kOsIos,
1306 FEATURE_VALUE_TYPE(
1307 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041308 {"omnibox-multiline-search-suggest",
1309 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1310 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1311 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501312 {"autofill-suggest-server-card-instead-of-local-card",
1313 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1314 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1315 flags_ui::kOsIos,
1316 FEATURE_VALUE_TYPE(
1317 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581318 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1319 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1320 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1321 kNativeFindInPageVariations,
1322 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551323 {"intents-on-email", flag_descriptions::kEmailName,
1324 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331325 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341326 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1327 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1328 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351329 {"multiline-fade-truncating-label",
1330 flag_descriptions::kMultilineFadeTruncatingLabelName,
1331 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1332 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301333 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1334 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1335 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391336 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1337 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1338 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones1795eda2023-05-09 20:24:481339 {"local-pdp-detection",
1340 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1341 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1342 flags_ui::kOsIos,
1343 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121344 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1345 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1346 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1347 kTabInactivityThresholdVariations,
1348 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411349 {"enable-feed-image-caching",
1350 flag_descriptions::kEnableFeedImageCachingName,
1351 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1352 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1353 {"enable-feed-synthetic-capabilities",
1354 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1355 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1356 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Louis Romero58f355022023-02-13 19:04:311357 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1358 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1359 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421360 {"ios-edit-menu-partial-translate",
1361 flag_descriptions::kIOSEditMenuPartialTranslateName,
1362 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421363 flags_ui::kOsIos,
1364 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1365 kIOSEditMenuPartialTranslateVariations,
1366 "IOSEditMenuPartialTranslate")},
Olivier Robin7057bd72023-02-16 18:35:201367 {"ios-custom-browser-edit-menu",
1368 flag_descriptions::kIOSCustomBrowserEditMenuName,
1369 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1370 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Ali Juma57849c42023-02-21 22:53:431371 {"notification-settings-menu-item",
1372 flag_descriptions::kNotificationSettingsMenuItemName,
1373 flag_descriptions::kNotificationSettingsMenuItemDescription,
1374 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
rgodba72acf82023-02-20 10:29:351375 {"password-notes", flag_descriptions::kPasswordNotesWithBackupName,
1376 flag_descriptions::kPasswordNotesWithBackupDescription, flags_ui::kOsIos,
1377 FEATURE_VALUE_TYPE(syncer::kPasswordNotesWithBackup)},
Ed Chin97560fc42023-02-20 16:48:321378 {"feed-experiment-tagging-ios",
1379 flag_descriptions::kFeedExperimentTaggingName,
1380 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1381 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061382 {"spotlight-reading-list-source",
1383 flag_descriptions::kSpotlightReadingListSourceName,
1384 flag_descriptions::kSpotlightReadingListSourceDescription,
1385 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
kalettuced6ba72cb2023-02-22 00:55:381386 {"consistency-new-account-interface",
1387 flag_descriptions::kConsistencyNewAccountInterfaceName,
1388 flag_descriptions::kConsistencyNewAccountInterfaceDescription,
1389 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kConsistencyNewAccountInterface)},
Olivier ROBINabcb8ce2023-02-22 13:55:201390 {"add-to-home-screen", flag_descriptions::kAddToHomeScreenName,
1391 flag_descriptions::kAddToHomeScreenDescription, flags_ui::kOsIos,
Olivier ROBIN2ca64952023-02-23 17:11:481392 FEATURE_WITH_PARAMS_VALUE_TYPE(kAddToHomeScreen,
1393 kAddToHomeScreenVariations,
1394 "IOSEditMenuPartialTranslate")},
Salma Elmahallawy72c5d34d2023-02-27 23:44:421395 {"policy-logs-page-ios", flag_descriptions::kPolicyLogsPageIOSName,
1396 flag_descriptions::kPolicyLogsPageIOSDescription, flags_ui::kOsIos,
1397 FEATURE_VALUE_TYPE(policy::features::kPolicyLogsPageIOS)},
Vincent Boisselle6e9780c2023-02-25 01:05:341398 {"indicate-account-storage-error-in-account-cell",
1399 flag_descriptions::kIndicateAccountStorageErrorInAccountCellName,
1400 flag_descriptions::kIndicateAccountStorageErrorInAccountCellDescription,
1401 flags_ui::kOsIos,
Mikel Astize597fc82023-03-22 01:39:491402 FEATURE_VALUE_TYPE(syncer::kIndicateAccountStorageErrorInAccountCell)},
Menghan YANGf3fe2de52023-02-27 16:38:501403 {"enable-bookmarks-account-storage",
1404 flag_descriptions::kEnableBookmarksAccountStorageName,
1405 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1406 flags_ui::kOsIos,
1407 FEATURE_VALUE_TYPE(bookmarks::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531408 {"web-feed-feedback-reroute",
1409 flag_descriptions::kWebFeedFeedbackRerouteName,
1410 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1411 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551412 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1413 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1414 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
ginnnnnnny75903622023-03-01 18:00:001415 {"bring-your-own-tabs-ios", flag_descriptions::kBringYourOwnTabsIOSName,
1416 flag_descriptions::kBringYourOwnTabsIOSDescription, flags_ui::kOsIos,
1417 FEATURE_WITH_PARAMS_VALUE_TYPE(kBringYourOwnTabsIOS,
1418 kBringYourOwnTabsIOSVariations,
1419 "BringYourOwnTabsIOS")},
Tina Wangd3f6f192023-04-05 05:22:431420 {"enable-follow-IPH-exp-params",
1421 flag_descriptions::kEnableFollowIPHExpParamsName,
1422 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1423 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031424 {"enable-follow-management-instant-reload",
1425 flag_descriptions::kEnableFollowManagementInstantReloadName,
1426 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1427 flags_ui::kOsIos,
1428 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Mustafa Acerc8c0b152023-03-09 02:41:441429 {"mixed-content-autoupgrade-ios",
1430 flag_descriptions::kMixedContentAutoupgradeName,
1431 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1432 FEATURE_VALUE_TYPE(
1433 security_interstitials::features::kMixedContentAutoupgrade)},
Menghan YANGc4c94ea22023-03-09 12:48:241434 {"enable-email-in-bookmarks-reading-list-snackbar",
1435 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarName,
1436 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarDescription,
1437 flags_ui::kOsIos,
1438 FEATURE_VALUE_TYPE(kEnableEmailInBookmarksReadingListSnackbar)},
Jared Saul5363f3962023-03-10 23:03:511439 {"autofill-upstream-authenticate-preflight-call",
1440 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallName,
1441 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallDescription,
1442 flags_ui::kOsIos,
1443 FEATURE_VALUE_TYPE(
1444 autofill::features::kAutofillUpstreamAuthenticatePreflightCall)},
Marc Treibe9f79ea72023-03-14 10:25:421445 {"enable-preferences-account-storage",
1446 flag_descriptions::kEnablePreferencesAccountStorageName,
1447 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1448 flags_ui::kOsIos,
1449 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Vincent Boisselle92fa8c472023-03-20 21:35:511450 {"indicate-identity-error-overflow-menu",
1451 flag_descriptions::kIndicateIdentityErrorInOverflowMenuName,
1452 flag_descriptions::kIndicateIdentityErrorInOverflowMenuDescription,
1453 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIndicateSyncErrorInOverflowMenu)},
Olivier ROBINa229d2132023-03-21 12:44:201454 {"ios-browser-edit-menu-metrics",
1455 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1456 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1457 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Gauthier Ambardb27b29c2023-03-29 07:43:441458 {"sf-symbols-follow-up", flag_descriptions::kSFSymbolsFollowUpName,
1459 flag_descriptions::kSFSymbolsFollowUpDescription, flags_ui::kOsIos,
1460 FEATURE_VALUE_TYPE(kSFSymbolsFollowUp)},
Menghan YANG5b3a78a2023-03-24 17:38:261461 {"enable-reading-list-account-storage",
1462 flag_descriptions::kEnableReadingListAccountStorageName,
1463 flag_descriptions::kEnableReadingListAccountStorageDescription,
1464 flags_ui::kOsIos,
1465 FEATURE_VALUE_TYPE(
1466 reading_list::switches::kReadingListEnableDualReadingListModel)},
1467 {"enable-reading-list-sign-in-promo",
1468 flag_descriptions::kEnableReadingListSignInPromoName,
1469 flag_descriptions::kEnableReadingListSignInPromoDescription,
1470 flags_ui::kOsIos,
1471 FEATURE_VALUE_TYPE(reading_list::switches::
1472 kReadingListEnableSyncTransportModeUponSignIn)},
Stepan Khapuginb2f49522023-04-03 18:25:241473 {"omnibox-grouping-framework-zps",
1474 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1475 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1476 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1477 {"omnibox-grouping-framework-non-zps",
1478 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1479 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1480 flags_ui::kOsIos,
1481 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471482 {"enable-session-serialization-optimizations",
1483 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1484 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1485 flags_ui::kOsIos,
1486 FEATURE_VALUE_TYPE(
1487 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411488 {"bottom-omnibox-steady-state",
1489 flag_descriptions::kBottomOmniboxSteadyStateName,
1490 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1491 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Jared Saul19f8ba12023-04-11 17:44:531492 {"autofill-upstream-use-alternate-secure-data-type",
1493 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeName,
1494 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeDescription,
1495 flags_ui::kOsIos,
1496 FEATURE_VALUE_TYPE(
1497 autofill::features::kAutofillUpstreamUseAlternateSecureDataType)},
Robbie Gibson0ea280602023-04-12 01:02:391498 {"only-access-clipboard-async",
1499 flag_descriptions::kOnlyAccessClipboardAsyncName,
1500 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1501 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Christian Xue5f60232023-04-12 17:50:091502 {"omnibox-tail-suggest", flag_descriptions::kOmniboxTailSuggestName,
1503 flag_descriptions::kOmniboxTailSuggestDescription, flags_ui::kOsIos,
1504 FEATURE_VALUE_TYPE(kOmniboxTailSuggest)},
Ed Chinecb7d5b2023-04-14 19:22:091505 {"feed-disable-hot-start-refresh-ios",
1506 flag_descriptions::kFeedDisableHotStartRefreshName,
1507 flag_descriptions::kFeedDisableHotStartRefreshDescription,
1508 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFeedDisableHotStartRefresh)},
Olivier ROBIN2613bcd02023-04-20 10:00:471509 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1510 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1511 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1512 kIOSEditMenuSearchWithVariations,
1513 "IOSEditMenuSearchWith")},
1514 {"ios-edit-menu-hide-search-web",
1515 flag_descriptions::kIOSEditMenuHideSearchWebName,
1516 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1517 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Samar6b87cade2023-05-04 16:39:141518 {"history-sync-opt-in", flag_descriptions::kHistorySyncOptInName,
1519 flag_descriptions::kHistorySyncOptInDescription, flags_ui::kOsIos,
1520 FEATURE_VALUE_TYPE(kHistorySyncOptIn)},
Stephen McGruer9afca1a2023-05-18 20:55:171521 {"autofill-enable-card-art-image",
1522 flag_descriptions::kAutofillEnableCardArtImageName,
1523 flag_descriptions::kAutofillEnableCardArtImageDescription,
1524 flags_ui::kOsIos,
1525 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
Jood Hajeerd5df9a22023-05-22 13:38:471526 {"replace-sync-promos-with-sign-in-promos",
1527 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1528 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1529 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kReplaceSyncPromosWithSignInPromos)},
Louis Romero93e9b50a2023-01-26 01:46:121530};
sdefresne14900ee2015-11-27 14:43:211531
Rohit Raobed794c2020-04-27 15:27:451532bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1533 return false;
1534}
1535
1536flags_ui::FlagsState& GetGlobalFlagsState() {
1537 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1538 nullptr);
1539 return *flags_state;
1540}
David Jean5ca263c2021-08-18 09:19:301541// Creates the experimental test policies map, used by AsyncPolicyLoader and
1542// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341543NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211544 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1545
Guillaume Jenkins25e9bd72020-08-27 17:39:061546 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551547 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061548 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551549
Guillaume Jenkins25e9bd72020-08-27 17:39:061550 // Set some sample policy values for testing if EnableSamplePolicies is set to
1551 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401552 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551553 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011554 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1555
Guillaume Jenkinseeb7007c2020-06-25 22:55:401556 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1557
1558 // 2 = Disable all variations
1559 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1560
1561 // 2 = Do not allow any site to show popups
1562 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1563
Tina Wang5abee802020-07-29 23:09:521564 // Set default search engine.
1565 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1566 @YES,
1567 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1568 @"http://www.google.com/search?q={searchTerms}",
1569 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021570 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521571
Tina Wang89068c82020-10-29 15:51:501572 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1573
Gauthier Ambard21b23702021-04-16 16:11:271574 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1575
Tina Wang59d0b7e2020-08-11 04:41:011576 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531577
1578 // 2 = Enhanced safe browsing protection
1579 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1580
1581 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291582
1583 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551584 }];
1585 }
1586
Ewann227a3c02021-04-19 12:04:541587 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041588 NSString* sync_policy_key =
1589 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301590 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541591 }
Ewann227a3c02021-04-19 12:04:541592
Ewann570a6302021-08-17 07:22:421593 // SyncTypesListDisabled policy.
1594 NSString* Sync_types_list_disabled_key =
1595 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1596 NSMutableArray* Sync_types_list_disabled_values =
1597 [[NSMutableArray alloc] init];
1598 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1599 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1600 }
1601 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1602 [Sync_types_list_disabled_values addObject:@"readingList"];
1603 }
1604 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1605 [Sync_types_list_disabled_values addObject:@"preferences"];
1606 }
1607 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1608 [Sync_types_list_disabled_values addObject:@"passwords"];
1609 }
1610 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1611 [Sync_types_list_disabled_values addObject:@"autofill"];
1612 }
1613 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1614 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1615 }
1616 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1617 [Sync_types_list_disabled_values addObject:@"tabs"];
1618 }
1619 if ([Sync_types_list_disabled_values count]) {
1620 [testing_policies addEntriesFromDictionary:@{
1621 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1622 }];
Ewann570a6302021-08-17 07:22:421623 }
1624
Gauthier Ambard073eaa92021-11-22 15:24:131625 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521626 NSString* incognito_policy_key =
1627 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1628 NSInteger incognito_mode_availability =
1629 [defaults integerForKey:incognito_policy_key];
1630 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521631 [testing_policies addEntriesFromDictionary:@{
1632 incognito_policy_key : @(incognito_mode_availability),
1633 }];
1634 }
1635
Ewann40a8f8a2021-07-29 10:01:201636 NSString* restriction_pattern =
1637 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1638 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291639 NSString* restrict_key =
1640 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201641 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291642 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201643 }];
1644 }
1645
Vincent Boisselle19200bc2021-09-01 17:58:251646 // If the sign-in policy is set (not "None"), add the policy key to the list
1647 // of enabled experimental policies, and set the value.
1648 NSString* const kSigninPolicyKey = @"BrowserSignin";
1649 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1650 if (signin_policy_mode) {
1651 // Remove the mode offset that was used to represent the unset policy.
1652 --signin_policy_mode;
1653 DCHECK(signin_policy_mode >= 0);
1654
Vincent Boisselle19200bc2021-09-01 17:58:251655 [testing_policies addEntriesFromDictionary:@{
1656 kSigninPolicyKey : @(signin_policy_mode),
1657 }];
1658 }
1659
Veronique Nguyen9b1044f2022-01-11 14:41:131660 // If the New Tab Page URL is set (not empty) add the value to the list of
1661 // test policies.
1662 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1663 if ([ntp_location length] > 0) {
1664 NSString* ntp_location_key =
1665 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1666 [testing_policies
1667 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571668 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131669 }
1670
Ali Juma9ec36d22022-03-28 14:53:121671 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1672 NSString* allow_backups_key =
1673 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1674 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1675 [allowed_experimental_policies addObject:allow_backups_key];
1676 }
1677
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241678 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1679 NSString* password_manager_key =
1680 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1681 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1682 [allowed_experimental_policies addObject:password_manager_key];
1683 }
Arthur Milchiorbb44f5c82023-03-14 16:14:461684 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1685 NSString* managed_bookmarks_key =
1686 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1687 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571688 @"["
1689 // The following gets filtered out from
1690 // the JSON string when parsed.
1691 " {"
1692 " \"toplevel_name\": \"Managed Bookmarks\""
1693 " },"
1694 " {"
1695 " \"name\": \"Google\","
1696 " \"url\": \"google.com\""
1697 " },"
1698 " {"
1699 " \"name\": \"Empty Folder\","
1700 " \"children\": []"
1701 " },"
1702 " {"
1703 " \"name\": \"Big Folder\","
1704 " \"children\": ["
1705 " {"
1706 " \"name\": \"Youtube\","
1707 " \"url\": \"youtube.com\""
1708 " },"
1709 " {"
1710 " \"name\": \"Chromium\","
1711 " \"url\": \"chromium.org\""
1712 " },"
1713 " {"
1714 " \"name\": \"More Stuff\","
1715 " \"children\": ["
1716 " {"
1717 " \"name\": \"Bugs\","
1718 " \"url\": \"crbug.com\""
1719 " }"
1720 " ]"
1721 " }"
1722 " ]"
1723 " }"
1724 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461725 [testing_policies addEntriesFromDictionary:@{
1726 managed_bookmarks_key : managed_bookmarks_value
1727 }];
1728 [allowed_experimental_policies addObject:managed_bookmarks_key];
1729 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241730
Guillaume Jenkins25e9bd72020-08-27 17:39:061731 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1732 // policy.
1733 if ([allowed_experimental_policies count] > 0) {
1734 [testing_policies setValue:allowed_experimental_policies
1735 forKey:base::SysUTF8ToNSString(
1736 policy::key::kEnableExperimentalPolicies)];
1737 }
1738
jlebel2eb40222022-05-06 11:15:421739 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1740 switch ([defaults integerForKey:metrics_reporting_key]) {
1741 case 1:
1742 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131743 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421744 break;
1745 case 2:
1746 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131747 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421748 break;
1749 default:
1750 // Metrics reporting not managed.
1751 break;
1752 }
1753
David Jean6f85d44f2021-08-19 08:08:451754 // Warning: Add new flags to TestingPoliciesHash() below.
1755
David Jean5ca263c2021-08-18 09:19:301756 return testing_policies;
1757}
David Jean6f85d44f2021-08-19 08:08:451758
David Jean5ca263c2021-08-18 09:19:301759} // namespace
1760
Gauthier Ambard02dbf022022-08-23 08:28:471761// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301762void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1763 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1764
1765 // Set the UA flag if UseMobileSafariUA is enabled.
1766 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1767 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1768 // Chrome puts its product token.
1769 int32_t major = 0;
1770 int32_t minor = 0;
1771 int32_t bugfix = 0;
1772 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1773 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1774
1775 command_line->AppendSwitchASCII(switches::kUserAgent,
1776 web::BuildMobileUserAgent(product));
1777 }
1778
1779 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341780 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301781
1782 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1783 // Management to enabled and add the token to the list of policies.
1784 NSString* token_key =
1785 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1786 NSString* token = [defaults stringForKey:token_key];
1787
1788 if ([token length] > 0) {
1789 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1790 [testing_policies setValue:token forKey:token_key];
1791 }
1792
Guillaume Jenkins57606d72020-08-13 17:32:551793 // If some policies were set, commit them to the app's registration defaults.
1794 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401795 NSDictionary* registration_defaults =
1796 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1797 [defaults registerDefaults:registration_defaults];
1798 }
1799
sdefresne14900ee2015-11-27 14:43:211800 // Freeform commandline flags. These are added last, so that any flags added
1801 // earlier in this function take precedence.
1802 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1803 base::CommandLine::StringVector flags;
1804 // Append an empty "program" argument.
1805 flags.push_back("");
1806
1807 // The number of flags corresponds to the number of text fields in
1808 // Experimental.plist.
1809 const int kNumFreeformFlags = 5;
1810 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1811 NSString* key =
1812 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1813 NSString* flag = [defaults stringForKey:key];
1814 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331815 // iOS keyboard replaces -- with —, so undo that.
1816 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1817 withString:@"--"
1818 options:0
1819 range:NSMakeRange(0, 1)];
1820 // To make things easier, allow flags with no dashes by prepending them
1821 // here. This also allows for flags that just have one dash if they
1822 // exist.
1823 if (![flag hasPrefix:@"-"]) {
1824 flag = [@"--" stringByAppendingString:flag];
1825 }
sdefresne14900ee2015-11-27 14:43:211826 flags.push_back(base::SysNSStringToUTF8(flag));
1827 }
1828 }
1829
1830 base::CommandLine temp_command_line(flags);
1831 command_line->AppendArguments(temp_command_line, false);
1832 }
msardafc76f662017-02-24 12:46:281833
justincohendacc85d2017-06-28 23:34:101834 // Populate command line flag for 3rd party keyboard omnibox workaround.
1835 NSString* enableThirdPartyKeyboardWorkaround =
1836 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1837 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1838 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1839 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1840 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1841 }
1842
Sylvain Defresned3cd8d92022-01-18 13:35:081843 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211844}
1845
sdefresne14900ee2015-11-27 14:43:211846void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1847 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181848 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111849 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531850 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211851}
1852
jkrcalbf073372016-07-29 07:21:311853std::vector<std::string> RegisterAllFeatureVariationParameters(
1854 flags_ui::FlagsStorage* flags_storage,
1855 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181856 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1857 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311858}
1859
sdefresne14900ee2015-11-27 14:43:211860void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1861 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501862 base::Value::List& supported_entries,
1863 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181864 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211865 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511866 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211867}
1868
1869void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1870 const std::string& internal_name,
1871 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181872 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1873 enable);
sdefresne14900ee2015-11-27 14:43:211874}
1875
1876void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181877 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211878}
1879
Nicolas MacBeth972e2592023-02-23 15:22:091880bool IsRestartNeededToCommitChanges() {
1881 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1882}
1883
sdefresne14900ee2015-11-27 14:43:211884namespace testing {
1885
Elly Fong-Jones323ab1092021-08-23 22:36:311886base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1887 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531888 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211889}
1890
1891} // namespace testing