blob: 6f2a9898e89a4278cac82be92d3f784a9c420d60 [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
28#import "components/breadcrumbs/core/features.h"
29#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
35#import "components/feature_engagement/public/feature_constants.h"
36#import "components/feature_engagement/public/feature_list.h"
37#import "components/feed/feed_feature_list.h"
38#import "components/flags_ui/feature_entry.h"
39#import "components/flags_ui/feature_entry_macros.h"
40#import "components/flags_ui/flags_storage.h"
41#import "components/flags_ui/flags_ui_switches.h"
42#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0343#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5744#import "components/ntp_tiles/switches.h"
45#import "components/omnibox/browser/omnibox_field_trial.h"
46#import "components/omnibox/common/omnibox_features.h"
47#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2048#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5749#import "components/password_manager/core/common/password_manager_features.h"
50#import "components/payments/core/features.h"
51#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4052#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5753#import "components/policy/policy_constants.h"
54#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2555#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
57#import "components/signin/core/browser/account_reconcilor.h"
58#import "components/signin/ios/browser/features.h"
59#import "components/signin/public/base/signin_switches.h"
60#import "components/strings/grit/components_strings.h"
61#import "components/sync/base/command_line_switches.h"
62#import "components/sync/base/features.h"
63#import "components/sync/base/pref_names.h"
64#import "components/translate/core/browser/translate_prefs.h"
65#import "components/translate/core/common/translate_util.h"
Ed Chin91e44992022-07-27 13:42:3466#import "ios/chrome/app/background_mode_buildflags.h"
Gauthier Ambard999088c2022-09-13 08:36:5767#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
68#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5469#import "ios/chrome/browser/credential_provider_promo/features.h"
Quentin Pubert154fc6a2023-01-09 15:58:5870#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1771#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5772#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Gauthier Ambard92605132022-08-26 13:25:1773#import "ios/chrome/browser/flags/system_flags.h"
Ed Chin100660bf2022-04-26 16:59:1374#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5075#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3976#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2078#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5779#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Ewann Pelle903a05e62023-02-01 17:51:0680#import "ios/chrome/browser/tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3481#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0582#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5783#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2184#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5085#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2486#import "ios/chrome/browser/ui/download/features.h"
Chris Lu438e1c052022-08-17 02:57:0087#import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3588#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
Louis Romeroc18612b962022-10-07 12:08:1489#import "ios/chrome/browser/ui/keyboard/features.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0390#import "ios/chrome/browser/ui/ntp/field_trial_constants.h"
adamta273568472020-12-04 23:53:5791#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Christian Xub8c06cd2022-04-29 20:55:0192#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Aliona DANGLAa5257ccc2022-08-29 14:01:4993#import "ios/chrome/browser/ui/open_in/features.h"
Robbie Gibson686c56732021-10-04 17:11:4594#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
Benjamin Williams3d3a2ec2022-09-13 20:01:2695#import "ios/chrome/browser/ui/post_restore_signin/features.h"
gogerald0ff29e52021-02-03 18:56:1996#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Louis Romero93e9b50a2023-01-26 01:46:1297#import "ios/chrome/browser/ui/tab_switcher/tab_grid/inactive_tabs/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2898#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5799#import "ios/chrome/browser/ui/ui_feature_flags.h"
Cheick Cisse87a51cb2022-09-08 21:29:17100#import "ios/chrome/browser/ui/whats_new/feature_flags.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/web/features.h"
102#import "ios/chrome/grit/ios_strings.h"
103#import "ios/components/security_interstitials/https_only_mode/feature.h"
104#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
105#import "ios/web/common/features.h"
106#import "ios/web/common/user_agent.h"
107#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21108
Sylvain Defresne9c107082020-10-27 16:39:13109#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57110#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13111#endif
112
sdefresne14900ee2015-11-27 14:43:21113#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22115#endif
stkhapuginc1be1792016-12-13 14:30:53116
117#if !defined(__has_feature) || !__has_feature(objc_arc)
118#error "This file requires ARC support."
119#endif
sdefresne14900ee2015-11-27 14:43:21120
elawrence816f6790e2017-06-16 18:19:28121using flags_ui::FeatureEntry;
122
sdefresne14900ee2015-11-27 14:43:21123namespace {
Emily Starkbafa9062017-12-27 15:22:46124
Olivier Robin3d60411622018-02-23 10:03:22125const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
126 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
127 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
128 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
129 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
130 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
131 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
132 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
133 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
134 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
135};
136
Nohemi Fernandezc00842a2021-07-26 11:47:34137const FeatureEntry::Choice
138 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
139 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
140 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
141 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
142 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
143};
144
Stepan Khapugincc4e9842019-01-23 13:38:13145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
151const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
152 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
153const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
154 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
155const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
156 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
157const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
158 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
159
160const FeatureEntry::FeatureVariation
161 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
162 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13168 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53169 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13170 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53171 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13172 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53173 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13174 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53175 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13176
Stepan Khapuginbac467e2022-05-06 21:11:54177const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
178 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
179const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
180 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
181const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
182 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
183
184const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
185 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
186 nullptr},
187 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
188 nullptr},
189 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
190 nullptr},
191};
192
Christian Xucf26d562022-07-06 09:28:36193const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
194 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
195const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
196 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
197const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
198 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
199
200const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
201 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
202 nullptr},
203 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
204 nullptr},
205 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
206 nullptr},
207};
208
Cheick Cissef37087902022-10-07 19:01:41209const FeatureEntry::FeatureParam kWhatsNewModuleLayout[] = {
210 {kWhatsNewModuleBasedLayoutParam, "true"}};
211
212const FeatureEntry::FeatureVariation kWhatsNewLayoutVariations[] = {
213 {"Display module layout", kWhatsNewModuleLayout,
214 std::size(kWhatsNewModuleLayout), nullptr},
215};
216
Caitlin Fischer37e01232019-05-24 13:05:45217const FeatureEntry::FeatureParam
218 kAutofillUseMobileLabelDisambiguationShowAll[] = {
219 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
220 autofill::features::
221 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
222const FeatureEntry::FeatureParam
223 kAutofillUseMobileLabelDisambiguationShowOne[] = {
224 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
225 autofill::features::
226 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
227
228const FeatureEntry::FeatureVariation
229 kAutofillUseMobileLabelDisambiguationVariations[] = {
230 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53231 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45232 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53233 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45234
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10235const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59236 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
237 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
238const FeatureEntry::FeatureVariation
239 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
240 {"Remind me later",
241 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53242 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59243 nullptr}};
244
Mohammad Refaatab6bee62022-05-16 16:31:15245const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = {
adamtadb0bfc62022-08-01 17:37:47246 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"},
247 {kDiscoverFeedTopSyncPromoStyleCompact, "false"}};
Mohammad Refaatab6bee62022-05-16 16:31:15248const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = {
adamtadb0bfc62022-08-01 17:37:47249 {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"},
250 {kDiscoverFeedTopSyncPromoStyleCompact, "true"}};
251
Mohammad Refaatab6bee62022-05-16 16:31:15252const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
253 {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle,
254 std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr},
255 {"Compact", kDiscoverFeedTopSyncPromoCompact,
256 std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}};
257
gogerald53c6e7a2021-04-15 22:07:35258const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08259 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35260 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
261const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08262 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35263 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
264const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08265 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35266 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
267const FeatureEntry::FeatureParam
268 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
269 {kStartSurfaceShrinkLogoParam, "true"},
270 {kStartSurfaceReturnToRecentTabParam, "true"},
271 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
272const FeatureEntry::FeatureParam
273 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
274 {kStartSurfaceHideShortcutsParam, "true"},
275 {kStartSurfaceReturnToRecentTabParam, "true"},
276 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
277const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08278 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35279 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
280const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
281 {kStartSurfaceHideShortcutsParam, "true"},
282 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
283const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08284 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35285 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
286const FeatureEntry::FeatureParam
287 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
288 {kStartSurfaceShrinkLogoParam, "true"},
289 {kStartSurfaceReturnToRecentTabParam, "true"},
290 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
291const FeatureEntry::FeatureParam
292 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
293 {kStartSurfaceHideShortcutsParam, "true"},
294 {kStartSurfaceReturnToRecentTabParam, "true"},
295 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08296
gogerald0e39e3aa2021-02-10 18:41:23297const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35298 {"10s:Show Return to Recent Tab tile",
299 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53300 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35301 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53302 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35303 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53304 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35305 {"10s:Shrink Logo and show Return to Recent Tab tile",
306 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53307 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35308 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
309 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53310 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35311 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53312 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35313 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53314 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35315 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53316 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35317 {"1h:Shrink Logo and show Return to Recent Tab tile",
318 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53319 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35320 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
321 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53322 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08323};
gogerald0e39e3aa2021-02-10 18:41:23324
Chris Lu8e308dc2022-09-06 16:59:40325const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = {
326 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}};
327const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = {
Chris Lu264e2372022-09-08 13:12:57328 {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"},
Chris Lu8e308dc2022-09-06 16:59:40329 {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}};
330
331const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = {
332 {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing,
333 std::size(kModuleRefreshMinimizeSpacing), nullptr},
Chris Lu264e2372022-09-08 13:12:57334 {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders,
Chris Lu8e308dc2022-09-06 16:59:40335 std::size(kModuleRefreshNoHeaders), nullptr},
336};
337
Ed Chin91e44992022-07-27 13:42:34338#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26339// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01340const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04341 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
342 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01343 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04344 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01345const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04346 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
347 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01348 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04349 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01350const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04351 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
352 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01353 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04354 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01355const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04356 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
357 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01358 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04359 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01360const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04361 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
362 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01363 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
364 {kBackgroundRefreshIntervalInSeconds, "0"}};
365const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04366 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
367 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01368 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
369 {kBackgroundRefreshIntervalInSeconds, "0"}};
370const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
371 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
372 {kEnableRecurringBackgroundRefreshSchedule, "false"},
373 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
374 {kBackgroundRefreshIntervalInSeconds, "0"}};
375const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
376 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
377 {kEnableRecurringBackgroundRefreshSchedule, "true"},
378 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
379 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04380
Ed Chin178ec2a2023-02-10 22:21:26381// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04382const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01383 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
384 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
385 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
386 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
387 {"1hr Interval 1hr Max Age Recurring",
388 kOneHourIntervalOneHourMaxAgeRecurring,
389 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
390 {"4hr Interval 6hr Max Age Recurring",
391 kFourHourIntervalSixHourMaxAgeRecurring,
392 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
393 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
394 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
395 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
396 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
397 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
398 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
399 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
400 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04401};
Ed Chin91e44992022-07-27 13:42:34402#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04403
Ed Chin178ec2a2023-02-10 22:21:26404// Feed Foreground Refresh Feature Params.
405const FeatureEntry::FeatureParam kFeedRefreshPostFeedSessionOnly[] = {
406 {kEnableFeedRefreshPostFeedSession, "true"},
407 {kEnableFeedRefreshOnAppBackgrounding, "false"}};
408const FeatureEntry::FeatureParam kFeedRefreshOnAppBackgroundingOnly[] = {
409 {kEnableFeedRefreshPostFeedSession, "false"},
410 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
411const FeatureEntry::FeatureParam kFeedForegroundRefreshAll[] = {
412 {kEnableFeedRefreshPostFeedSession, "true"},
413 {kEnableFeedRefreshOnAppBackgrounding, "true"}};
414
415// Feed Foreground Refresh Feature Variations.
416const FeatureEntry::FeatureVariation kFeedForegroundRefreshVariations[] = {
417 {"Post Feed session", kFeedRefreshPostFeedSessionOnly,
418 std::size(kFeedRefreshPostFeedSessionOnly), nullptr},
419 {"On app backgrounding", kFeedRefreshOnAppBackgroundingOnly,
420 std::size(kFeedRefreshOnAppBackgroundingOnly), nullptr},
421 {"All foreground refresh methods", kFeedForegroundRefreshAll,
422 std::size(kFeedForegroundRefreshAll), nullptr},
423};
424
Chris Luc9a5cb12022-07-20 16:11:39425const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = {
Chris Lu85e8cc642022-09-23 20:27:58426 {kTrendingQueriesHideShortcutsParam, "false"}};
Chris Luc9a5cb12022-07-20 16:11:39427const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] =
Chris Lu85e8cc642022-09-23 20:27:58428 {{kTrendingQueriesHideShortcutsParam, "true"}};
Chris Luc9a5cb12022-07-20 16:11:39429const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = {
430 {kTrendingQueriesHideShortcutsParam, "false"},
431 {kTrendingQueriesDisabledFeedParam, "true"},
Chris Lu85e8cc642022-09-23 20:27:58432};
Chris Luc9a5cb12022-07-20 16:11:39433
434const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = {
435 {"Enabled All Users", kTrendingQueriesEnableAllUsers,
436 std::size(kTrendingQueriesEnableAllUsers), nullptr},
437 {"Enabled All Users Hide Shortcuts",
438 kTrendingQueriesEnableAllUsersHideShortcuts,
439 std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr},
440 {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled,
441 std::size(kTrendingQueriesEnableFeedDisabled), nullptr},
Chris Luc9a5cb12022-07-20 16:11:39442};
443
Igor Ruvinov44fed9f2022-06-10 22:51:42444const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}};
445const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = {
446 {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam),
447 nullptr}};
448
Aliona DANGLA00ae7db2022-10-04 16:58:50449const FeatureEntry::FeatureParam kOpenInDownloadInShareButton[] = {
Ewann Pelleec8ef892022-10-20 13:13:58450 {kOpenInDownloadParameterName, kOpenInDownloadInShareButtonParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49451const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = {
Ewann Pelleec8ef892022-10-20 13:13:58452 {kOpenInDownloadParameterName, kOpenInDownloadWithWKDownloadParam}};
Aliona DANGLAa5257ccc2022-08-29 14:01:49453const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = {
Ewann Pelleec8ef892022-10-20 13:13:58454 {kOpenInDownloadParameterName, kOpenInDownloadWithV2Param}};
455
Aliona DANGLAa5257ccc2022-08-29 14:01:49456const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = {
Aliona DANGLA00ae7db2022-10-04 16:58:50457 {"With legacy download", kOpenInDownloadInShareButton,
458 std::size(kOpenInDownloadInShareButton), nullptr},
Aliona DANGLAa5257ccc2022-08-29 14:01:49459 {"With WKDownload", kOpenInDownloadWithWKDownload,
460 std::size(kOpenInDownloadWithWKDownload), nullptr},
461 {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2),
462 nullptr},
463};
464
Ewann Pelle3774cac532022-11-15 10:12:37465const FeatureEntry::FeatureParam kEnablePinnedTabsBottomPosition[] = {
466 {kEnablePinnedTabsParameterName, kEnablePinnedTabsBottomParam}};
Ewann Pelleca00bab2022-12-16 14:49:39467const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowBottomPosition[] = {
468 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowBottomParam}};
469const FeatureEntry::FeatureParam kEnablePinnedTabsOverflowTopPosition[] = {
470 {kEnablePinnedTabsParameterName, kEnablePinnedTabsOverflowTopParam}};
Ewann Pelle3774cac532022-11-15 10:12:37471
472const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
473 {"bottom pinned tabs", kEnablePinnedTabsBottomPosition,
474 std::size(kEnablePinnedTabsBottomPosition), nullptr},
Ewann Pelleca00bab2022-12-16 14:49:39475 {"overflow + bottom pinned tabs", kEnablePinnedTabsOverflowBottomPosition,
476 std::size(kEnablePinnedTabsOverflowBottomPosition), nullptr},
477 {"overflow + top pinned tabs", kEnablePinnedTabsOverflowTopPosition,
478 std::size(kEnablePinnedTabsOverflowTopPosition), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37479};
480
ginnnnnnny591a4972022-09-01 16:10:27481const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = {
482 {autofill::features::kAutofillBrandingIOSParam, "true"}};
483const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
484 {"(Monotone)", kAutofillBrandingIOSMonotone,
485 std::size(kAutofillBrandingIOSMonotone), nullptr}};
486
Scott Yodercb2fe632022-09-12 15:28:35487const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = {
Benjamin Williams3d3a2ec2022-09-13 20:01:26488 {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}};
Scott Yodercb2fe632022-09-12 15:28:35489const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] =
490 {{"minimal", kIOSNewPostRestoreExperienceMinimal,
491 std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}};
492
Benjamin Williamsaa8da8142022-11-14 19:51:03493const FeatureEntry::FeatureParam kIOSPopularSitesExcludePopularApps[] = {
494 {ntp_tiles::kIOSPopularSitesExcludePopularAppsParam, "true"}};
495const FeatureEntry::FeatureVariation
496 kIOSPopularSitesImprovedSuggestionsVariations[] = {
497 {"(Exclude popular apps)", kIOSPopularSitesExcludePopularApps,
498 std::size(kIOSPopularSitesExcludePopularApps), nullptr}};
499
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28500const FeatureEntry::FeatureParam kEnableExperienceKitMapsWithSrp[] = {
501 {kExperienceKitMapsVariationName, kEnableExperienceKitMapsVariationSrp}};
502const FeatureEntry::FeatureVariation kEnableExperienceKitMapsVariations[] = {
503 {"with search result page", kEnableExperienceKitMapsWithSrp,
504 std::size(kEnableExperienceKitMapsWithSrp), nullptr}};
505
adamta3811f9182022-10-24 17:49:33506const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
507 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
508 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
509const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
510 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
511 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
512
513const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
514 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
515 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
516 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
517 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
518
Quentin Pubert154fc6a2023-01-09 15:58:58519const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
520 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
521const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
522 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
523 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
524
Louis Romero93e9b50a2023-01-26 01:46:12525const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
526 {kTabInactivityThresholdParameterName,
527 kTabInactivityThresholdOneWeekParam}};
528const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
529 {kTabInactivityThresholdParameterName,
530 kTabInactivityThresholdTwoWeeksParam}};
531const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
532 {kTabInactivityThresholdParameterName,
533 kTabInactivityThresholdThreeWeeksParam}};
534
535const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
536 {"One week", kTabInactivityThresholdOneWeek,
537 std::size(kTabInactivityThresholdOneWeek), nullptr},
538 {"Two weeks", kTabInactivityThresholdTwoWeeks,
539 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
540 {"Three weeks", kTabInactivityThresholdThreeWeeks,
541 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
542};
543
Huiting Yud7d2a5322023-02-09 21:14:22544const FeatureEntry::FeatureParam
545 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
546 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
547const FeatureEntry::FeatureParam
548 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
549 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
550const FeatureEntry::FeatureParam
551 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
552 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
553
554const FeatureEntry::FeatureVariation
555 kCredentialProviderExtensionPromoVariations[] = {
556 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
557 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
558 {"On password copied",
559 kCredentialProviderExtensionPromoOnPasswordCopied,
560 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
561 {"On successful login with autofill",
562 kCredentialProviderExtensionPromoOnLoginWithAutofill,
563 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
564 nullptr},
565};
566
Cooper Knaak1e026562017-07-26 05:22:28567// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21568// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28569// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
570// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21571// macro for this type supplying the command line to the macro.
572// . MULTI_VALUE: a list of choices, the first of which should correspond to a
573// deactivated state for this lab (i.e. no command line option). To specify
574// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
575// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28576// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
577// either enabled, disabled, or uses the default value of the associated
578// base::Feature instance. To specify this type of entry use the macro
579// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
580// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
581// base::Feature instance. Choices corresponding to the default state, a
582// universally enabled state, and a universally disabled state are
583// automatically included. To specify this type of entry use the macro
584// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
585// the array of choices.
586//
sdefresne14900ee2015-11-27 14:43:21587// See the documentation of FeatureEntry for details on the fields.
588//
589// When adding a new choice, add it to the end of the list.
590const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28591 {"in-product-help-demo-mode-choice",
592 flag_descriptions::kInProductHelpDemoModeName,
593 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
594 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23595 feature_engagement::kIPHDemoMode,
596 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09597 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22598 {"enable-autofill-credit-card-upload",
599 flag_descriptions::kAutofillCreditCardUploadName,
600 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24601 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23602 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
603 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
604 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51605 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23606 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
607 {"wallet-service-use-sandbox",
608 flag_descriptions::kWalletServiceUseSandboxName,
609 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
610 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
611 autofill::switches::kWalletServiceUseSandbox,
612 "1",
613 autofill::switches::kWalletServiceUseSandbox,
614 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59615 {"show-autofill-type-predictions",
616 flag_descriptions::kShowAutofillTypePredictionsName,
617 flag_descriptions::kShowAutofillTypePredictionsDescription,
618 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46619 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26620 {"autofill-account-profiles-union-view",
621 flag_descriptions::kAutofillAccountProfilesUnionViewName,
622 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
623 flags_ui::kOsIos,
624 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22625 {"autofill-ios-delay-between-fields",
626 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
627 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
628 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williams14233d72022-07-26 18:32:20629 {"fullscreen-promos-manager",
630 flag_descriptions::kFullscreenPromosManagerName,
631 flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos,
632 FEATURE_VALUE_TYPE(kFullscreenPromosManager)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05633 {"fullscreen-promos-manager-skip-internal-limits",
634 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
635 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
636 flags_ui::kOsIos,
637 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14638 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53639 flag_descriptions::kFullscreenSmoothScrollingName,
640 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
641 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06642 {"webpage-default-zoom-from-dynamic-type",
643 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
644 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
645 flags_ui::kOsIos,
646 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56647 {"webpage-alternative-text-zoom",
648 flag_descriptions::kWebPageAlternativeTextZoomName,
649 flag_descriptions::kWebPageAlternativeTextZoomDescription,
650 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34651 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
652 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
653 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Kurt Horimoto79d590b2018-09-12 19:09:28654 {"toolbar-container", flag_descriptions::kToolbarContainerName,
655 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
656 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13657 {"omnibox-ui-max-autocomplete-matches",
658 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
659 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
660 flags_ui::kOsIos,
661 FEATURE_WITH_PARAMS_VALUE_TYPE(
662 omnibox::kUIExperimentMaxAutocompleteMatches,
663 kOmniboxUIMaxAutocompleteMatchesVariations,
664 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35665 {"omnibox-local-history-zero-suggest-beyond-ntp",
666 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
667 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
668 flags_ui::kOsIos,
669 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54670 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
671 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
672 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
673 kOmniboxMaxZPSMatchesVariations,
674 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45675
676 {"omnibox-most-visited-tiles-on-srp",
677 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
678 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
679 flags_ui::kOsIos,
680 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30681 {"autofill-use-mobile-label-disambiguation",
682 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
683 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
684 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45685 FEATURE_WITH_PARAMS_VALUE_TYPE(
686 autofill::features::kAutofillUseMobileLabelDisambiguation,
687 kAutofillUseMobileLabelDisambiguationVariations,
688 "AutofillUseMobileLabelDisambiguation")},
Mike Doughertyb6c770d2019-09-13 22:56:46689 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
690 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30691 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Jérôme Lebelc374fdd2019-09-27 10:36:48692 {"force-startup-signin-promo",
693 flag_descriptions::kForceStartupSigninPromoName,
694 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29695 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Tanmoy Mollik429d21a2022-11-28 15:42:06696 {"identity-status-consistency",
697 flag_descriptions::kIdentityStatusConsistencyName,
698 flag_descriptions::kIdentityStatusConsistencyDescription, flags_ui::kOsIos,
699 FEATURE_VALUE_TYPE(switches::kIdentityStatusConsistency)},
Yoichi Osato7ae11752021-03-16 03:27:22700 {"restore-session-from-cache",
701 flag_descriptions::kRestoreSessionFromCacheName,
702 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49703 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09704 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
705 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
706 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41707 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
708 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
709 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13710#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45711 {"screen-time-integration-ios",
712 flag_descriptions::kScreenTimeIntegrationName,
713 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
714 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13715#endif
Nazerke3e993f72020-09-21 13:00:06716 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
717 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
718 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55719 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
720 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
721 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14722 {"default-browser-fullscreen-promo-experiment",
723 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
724 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
725 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59726 FEATURE_WITH_PARAMS_VALUE_TYPE(
727 kDefaultBrowserFullscreenPromoExperiment,
728 kDefaultBrowserFullscreenPromoExperimentVariations,
729 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11730 {"ios-shared-highlighting-color-change",
731 flag_descriptions::kIOSSharedHighlightingColorChangeName,
732 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07733 flags_ui::kOsIos,
734 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34735 {"ios-shared-highlighting-v2",
736 flag_descriptions::kIOSSharedHighlightingV2Name,
737 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
738 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45739 {"omnibox-new-textfield-implementation",
740 flag_descriptions::kOmniboxNewImplementationName,
741 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
742 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26743 {"omnibox-on-focus-suggestions-contextual-web",
744 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
745 flag_descriptions::
746 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
747 flags_ui::kOsIos,
748 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
749 {"omnibox-on-focus-suggestions-srp",
750 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
751 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
752 flags_ui::kOsIos,
753 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12754 {"omnibox-report-assisted-query-stats",
755 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
756 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
757 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
758 {"omnibox-report-searchbox-stats",
759 flag_descriptions::kOmniboxReportSearchboxStatsName,
760 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
761 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15762 {"omnibox-fuzzy-url-suggestions",
763 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
764 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
765 flags_ui::kOsIos,
766 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19767 {"start-surface", flag_descriptions::kStartSurfaceName,
768 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23769 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
770 kStartSurfaceVariations,
771 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42772 {"autofill-address-verification-in-save-prompt",
773 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
774 flag_descriptions::
775 kEnableAutofillAddressSavePromptAddressVerificationDescription,
776 flags_ui::kOsIos,
777 FEATURE_VALUE_TYPE(
778 autofill::features::
779 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25780 {"filling-across-affiliated-websites",
781 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
782 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
783 flags_ui::kOsIos,
784 FEATURE_VALUE_TYPE(
785 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19786 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
787 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
788 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34789 {"wait-threshold-seconds-for-capabilities-api",
790 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
791 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
792 flags_ui::kOsIos,
793 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23794 {"autofill-fill-merchant-promo-code-fields",
795 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
796 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
797 flags_ui::kOsIos,
798 FEATURE_VALUE_TYPE(
799 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03800 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
801 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
802 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsondf097a72022-09-05 08:17:18803 {"new-overflow-menu-alternate-iph",
804 flag_descriptions::kNewOverflowMenuAlternateIPHName,
805 flag_descriptions::kNewOverflowMenuAlternateIPHDescription,
806 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)},
Evan Bernstein0a85f332021-09-29 19:07:24807 {"use-lens-to-search-for-image",
808 flag_descriptions::kUseLensToSearchForImageName,
809 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44810 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Jason Hu3830a072022-08-19 20:56:22811 {"enable-lens-in-home-screen-widget",
812 flag_descriptions::kEnableLensInHomeScreenWidgetName,
813 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
814 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
815 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
816 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
817 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
818 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
819 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
820 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03821 {"enable-lens-context-menu-alt-text",
822 flag_descriptions::kEnableLensContextMenuAltTextName,
823 flag_descriptions::kEnableLensContextMenuAltTextDescription,
824 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44825 {"enable-lens-in-omnibox-copied-image",
826 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
827 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
828 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40829 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23830 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
831 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40832 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23833 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03834 {"enable-disco-feed-endpoint",
835 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
836 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
837 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11838 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15839 {"enable-discover-feed-top-sync-promo",
840 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
841 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
842 flags_ui::kOsIos,
843 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
844 kDiscoverFeedTopSyncPromoVariations,
845 "EnableDiscoverFeedTopSyncPromo")},
Guillem Perezc49aeebd2023-01-25 00:00:41846 {"enable-hiding-mvt-shortcuts",
847 flag_descriptions::kHideMVTAndShortcutsForNewUsersName,
848 flag_descriptions::kHideMVTAndShortcutsForNewUsersDescription,
849 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kHideMVTAndShortcutsForNewUsers)},
850
Tommy Martino7393d762021-10-12 17:59:28851 {"shared-highlighting-amp",
852 flag_descriptions::kIOSSharedHighlightingAmpName,
853 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
854 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28855 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42856 commerce::flag_descriptions::kCommercePriceTrackingName,
857 commerce::flag_descriptions::kCommercePriceTrackingDescription,
858 flags_ui::kOsIos,
859 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
860 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15861 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06862 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
863 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
864 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54865 {"ntp-view-hierarchy-repair",
866 flag_descriptions::kNTPViewHierarchyRepairName,
867 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20868 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26869 {"synthesized-restore-session",
870 flag_descriptions::kSynthesizedRestoreSessionName,
871 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
872 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
ginnnnnnnyee3036e2022-08-12 18:01:18873 {"ios-media-permissions-control",
874 flag_descriptions::kMediaPermissionsControlName,
875 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
876 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Ewann8c7aadc2022-05-19 15:41:05877 {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName,
878 flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos,
879 FEATURE_VALUE_TYPE(kUseSFSymbols)},
David Jeanc2b88ab602022-08-08 14:52:51880 {"ios-webpage-intent-annotations",
881 flag_descriptions::kEnableWebPageAnnotationsName,
882 flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos,
883 FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26884 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
885 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
886 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:01887 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
888 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
889 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:43890 {"enable-tailored-security-integration",
891 flag_descriptions::kTailoredSecurityIntegrationName,
892 flag_descriptions::kTailoredSecurityIntegrationDescription,
893 flags_ui::kOsIos,
894 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:26895 {"autofill-enable-card-product-name",
896 flag_descriptions::kAutofillEnableCardProductNameName,
897 flag_descriptions::kAutofillEnableCardProductNameDescription,
898 flags_ui::kOsIos,
899 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00900 {"send-tab-to-self-signin-promo",
901 flag_descriptions::kSendTabToSelfSigninPromoName,
902 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
903 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:22904 {"autofill-enforce-delays-in-strike-database",
905 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
906 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
907 flags_ui::kOsIos,
908 FEATURE_VALUE_TYPE(
909 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:41910 {"autofill-upstream-allow-additional-email-domains",
911 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
912 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
913 flags_ui::kOsIos,
914 FEATURE_VALUE_TYPE(
915 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
916 {"autofill-upstream-allow-all-email-domains",
917 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
918 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
919 flags_ui::kOsIos,
920 FEATURE_VALUE_TYPE(
921 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:52922 {"enable-download-service-foreground-session",
923 flag_descriptions::kDownloadServiceForegroundSessionName,
924 flag_descriptions::kDownloadServiceForegroundSessionDescription,
925 flags_ui::kOsIos,
926 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:23927 {"enable-tflite-language-detection",
928 flag_descriptions::kTFLiteLanguageDetectionName,
929 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
930 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:20931 {"optimization-guide-debug-logs",
932 flag_descriptions::kOptimizationGuideDebugLogsName,
933 flag_descriptions::kOptimizationGuideDebugLogsDescription,
934 flags_ui::kOsIos,
935 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Olivier Robinffe767c2022-04-21 13:13:23936 {"optimization-guide-model-downloading",
937 flag_descriptions::kOptimizationGuideModelDownloadingName,
938 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
939 flags_ui::kOsIos,
940 FEATURE_VALUE_TYPE(
941 optimization_guide::features::kOptimizationGuideModelDownloading)},
942 {"optimization-target-prediction",
943 flag_descriptions::kOptimizationTargetPredictionName,
944 flag_descriptions::kOptimizationTargetPredictionDescription,
945 flags_ui::kOsIos,
946 FEATURE_VALUE_TYPE(
947 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54948 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
949 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
950 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
951 {"sync-standalone-invalidations-wallet-and-offer",
952 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
953 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
954 flags_ui::kOsIos,
955 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01956 {"suggestions-scrolling-ipad",
957 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
958 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
959 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:00960 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
961 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
962 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
David Jean7a8fa702022-05-02 15:21:22963 {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName,
964 flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos,
965 FEATURE_VALUE_TYPE(kCalendarExperienceKit)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:25966 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
967 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
968 FEATURE_VALUE_TYPE(kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:55969 {"experience-kit-apple-calendar",
970 flag_descriptions::kAppleCalendarExperienceKitName,
971 flag_descriptions::kAppleCalendarExperienceKitDescription,
972 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Zhixiang Teoh82d17bb2022-06-16 21:00:39973 {"enable-expkit-calendar-text-classifier",
974 flag_descriptions::kEnableExpKitCalendarTextClassifierName,
975 flag_descriptions::kEnableExpKitCalendarTextClassifierDescription,
976 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)},
Raj T7db7a0e2022-11-17 16:33:08977 {"enable-expkit-text-classifier",
978 flag_descriptions::kEnableExpKitTextClassifierName,
979 flag_descriptions::kEnableExpKitTextClassifierDescription,
980 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitTextClassifier)},
Elmehdi Rahmaoui9d4ce40c62022-08-05 15:31:18981 {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName,
982 flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui3d549fc2022-10-20 14:31:28983 FEATURE_WITH_PARAMS_VALUE_TYPE(kMapsExperienceKit,
984 kEnableExperienceKitMapsVariations,
985 "IOSExperienceKitMaps")},
Elmehdi Rahmaouic699dc12022-10-12 11:17:05986 {"enable-long-press-surrounding-text",
987 flag_descriptions::kLongPressSurroundingTextName,
988 flag_descriptions::kLongPressSurroundingTextDescription, flags_ui::kOsIos,
989 FEATURE_VALUE_TYPE(web::features::kLongPressSurroundingText)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:01990 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
991 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
992 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:25993 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
994 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
995 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williams419c81e2022-05-04 18:33:22996 {"smart-sorting-new-overflow-menu",
997 flag_descriptions::kSmartSortingNewOverflowMenuName,
998 flag_descriptions::kSmartSortingNewOverflowMenuDescription,
999 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)},
Benjamin Williamsf721fc22023-01-10 23:28:251000 {"smart-sorting-price-tracking-destination",
1001 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1002 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1003 flags_ui::kOsIos,
1004 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441005 {"new-overflow-menu-share-chrome-action",
1006 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1007 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1008 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301009 {"autofill-enable-ranking-formula-address-profiles",
1010 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1011 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1012 flags_ui::kOsIos,
1013 FEATURE_VALUE_TYPE(
1014 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391015 {"autofill-enable-ranking-formula-credit-cards",
1016 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1017 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1018 flags_ui::kOsIos,
1019 FEATURE_VALUE_TYPE(
1020 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021021 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1022 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1023 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021024 {"enable-feed-bottom-sign-in-promo",
1025 flag_descriptions::kEnableFeedBottomSignInPromoName,
1026 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1027 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1028 {"enable-feed-card-menu-sign-in-promo",
1029 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1030 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1031 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Lu7f024ed2c2022-05-27 23:11:271032 {"content-suggestions-ui-module-refresh",
1033 flag_descriptions::kContentSuggestionsUIModuleRefreshName,
1034 flag_descriptions::kContentSuggestionsUIModuleRefreshDescription,
Chris Lu8e308dc2022-09-06 16:59:401035 flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581036 FEATURE_WITH_PARAMS_VALUE_TYPE(
1037 kContentSuggestionsUIModuleRefresh,
1038 kModuleRefreshVariations,
1039 kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)},
Quentin Pubertd7546ae2022-05-30 14:28:571040 {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName,
1041 flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos,
1042 FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)},
Olivier Robin058c1fad2022-05-31 18:24:061043 {"default-browser-intents-show-settings",
1044 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1045 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1046 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Igor Ruvinova43a66dc2022-06-09 21:57:451047 {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName,
1048 flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos,
Igor Ruvinov44fed9f2022-06-10 22:51:421049 FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion,
1050 kDmTokenDeletionVariation,
1051 "DmTokenDeletion")},
Tommy Martinoad42be52022-06-13 11:51:191052 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1053 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1054 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Theodor-Stefan Cristea6d087b82022-07-26 15:25:291055 {"ios-password-manager-cross-origin-iframe-support",
1056 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName,
1057 flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription,
1058 flags_ui::kOsIos,
1059 FEATURE_VALUE_TYPE(password_manager::features::
1060 kIOSPasswordManagerCrossOriginIframeSupport)},
Benjamin Williamsaa8da8142022-11-14 19:51:031061 {"ios-popular-sites-improved-suggestions",
1062 flag_descriptions::kIOSPopularSitesImprovedSuggestionsName,
1063 flag_descriptions::kIOSPopularSitesImprovedSuggestionsDescription,
1064 flags_ui::kOsIos,
1065 FEATURE_WITH_PARAMS_VALUE_TYPE(
1066 ntp_tiles::kIOSPopularSitesImprovedSuggestions,
1067 kIOSPopularSitesImprovedSuggestionsVariations,
1068 field_trial_constants::
1069 kIOSPopularSitesImprovedSuggestionsFieldTrialName)},
Christian Xud105a1352022-06-17 19:54:141070 {"omnibox-adaptive-suggestions-count",
1071 flag_descriptions::kAdaptiveSuggestionsCountName,
1072 flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos,
1073 FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)},
Chris Lu2fd473f2022-06-28 13:38:201074 {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName,
1075 flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos,
Chris Lu85e8cc642022-09-23 20:27:581076 FEATURE_WITH_PARAMS_VALUE_TYPE(
1077 kTrendingQueriesModule,
1078 kTrendingQueriesModuleVariations,
1079 kTrendingQueriesFlagOverrideFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321080 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191081 flag_descriptions::kAutofillParseIBANFieldsName,
1082 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1083 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Ernesto Izquierdo Clua7f4e36e22022-07-01 09:38:361084 {"autofill-enable-new-card-unmask-prompt-view",
1085 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName,
1086 flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription,
1087 flags_ui::kOsIos,
ginnnnnnny591a4972022-09-01 16:10:271088 FEATURE_VALUE_TYPE(
1089 autofill::features::kAutofillEnableNewCardUnmaskPromptView)},
Moe Ahmadi098519d82022-07-27 18:34:241090 {"omnibox-zero-suggest-prefetching",
1091 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1092 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1093 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451094 {"omnibox-zero-suggest-prefetching-on-srp",
1095 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1096 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1097 flags_ui::kOsIos,
1098 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1099 {"omnibox-zero-suggest-prefetching-on-web",
1100 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1101 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1102 flags_ui::kOsIos,
1103 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471104 {"omnibox-zero-suggest-in-memory-caching",
1105 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1106 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1107 flags_ui::kOsIos,
1108 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351109 {"omnibox-on-device-tail-suggestions",
1110 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1111 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1112 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Vincent Boissellead6cbe22022-07-04 19:32:391113 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1114 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501115 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491116 {"enable-sync-history-datatype",
1117 flag_descriptions::kSyncEnableHistoryDataTypeName,
1118 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1119 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361120 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1121 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1122 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1123 kOmniboxMaxURLMatchesVariations,
1124 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061125 {"metrickit-non-crash-reports",
1126 flag_descriptions::kMetrickitNonCrashReportName,
1127 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1128 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371129 {"autofill-enable-remade-downstream-metrics",
1130 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1131 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1132 flags_ui::kOsIos,
1133 FEATURE_VALUE_TYPE(
1134 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551135 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1136 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1137 flag_descriptions::
1138 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1139 flags_ui::kOsIos,
1140 FEATURE_VALUE_TYPE(
1141 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Ed Chin91e44992022-07-27 13:42:341142#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1143 {"feed-background-refresh-ios",
1144 flag_descriptions::kFeedBackgroundRefreshName,
1145 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1146 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1147 kFeedBackgroundRefreshVariations,
1148 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261149#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1150 {"feed-foreground-refresh-ios",
1151 flag_descriptions::kFeedForegroundRefreshName,
1152 flag_descriptions::kFeedForegroundRefreshDescription, flags_ui::kOsIos,
1153 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedForegroundRefresh,
1154 kFeedForegroundRefreshVariations,
1155 "FeedForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191156 {"omnibox-keyboard-paste-button",
1157 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1158 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1159 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Ed Chin178ec2a2023-02-10 22:21:261160
Aliona DANGLAa5257ccc2022-08-29 14:01:491161 {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName,
1162 flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos,
1163 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload,
1164 kOpenInDownloadVariations,
1165 "EnableOpenInDownload")},
Cheick Cisse87a51cb2022-09-08 21:29:171166 {"whats-new-ios", flag_descriptions::kWhatsNewIOSName,
1167 flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos,
Cheick Cissef37087902022-10-07 19:01:411168 FEATURE_WITH_PARAMS_VALUE_TYPE(kWhatsNewIOS,
1169 kWhatsNewLayoutVariations,
1170 "WhatsNewLayoutVariations")},
ginnnnnnny591a4972022-09-01 16:10:271171 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1172 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1173 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1174 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051175 "AutofillBrandingIOS")},
1176 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1177 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1178 FEATURE_VALUE_TYPE(kAppStoreRating)},
Scott Yodercb2fe632022-09-12 15:28:351179 {"ios-new-post-restore-experience",
1180 flag_descriptions::kIOSNewPostRestoreExperienceName,
1181 flag_descriptions::kIOSNewPostRestoreExperienceDescription,
1182 flags_ui::kOsIos,
Benjamin Williams3d3a2ec2022-09-13 20:01:261183 FEATURE_WITH_PARAMS_VALUE_TYPE(
1184 post_restore_signin::features::kIOSNewPostRestoreExperience,
1185 kIOSNewPostRestoreExperienceVariations,
1186 "IOSNewPostRestoreExperience")},
Christian Xu6b90c2a32022-09-13 18:17:021187 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1188 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1189 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501190 {"enable-tflite-language-detection-ignore",
1191 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1192 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1193 flags_ui::kOsIos,
1194 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Louis Romeroc18612b962022-10-07 12:08:141195 {"keyboard-shortcuts-menu", flag_descriptions::kKeyboardShortcutsMenuName,
1196 flag_descriptions::kKeyboardShortcutsMenuDescription, flags_ui::kOsIos,
1197 FEATURE_VALUE_TYPE(kKeyboardShortcutsMenu)},
Tina Wang89ae4252022-10-14 00:39:471198 {"enable-check-visibility-on-attention-log-start",
1199 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1200 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1201 flags_ui::kOsIos,
1202 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1203 {"enable-refine-data-source-reload-reporting",
1204 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1205 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1206 flags_ui::kOsIos,
1207 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041208 {"enable-passwords-account-storage",
1209 flag_descriptions::kEnablePasswordsAccountStorageName,
1210 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1211 flags_ui::kOsIos,
1212 FEATURE_VALUE_TYPE(
1213 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331214 {"enable-default-following-feed-sort-type",
1215 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1216 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1217 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201218 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331219 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201220 "EnableFollowingFeedDefaultSortType")},
Gauthier Ambardd0187592022-11-03 16:31:131221 {"use-sf-symbols-omnibox", flag_descriptions::kUseSFSymbolsInOmniboxName,
1222 flag_descriptions::kUseSFSymbolsInOmniboxDescription, flags_ui::kOsIos,
1223 FEATURE_VALUE_TYPE(kUseSFSymbolsInOmnibox)},
Louis Romero1e2a88e92023-01-18 17:08:201224 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011225 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1226 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Ewann Pelle3774cac532022-11-15 10:12:371227 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1228 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1229 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1230 kEnablePinnedTabsVariations,
1231 "EnablePinnedTabs")},
Justin Cohen726a70bc42022-11-15 23:15:031232 {"remove-crash-infobar", flag_descriptions::kRemoveCrashInfobarName,
1233 flag_descriptions::kRemoveCrashInfobarDescription, flags_ui::kOsIos,
1234 FEATURE_VALUE_TYPE(kRemoveCrashInfobar)},
Hira Mahmoodea109752022-11-17 17:45:411235 {"credential-provider-extension-promo",
1236 flag_descriptions::kCredentialProviderExtensionPromoName,
1237 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221238 flags_ui::kOsIos,
1239 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1240 kCredentialProviderExtensionPromoVariations,
1241 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521242 {"default-browser-blue-dot-promo",
1243 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1244 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1245 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271246 {"ios-force-translate-enabled",
1247 flag_descriptions::kIOSForceTranslateEnabledName,
1248 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1249 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251250 {"iph-price-notifications-while-browsing",
1251 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1252 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1253 flags_ui::kOsIos,
1254 FEATURE_VALUE_TYPE(
1255 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411256 {"autofill-offer-to-save-card-with-same-last-four",
1257 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1258 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1259 flags_ui::kOsIos,
1260 FEATURE_VALUE_TYPE(
1261 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041262 {"omnibox-multiline-search-suggest",
1263 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1264 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1265 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501266 {"autofill-suggest-server-card-instead-of-local-card",
1267 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1268 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1269 flags_ui::kOsIos,
1270 FEATURE_VALUE_TYPE(
1271 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581272 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1273 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1274 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1275 kNativeFindInPageVariations,
1276 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551277 {"intents-on-email", flag_descriptions::kEmailName,
1278 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
1279 FEATURE_VALUE_TYPE(kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341280 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1281 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1282 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351283 {"multiline-fade-truncating-label",
1284 flag_descriptions::kMultilineFadeTruncatingLabelName,
1285 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1286 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301287 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1288 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1289 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391290 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1291 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1292 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
1293 {"ios-tabstrip-context-menu", flag_descriptions::kTabStripContextMenuName,
1294 flag_descriptions::kTabStripContextMenuDescription, flags_ui::kOsIos,
Louis Romero93e9b50a2023-01-26 01:46:121295 FEATURE_VALUE_TYPE(kTabStripContextMenu)},
1296 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1297 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1298 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1299 kTabInactivityThresholdVariations,
1300 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411301 {"enable-feed-image-caching",
1302 flag_descriptions::kEnableFeedImageCachingName,
1303 flag_descriptions::kEnableFeedImageCachingDescription, flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kEnableFeedImageCaching)},
1305 {"enable-feed-synthetic-capabilities",
1306 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1307 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1308 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Louis Romerob9661dbf02023-01-27 16:50:061309 {"close-all-tabs-confirmation",
1310 flag_descriptions::kCloseAllTabsConfirmationName,
1311 flag_descriptions::kCloseAllTabsConfirmationDescription, flags_ui::kOsIos,
1312 FEATURE_VALUE_TYPE(kCloseAllTabsConfirmation)},
Victor Hugo Vianna Silvabf1a43c2023-02-06 14:06:561313 {"ios-show-password-storage-in-save-infobar",
1314 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarName,
1315 flag_descriptions::kIOSShowPasswordStorageInSaveInfobarDescription,
1316 flags_ui::kOsIos,
1317 FEATURE_VALUE_TYPE(
1318 password_manager::features::kIOSShowPasswordStorageInSaveInfobar)},
Louis Romero93e9b50a2023-01-26 01:46:121319};
sdefresne14900ee2015-11-27 14:43:211320
Rohit Raobed794c2020-04-27 15:27:451321bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1322 return false;
1323}
1324
1325flags_ui::FlagsState& GetGlobalFlagsState() {
1326 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1327 nullptr);
1328 return *flags_state;
1329}
David Jean5ca263c2021-08-18 09:19:301330// Creates the experimental test policies map, used by AsyncPolicyLoader and
1331// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341332NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211333 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1334
Guillaume Jenkins25e9bd72020-08-27 17:39:061335 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551336 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061337 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551338
Guillaume Jenkins25e9bd72020-08-27 17:39:061339 // Set some sample policy values for testing if EnableSamplePolicies is set to
1340 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401341 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551342 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011343 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1344
Guillaume Jenkinseeb7007c2020-06-25 22:55:401345 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1346
1347 // 2 = Disable all variations
1348 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1349
1350 // 2 = Do not allow any site to show popups
1351 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1352
Tina Wang5abee802020-07-29 23:09:521353 // Set default search engine.
1354 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1355 @YES,
1356 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1357 @"http://www.google.com/search?q={searchTerms}",
1358 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021359 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521360
Tina Wang89068c842020-10-29 15:51:501361 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1362
Gauthier Ambard21b23702021-04-16 16:11:271363 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1364
Guillaume Jenkinseeb7007c2020-06-25 22:55:401365 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:011366
1367 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531368
1369 // 2 = Enhanced safe browsing protection
1370 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1371
1372 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291373
1374 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551375 }];
1376 }
1377
Ewann227a3c02021-04-19 12:04:541378 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041379 NSString* sync_policy_key =
1380 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301381 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541382 }
Ewann227a3c02021-04-19 12:04:541383
Ewann570a6302021-08-17 07:22:421384 // SyncTypesListDisabled policy.
1385 NSString* Sync_types_list_disabled_key =
1386 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1387 NSMutableArray* Sync_types_list_disabled_values =
1388 [[NSMutableArray alloc] init];
1389 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1390 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1391 }
1392 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1393 [Sync_types_list_disabled_values addObject:@"readingList"];
1394 }
1395 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1396 [Sync_types_list_disabled_values addObject:@"preferences"];
1397 }
1398 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1399 [Sync_types_list_disabled_values addObject:@"passwords"];
1400 }
1401 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1402 [Sync_types_list_disabled_values addObject:@"autofill"];
1403 }
1404 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1405 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1406 }
1407 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1408 [Sync_types_list_disabled_values addObject:@"tabs"];
1409 }
1410 if ([Sync_types_list_disabled_values count]) {
1411 [testing_policies addEntriesFromDictionary:@{
1412 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1413 }];
Ewann570a6302021-08-17 07:22:421414 }
1415
Gauthier Ambard073eaa92021-11-22 15:24:131416 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521417 NSString* incognito_policy_key =
1418 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1419 NSInteger incognito_mode_availability =
1420 [defaults integerForKey:incognito_policy_key];
1421 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521422 [testing_policies addEntriesFromDictionary:@{
1423 incognito_policy_key : @(incognito_mode_availability),
1424 }];
1425 }
1426
Ewann40a8f8a2021-07-29 10:01:201427 NSString* restriction_pattern =
1428 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1429 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291430 NSString* restrict_key =
1431 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201432 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291433 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201434 }];
1435 }
1436
Vincent Boisselle19200bc2021-09-01 17:58:251437 // If the sign-in policy is set (not "None"), add the policy key to the list
1438 // of enabled experimental policies, and set the value.
1439 NSString* const kSigninPolicyKey = @"BrowserSignin";
1440 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1441 if (signin_policy_mode) {
1442 // Remove the mode offset that was used to represent the unset policy.
1443 --signin_policy_mode;
1444 DCHECK(signin_policy_mode >= 0);
1445
Vincent Boisselle19200bc2021-09-01 17:58:251446 [testing_policies addEntriesFromDictionary:@{
1447 kSigninPolicyKey : @(signin_policy_mode),
1448 }];
1449 }
1450
Veronique Nguyen9b1044f2022-01-11 14:41:131451 // If the New Tab Page URL is set (not empty) add the value to the list of
1452 // test policies.
1453 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1454 if ([ntp_location length] > 0) {
1455 NSString* ntp_location_key =
1456 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1457 [testing_policies
1458 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571459 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131460 }
1461
Ali Juma9ec36d22022-03-28 14:53:121462 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1463 NSString* allow_backups_key =
1464 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1465 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1466 [allowed_experimental_policies addObject:allow_backups_key];
1467 }
1468
Guillaume Jenkins25e9bd72020-08-27 17:39:061469 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1470 // policy.
1471 if ([allowed_experimental_policies count] > 0) {
1472 [testing_policies setValue:allowed_experimental_policies
1473 forKey:base::SysUTF8ToNSString(
1474 policy::key::kEnableExperimentalPolicies)];
1475 }
1476
jlebel2eb40222022-05-06 11:15:421477 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1478 switch ([defaults integerForKey:metrics_reporting_key]) {
1479 case 1:
1480 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131481 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421482 break;
1483 case 2:
1484 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131485 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421486 break;
1487 default:
1488 // Metrics reporting not managed.
1489 break;
1490 }
1491
David Jean6f85d44f2021-08-19 08:08:451492 // Warning: Add new flags to TestingPoliciesHash() below.
1493
David Jean5ca263c2021-08-18 09:19:301494 return testing_policies;
1495}
David Jean6f85d44f2021-08-19 08:08:451496
David Jean5ca263c2021-08-18 09:19:301497} // namespace
1498
Gauthier Ambard02dbf022022-08-23 08:28:471499// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301500void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1501 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1502
1503 // Set the UA flag if UseMobileSafariUA is enabled.
1504 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1505 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1506 // Chrome puts its product token.
1507 int32_t major = 0;
1508 int32_t minor = 0;
1509 int32_t bugfix = 0;
1510 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1511 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1512
1513 command_line->AppendSwitchASCII(switches::kUserAgent,
1514 web::BuildMobileUserAgent(product));
1515 }
1516
1517 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341518 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301519
1520 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1521 // Management to enabled and add the token to the list of policies.
1522 NSString* token_key =
1523 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1524 NSString* token = [defaults stringForKey:token_key];
1525
1526 if ([token length] > 0) {
1527 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1528 [testing_policies setValue:token forKey:token_key];
1529 }
1530
Guillaume Jenkins57606d72020-08-13 17:32:551531 // If some policies were set, commit them to the app's registration defaults.
1532 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401533 NSDictionary* registration_defaults =
1534 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1535 [defaults registerDefaults:registration_defaults];
1536 }
1537
sdefresne14900ee2015-11-27 14:43:211538 // Freeform commandline flags. These are added last, so that any flags added
1539 // earlier in this function take precedence.
1540 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1541 base::CommandLine::StringVector flags;
1542 // Append an empty "program" argument.
1543 flags.push_back("");
1544
1545 // The number of flags corresponds to the number of text fields in
1546 // Experimental.plist.
1547 const int kNumFreeformFlags = 5;
1548 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1549 NSString* key =
1550 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1551 NSString* flag = [defaults stringForKey:key];
1552 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331553 // iOS keyboard replaces -- with —, so undo that.
1554 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1555 withString:@"--"
1556 options:0
1557 range:NSMakeRange(0, 1)];
1558 // To make things easier, allow flags with no dashes by prepending them
1559 // here. This also allows for flags that just have one dash if they
1560 // exist.
1561 if (![flag hasPrefix:@"-"]) {
1562 flag = [@"--" stringByAppendingString:flag];
1563 }
sdefresne14900ee2015-11-27 14:43:211564 flags.push_back(base::SysNSStringToUTF8(flag));
1565 }
1566 }
1567
1568 base::CommandLine temp_command_line(flags);
1569 command_line->AppendArguments(temp_command_line, false);
1570 }
msardafc76f662017-02-24 12:46:281571
justincohendacc85d2017-06-28 23:34:101572 // Populate command line flag for 3rd party keyboard omnibox workaround.
1573 NSString* enableThirdPartyKeyboardWorkaround =
1574 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1575 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1576 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1577 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1578 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1579 }
1580
Sylvain Defresned3cd8d92022-01-18 13:35:081581 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211582}
1583
sdefresne14900ee2015-11-27 14:43:211584void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1585 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181586 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111587 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531588 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211589}
1590
jkrcalbf073372016-07-29 07:21:311591std::vector<std::string> RegisterAllFeatureVariationParameters(
1592 flags_ui::FlagsStorage* flags_storage,
1593 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181594 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1595 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311596}
1597
sdefresne14900ee2015-11-27 14:43:211598void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1599 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501600 base::Value::List& supported_entries,
1601 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181602 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211603 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511604 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211605}
1606
1607void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1608 const std::string& internal_name,
1609 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181610 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1611 enable);
sdefresne14900ee2015-11-27 14:43:211612}
1613
1614void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181615 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211616}
1617
1618namespace testing {
1619
Elly Fong-Jones323ab1092021-08-23 22:36:311620base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1621 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531622 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211623}
1624
1625} // namespace testing