blob: 9d9689720b9f7768fc1ba3d2d88db0f49fc7d283 [file] [log] [blame]
sdefresne14900ee2015-11-27 14:43:211// Copyright 2012 The Chromium Authors. All rights reserved.
2// 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
Nazerke9c259052019-06-26 15:30:108#include "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
avi571943672015-12-22 02:12:4911#include <stddef.h>
12#include <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gregory Chatzinofff6523722017-11-21 01:33:5314#include "base/base_switches.h"
sdefresne14900ee2015-11-27 14:43:2115#include "base/bind.h"
danakjdb9ae7942020-11-11 16:01:3516#include "base/callback_helpers.h"
Hans Wennborg3a2fb61f2020-05-11 15:51:1617#include "base/check_op.h"
David Jean5ca263c2021-08-18 09:19:3018#import "base/mac/foundation_util.h"
Sylvain Defresne8327a2f2019-01-17 14:19:1819#include "base/no_destructor.h"
sdefresne14900ee2015-11-27 14:43:2120#include "base/strings/stringprintf.h"
21#include "base/strings/sys_string_conversions.h"
Sebastien Marchand75a7cdf2018-11-13 23:47:0322#include "base/system/sys_info.h"
Mohamad Ahmadic4df81f2017-12-20 04:41:5923#include "components/autofill/core/common/autofill_features.h"
Jared Sauld998539f2019-03-19 15:11:1724#include "components/autofill/core/common/autofill_payments_features.h"
Moe Ahmadid6d5d172018-06-20 17:20:2325#include "components/autofill/core/common/autofill_switches.h"
Olivier Robin3d60411622018-02-23 10:03:2226#include "components/autofill/ios/browser/autofill_switches.h"
Jesse McKenna85c1a59f2021-05-05 19:08:3027#include "components/breadcrumbs/core/features.h"
Matt Jones125dfb42022-02-11 17:23:4228#include "components/commerce/core/commerce_feature_list.h"
29#include "components/commerce/core/flag_descriptions.h"
Robbie Gibson5e3436632020-04-27 15:48:0430#include "components/content_settings/core/common/features.h"
sdefresne14900ee2015-11-27 14:43:2131#include "components/dom_distiller/core/dom_distiller_switches.h"
Guillaume Jenkins4e6ac1e2020-11-11 16:57:4032#include "components/enterprise/browser/enterprise_switches.h"
Tommy Nyquistc1d6dea12017-07-26 20:37:2333#include "components/feature_engagement/public/feature_constants.h"
34#include "components/feature_engagement/public/feature_list.h"
edchind847c0962021-03-03 18:17:0535#include "components/feed/feed_feature_list.h"
sdefresne14900ee2015-11-27 14:43:2136#include "components/flags_ui/feature_entry.h"
37#include "components/flags_ui/feature_entry_macros.h"
38#include "components/flags_ui/flags_storage.h"
39#include "components/flags_ui/flags_ui_switches.h"
Tanja Gornakb0985dd2018-10-11 17:24:4040#include "components/invalidation/impl/invalidation_switches.h"
noyau4cfb1332016-10-25 17:05:4241#include "components/ntp_tiles/switches.h"
Justin Donnelly33d712e2017-08-23 21:32:5142#include "components/omnibox/browser/omnibox_field_trial.h"
Tomasz Wiszkowskid938a1112019-03-06 18:01:5743#include "components/omnibox/common/omnibox_features.h"
Raj T3898f032021-08-19 23:51:2744#include "components/optimization_guide/core/optimization_guide_features.h"
Ioana Pandeled14ce9e2017-11-28 14:41:4645#include "components/password_manager/core/common/password_manager_features.h"
mathp9b4c11d2017-07-06 20:24:1346#include "components/payments/core/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4047#import "components/policy/core/common/policy_loader_ios_constants.h"
48#include "components/policy/policy_constants.h"
Joemer Ramos34175732022-02-14 18:59:1649#include "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2550#import "components/send_tab_to_self/features.h"
Tommy Martino0caf3362021-01-13 20:29:5851#include "components/shared_highlighting/core/common/shared_highlighting_features.h"
Valeriya Sinevicha79dc612018-09-25 14:49:0952#include "components/signin/core/browser/account_reconcilor.h"
Jérôme Lebelc374fdd2019-09-27 10:36:4853#include "components/signin/ios/browser/features.h"
Colin Blundell3517170e2019-07-11 08:16:3454#include "components/signin/public/base/signin_switches.h"
sdefresne36579782016-02-05 11:08:2555#include "components/strings/grit/components_strings.h"
Victor Hugo Vianna Silvaa48aa01c2022-02-09 20:38:2356#include "components/sync/base/command_line_switches.h"
57#include "components/sync/base/features.h"
Ewann570a6302021-08-17 07:22:4258#include "components/sync/base/pref_names.h"
Moe Ahmadie4cce1f2018-12-18 23:48:0159#include "components/translate/core/browser/translate_prefs.h"
Olivier Robinffe767c2022-04-21 13:13:2360#include "components/translate/core/common/translate_util.h"
Sylvain Defresneae6987e2018-03-01 13:21:4061#include "ios/chrome/browser/browsing_data/browsing_data_features.h"
sdefresne14900ee2015-11-27 14:43:2162#include "ios/chrome/browser/chrome_switches.h"
Eugene But2823dc7e2020-07-21 18:10:3763#include "ios/chrome/browser/crash_report/features.h"
Nazerke21bdc45a2019-07-11 09:02:0564#include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Ed Chin100660bf2022-04-26 16:59:1365#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselled042d552022-04-09 01:22:5966#include "ios/chrome/browser/policy/cloud/user_policy_switch.h"
edchin68696842020-04-09 17:19:3167#include "ios/chrome/browser/policy/policy_features.h"
Vincent Boisselle19200bc2021-09-01 17:58:2568#include "ios/chrome/browser/policy/policy_util.h"
Sylvain Defresne9c107082020-10-27 16:39:1369#include "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Olivier Robin3a957df2021-12-21 18:04:3470#import "ios/chrome/browser/sessions/session_features.h"
Gauthier Ambard33e03302019-02-21 13:28:5871#include "ios/chrome/browser/system_flags.h"
Louis Romeroac04f786a2022-04-19 09:39:3072#include "ios/chrome/browser/ui/bubble/bubble_features.h"
adamta22a4d502020-05-21 03:12:2173#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Javier Ernesto Flores Robles209b2822021-03-25 19:16:5074#import "ios/chrome/browser/ui/default_promo/default_browser_utils.h"
Ewann1a9d33d2021-06-14 11:12:2475#import "ios/chrome/browser/ui/download/features.h"
Aliona DANGLAebfd7d022021-10-08 14:15:4576#include "ios/chrome/browser/ui/first_run/fre_field_trial.h"
Kurt Horimoto4da682b022018-04-12 07:43:3577#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
adamta273568472020-12-04 23:53:5778#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
Tina Wang17514e2f2021-09-24 23:57:1879#import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_features.h"
Robbie Gibson686c56732021-10-04 17:11:4580#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
gogerald0ff29e52021-02-03 18:56:1981#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Nazerke0bf10c42020-11-12 11:17:3282#import "ios/chrome/browser/ui/tab_switcher/tab_grid/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2883#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Justin Cohen2d81c582018-01-22 14:46:4484#include "ios/chrome/browser/ui/ui_feature_flags.h"
Louis Romerofbfbd932022-04-15 18:04:5085#include "ios/chrome/browser/ui/util/features.h"
Yi Su392b3032018-06-05 07:26:4786#include "ios/chrome/browser/web/features.h"
sdefresne14900ee2015-11-27 14:43:2187#include "ios/chrome/grit/ios_strings.h"
Sylvain Defresne559ce5f2022-01-13 17:14:5888#include "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
Eugene But61818bc2019-04-15 21:04:0789#include "ios/web/common/features.h"
Eugene Bute79f2742019-07-26 17:07:2290#include "ios/web/common/user_agent.h"
Eugene Butb1416232019-07-22 17:31:5891#include "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:2192
Sylvain Defresne9c107082020-10-27 16:39:1393#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
94#include "ios/chrome/browser/screen_time/features.h"
95#endif
96
sdefresne14900ee2015-11-27 14:43:2197#if !defined(OFFICIAL_BUILD)
98#include "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:2299#endif
stkhapuginc1be1792016-12-13 14:30:53100
101#if !defined(__has_feature) || !__has_feature(objc_arc)
102#error "This file requires ARC support."
103#endif
sdefresne14900ee2015-11-27 14:43:21104
elawrence816f6790e2017-06-16 18:19:28105using flags_ui::FeatureEntry;
106
sdefresne14900ee2015-11-27 14:43:21107namespace {
Emily Starkbafa9062017-12-27 15:22:46108
Olivier Robin3d60411622018-02-23 10:03:22109const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
110 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
111 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
112 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
113 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
114 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
115 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
116 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
117 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
118 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
119};
120
Nohemi Fernandez222d6d42020-09-30 20:35:57121const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = {
122 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
123 {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"},
124 {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"},
125 {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"},
126};
127
Nohemi Fernandezc00842a2021-07-26 11:47:34128const FeatureEntry::Choice
129 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
130 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
131 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
132 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
133 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
134};
135
Stepan Khapugincc4e9842019-01-23 13:38:13136const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
137 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
138const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
139 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
140const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
141 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
142const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
143 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
144const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
145 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
146const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
147 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
148const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
149 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
150
151const FeatureEntry::FeatureVariation
152 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
153 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53154 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13155 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53156 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13157 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53158 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13159 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53160 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13161 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53162 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13163 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53164 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13165 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53166 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13167
Caitlin Fischer37e01232019-05-24 13:05:45168const FeatureEntry::FeatureParam
169 kAutofillUseMobileLabelDisambiguationShowAll[] = {
170 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
171 autofill::features::
172 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
173const FeatureEntry::FeatureParam
174 kAutofillUseMobileLabelDisambiguationShowOne[] = {
175 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
176 autofill::features::
177 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
178
179const FeatureEntry::FeatureVariation
180 kAutofillUseMobileLabelDisambiguationVariations[] = {
181 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53182 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45183 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53184 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45185
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10186const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59187 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
188 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
189const FeatureEntry::FeatureVariation
190 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
191 {"Remind me later",
192 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53193 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59194 nullptr}};
195
gogeralddb0d8ae2020-11-13 03:56:58196const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
197 {kDiscoverFeedIsNativeUIEnabled, "true"}};
198const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
199 {"Native UI", kDiscoverFeedInNtpEnableNativeUI,
Daniel Cheng1f047a82022-02-26 10:04:53200 std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
gogeralddb0d8ae2020-11-13 03:56:58201
Sergio Collazos9fcc6ed2021-10-06 00:58:03202const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = {
203 {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}};
204const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = {
205 {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}};
206const FeatureEntry::FeatureVariation
207 kEnableDiscoverFeedStaticResourceServingVariations[] = {
208 {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53209 std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03210 {"Preload Templates", kDiscoverFeedSRSPreloadTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53211 std::size(kDiscoverFeedSRSPreloadTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03212};
213
Robbie Gibson46351032022-03-31 19:46:23214const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
215 {kIOSOmniboxUpdatedPopupUIVariationName,
216 kIOSOmniboxUpdatedPopupUIVariation1}};
217const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
218 {kIOSOmniboxUpdatedPopupUIVariationName,
219 kIOSOmniboxUpdatedPopupUIVariation2}};
220const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
221 {"Version 1", kiOSOmniboxUpdatedPopupUIVersion1,
222 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
223 {"Version 2", kiOSOmniboxUpdatedPopupUIVersion2,
224 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}};
225
gogerald53c6e7a2021-04-15 22:07:35226const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08227 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35228 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
229const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08230 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35231 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
232const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08233 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35234 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
235const FeatureEntry::FeatureParam
236 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
237 {kStartSurfaceShrinkLogoParam, "true"},
238 {kStartSurfaceReturnToRecentTabParam, "true"},
239 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
240const FeatureEntry::FeatureParam
241 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
242 {kStartSurfaceHideShortcutsParam, "true"},
243 {kStartSurfaceReturnToRecentTabParam, "true"},
244 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
245const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08246 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35247 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
248const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
249 {kStartSurfaceHideShortcutsParam, "true"},
250 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
251const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08252 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35253 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
254const FeatureEntry::FeatureParam
255 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
256 {kStartSurfaceShrinkLogoParam, "true"},
257 {kStartSurfaceReturnToRecentTabParam, "true"},
258 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
259const FeatureEntry::FeatureParam
260 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
261 {kStartSurfaceHideShortcutsParam, "true"},
262 {kStartSurfaceReturnToRecentTabParam, "true"},
263 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08264
gogerald0e39e3aa2021-02-10 18:41:23265const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35266 {"10s:Show Return to Recent Tab tile",
267 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53268 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35269 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53270 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35271 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53272 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35273 {"10s:Shrink Logo and show Return to Recent Tab tile",
274 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53275 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35276 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
277 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53278 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35279 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53280 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35281 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53282 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35283 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53284 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35285 {"1h:Shrink Logo and show Return to Recent Tab tile",
286 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53287 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35288 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
289 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53290 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08291};
gogerald0e39e3aa2021-02-10 18:41:23292
Aliona DANGLA8fae66f02021-10-06 15:47:11293const FeatureEntry::FeatureParam kFREDefaultPromoTestingDefaultDelay[] = {
294 {kFREDefaultPromoTestingDefaultDelayParam, "true"}};
Aliona DANGLAebfd7d022021-10-08 14:15:45295const FeatureEntry::FeatureParam kFREDefaultPromoTestingOnly[] = {
296 {kFREDefaultPromoTestingOnlyParam, "true"}};
Aliona DANGLA8fae66f02021-10-06 15:47:11297const FeatureEntry::FeatureParam kFREDefaultPromoTestingShortDelay[] = {
298 {kFREDefaultPromoTestingShortDelayParam, "true"}};
299const FeatureEntry::FeatureVariation kFREDefaultPromoTestingVariations[] = {
300 {"Wait 14 days after FRE default browser promo",
301 kFREDefaultPromoTestingDefaultDelay,
Daniel Cheng1f047a82022-02-26 10:04:53302 std::size(kFREDefaultPromoTestingDefaultDelay), nullptr},
Aliona DANGLAebfd7d022021-10-08 14:15:45303 {"FRE default browser promo only", kFREDefaultPromoTestingOnly,
Daniel Cheng1f047a82022-02-26 10:04:53304 std::size(kFREDefaultPromoTestingOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11305 {"Wait 3 days after FRE default browser promo",
306 kFREDefaultPromoTestingShortDelay,
Daniel Cheng1f047a82022-02-26 10:04:53307 std::size(kFREDefaultPromoTestingShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11308};
309
Veronique Nguyen6593c762021-11-30 17:28:56310const FeatureEntry::FeatureVariation kEnableFREUIModuleIOSVariations[] = {
311 {"TOP | OLD",
312 (FeatureEntry::FeatureParam[]){
313 {kFREUIIdentitySwitcherPositionParam, "top"},
314 {kFREUIStringsSetParam, "old"}},
315 2, nullptr},
316 {"BOTTOM | OLD",
317 (FeatureEntry::FeatureParam[]){
318 {kFREUIIdentitySwitcherPositionParam, "bottom"},
319 {kFREUIStringsSetParam, "old"}},
320 2, nullptr},
321 {"TOP | NEW",
322 (FeatureEntry::FeatureParam[]){
323 {kFREUIIdentitySwitcherPositionParam, "top"},
324 {kFREUIStringsSetParam, "new"}},
325 2, nullptr},
326 {"BOTTOM | NEW",
327 (FeatureEntry::FeatureParam[]){
328 {kFREUIIdentitySwitcherPositionParam, "bottom"},
329 {kFREUIStringsSetParam, "new"}},
330 2, nullptr}};
331
jlebel041fc1c2022-03-04 12:53:30332const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = {
333 {kNewMobileIdentityConsistencyFREParam,
334 kNewMobileIdentityConsistencyFREParamUMADialog}};
335const FeatureEntry::FeatureParam kNewMICEFREWithThreeSteps[] = {
336 {kNewMobileIdentityConsistencyFREParam,
337 kNewMobileIdentityConsistencyFREParamThreeSteps}};
338const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
339 {kNewMobileIdentityConsistencyFREParam,
340 kNewMobileIdentityConsistencyFREParamTwoSteps}};
341const FeatureEntry::FeatureVariation
342 kNewMobileIdentityConsistencyFREVariations[] = {
343 {"New FRE with UMA dialog", kNewMICEFREWithUMADialog,
344 std::size(kNewMICEFREWithUMADialog), nullptr},
345 {"new FRE with 3 steps", kNewMICEFREWithThreeSteps,
346 std::size(kNewMICEFREWithThreeSteps), nullptr},
347 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
348 std::size(kNewMICEFREWithTwoSteps), nullptr}};
349
Louis Romero023cc5052022-04-08 23:29:39350const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
351 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01352const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
353 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
354const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
355 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
356const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
357 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
358const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39359 {"Target Highlight", kBubbleRichIPHTargetHighlight,
360 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01361 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
362 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
363 {"Dismissal and rich content", kBubbleRichIPHRich,
364 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39365 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01366 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
367};
368
Cooper Knaak1e026562017-07-26 05:22:28369// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21370// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28371// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
372// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21373// macro for this type supplying the command line to the macro.
374// . MULTI_VALUE: a list of choices, the first of which should correspond to a
375// deactivated state for this lab (i.e. no command line option). To specify
376// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
377// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28378// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
379// either enabled, disabled, or uses the default value of the associated
380// base::Feature instance. To specify this type of entry use the macro
381// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
382// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
383// base::Feature instance. Choices corresponding to the default state, a
384// universally enabled state, and a universally disabled state are
385// automatically included. To specify this type of entry use the macro
386// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
387// the array of choices.
388//
sdefresne14900ee2015-11-27 14:43:21389// See the documentation of FeatureEntry for details on the fields.
390//
391// When adding a new choice, add it to the end of the list.
392const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28393 {"in-product-help-demo-mode-choice",
394 flag_descriptions::kInProductHelpDemoModeName,
395 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
396 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23397 feature_engagement::kIPHDemoMode,
398 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09399 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22400 {"enable-autofill-credit-card-upload",
401 flag_descriptions::kAutofillCreditCardUploadName,
402 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24403 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Tina Wang41d431c2021-06-21 21:04:13404 {"enable-discover-feed-preview",
405 flag_descriptions::kEnableDiscoverFeedPreviewName,
406 flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos,
407 FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)},
Moe Ahmadid6d5d172018-06-20 17:20:23408 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
409 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
410 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51411 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23412 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
413 {"wallet-service-use-sandbox",
414 flag_descriptions::kWalletServiceUseSandboxName,
415 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
416 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
417 autofill::switches::kWalletServiceUseSandbox,
418 "1",
419 autofill::switches::kWalletServiceUseSandbox,
420 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59421 {"show-autofill-type-predictions",
422 flag_descriptions::kShowAutofillTypePredictionsName,
423 flag_descriptions::kShowAutofillTypePredictionsDescription,
424 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46425 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22426 {"autofill-ios-delay-between-fields",
427 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
428 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
429 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Kurt Horimotodc33af32018-05-01 01:39:14430 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53431 flag_descriptions::kFullscreenSmoothScrollingName,
432 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
433 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06434 {"webpage-default-zoom-from-dynamic-type",
435 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
436 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
437 flags_ui::kOsIos,
438 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56439 {"webpage-alternative-text-zoom",
440 flag_descriptions::kWebPageAlternativeTextZoomName,
441 flag_descriptions::kWebPageAlternativeTextZoomDescription,
442 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Kurt Horimoto79d590b2018-09-12 19:09:28443 {"toolbar-container", flag_descriptions::kToolbarContainerName,
444 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
445 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13446 {"omnibox-ui-max-autocomplete-matches",
447 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
448 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
449 flags_ui::kOsIos,
450 FEATURE_WITH_PARAMS_VALUE_TYPE(
451 omnibox::kUIExperimentMaxAutocompleteMatches,
452 kOmniboxUIMaxAutocompleteMatchesVariations,
453 "OmniboxUIMaxAutocompleteVariations")},
Robbie Gibson84f1ddc2020-12-10 21:41:28454 {"omnibox-local-history-zero-suggest",
455 flag_descriptions::kOmniboxLocalHistoryZeroSuggestName,
456 flag_descriptions::kOmniboxLocalHistoryZeroSuggestDescription,
457 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggest)},
Justin Cohen20b6f072019-01-16 01:38:50458#if defined(DCHECK_IS_CONFIGURABLE)
459 {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName,
460 flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos,
461 FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)},
462#endif // defined(DCHECK_IS_CONFIGURABLE)
Caitlin Fischer43edd90a2019-05-01 13:24:30463 {"autofill-use-mobile-label-disambiguation",
464 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
465 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
466 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45467 FEATURE_WITH_PARAMS_VALUE_TYPE(
468 autofill::features::kAutofillUseMobileLabelDisambiguation,
469 kAutofillUseMobileLabelDisambiguationVariations,
470 "AutofillUseMobileLabelDisambiguation")},
Olivier Robin43814bb2021-06-22 15:25:45471 {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName,
472 flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos,
473 FEATURE_VALUE_TYPE(kMetrickitCrashReport)},
Mike Doughertyb6c770d2019-09-13 22:56:46474 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
475 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30476 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Eugene But2823dc7e2020-07-21 18:10:37477 {"ios-synthetic-crash-reports",
478 flag_descriptions::kSyntheticCrashReportsForUteName,
479 flag_descriptions::kSyntheticCrashReportsForUteDescription,
480 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)},
Jérôme Lebelc374fdd2019-09-27 10:36:48481 {"force-startup-signin-promo",
482 flag_descriptions::kForceStartupSigninPromoName,
483 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29484 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22485 {"restore-session-from-cache",
486 flag_descriptions::kRestoreSessionFromCacheName,
487 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49488 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59489 {"autofill-save-card-dismiss-on-navigation",
490 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
491 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
492 flags_ui::kOsIos,
493 FEATURE_VALUE_TYPE(
494 autofill::features::kAutofillSaveCardDismissOnNavigation)},
sczs37d9c132020-07-18 06:06:33495 {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
adamta22a4d502020-05-21 03:12:21496 flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
gogeralddb0d8ae2020-11-13 03:56:58497 FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
498 kDiscoverFeedInNtpVariations,
499 "IOSDiscoverFeed")},
Roberto Mourab87b9722020-06-17 17:12:09500 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
501 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
502 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41503 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
504 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
505 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Veronique Nguyen6593c762021-11-30 17:28:56506 {"enable-fre-ui-module-ios-with-options",
507 flag_descriptions::kEnableFREUIModuleIOSName,
Tina Wanga252ca42021-04-01 17:14:23508 flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos,
Veronique Nguyen6593c762021-11-30 17:28:56509 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREUIModuleIOS,
510 kEnableFREUIModuleIOSVariations,
511 "EnableFREUIModuleIOS")},
jlebel041fc1c2022-03-04 12:53:30512 {"new-mobile-identity-consistency-fre",
513 flag_descriptions::kNewMobileIdentityConsistencyFREName,
514 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
515 flags_ui::kOsIos,
516 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
517 kNewMobileIdentityConsistencyFREVariations,
518 "NewMobileIdentityConsistencyFRE")},
Tina Wang17514e2f2021-09-24 23:57:18519 {"enable-long-message-duration",
520 flag_descriptions::kEnableLongMessageDurationName,
521 flag_descriptions::kEnableLongMessageDurationDescription, flags_ui::kOsIos,
522 FEATURE_VALUE_TYPE(kEnableLongMessageDuration)},
Sylvain Defresne9c107082020-10-27 16:39:13523#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45524 {"screen-time-integration-ios",
525 flag_descriptions::kScreenTimeIntegrationName,
526 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
527 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13528#endif
Nazerke3e993f72020-09-21 13:00:06529 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
530 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
531 FEATURE_VALUE_TYPE(kModernTabStrip)},
Nohemi Fernandez222d6d42020-09-30 20:35:57532 {"minutes-delay-to-restore-gaia-cookies-if-deleted",
533 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName,
534 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription,
535 flags_ui::kOsIos,
536 MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)},
Vidhan Jainb4de5c52021-08-30 17:08:02537 {"add-passwords-in-settings",
538 flag_descriptions::kAddPasswordsInSettingsName,
539 flag_descriptions::kAddPasswordsInSettingsDescription, flags_ui::kOsIos,
540 FEATURE_VALUE_TYPE(
541 password_manager::features::kSupportForAddPasswordsInSettings)},
Eugene Butf869bff2020-12-10 01:16:55542 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
543 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
544 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14545 {"default-browser-fullscreen-promo-experiment",
546 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
547 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
548 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59549 FEATURE_WITH_PARAMS_VALUE_TYPE(
550 kDefaultBrowserFullscreenPromoExperiment,
551 kDefaultBrowserFullscreenPromoExperimentVariations,
552 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11553 {"ios-shared-highlighting-color-change",
554 flag_descriptions::kIOSSharedHighlightingColorChangeName,
555 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07556 flags_ui::kOsIos,
557 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34558 {"ios-shared-highlighting-v2",
559 flag_descriptions::kIOSSharedHighlightingV2Name,
560 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
561 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45562 {"omnibox-new-textfield-implementation",
563 flag_descriptions::kOmniboxNewImplementationName,
564 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
565 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin422f08d2022-02-18 16:19:44566 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
567 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23568 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
569 kiOSOmniboxUpdatedPopupUIVariations,
570 "kIOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19571 {"start-surface", flag_descriptions::kStartSurfaceName,
572 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23573 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
574 kStartSurfaceVariations,
575 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28576 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
577 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
578 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Maria Kazinovab69b75d2021-02-16 00:09:37579 {"detect-form-submission-on-form-clear",
580 flag_descriptions::kDetectFormSubmissionOnFormClearIOSName,
581 flag_descriptions::kDetectFormSubmissionOnFormClearIOSDescription,
582 flags_ui::kOsIos,
583 FEATURE_VALUE_TYPE(
584 password_manager::features::kDetectFormSubmissionOnFormClear)},
Vidhan Jain451b4752021-07-15 10:16:42585 {"autofill-address-verification-in-save-prompt",
586 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
587 flag_descriptions::
588 kEnableAutofillAddressSavePromptAddressVerificationDescription,
589 flags_ui::kOsIos,
590 FEATURE_VALUE_TYPE(
591 autofill::features::
592 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Vidhan Jaina65741552021-03-09 17:18:27593 {"autofill-address-save-prompt",
594 flag_descriptions::kEnableAutofillAddressSavePromptName,
595 flag_descriptions::kEnableAutofillAddressSavePromptDescription,
596 flags_ui::kOsIos,
597 FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)},
Viktor Semeniuk68e794a2021-03-24 10:23:25598 {"filling-across-affiliated-websites",
599 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
600 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
601 flags_ui::kOsIos,
602 FEATURE_VALUE_TYPE(
603 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Jared Sauld47c2b72021-03-25 22:47:31604 {"autofill-parse-merchant-promo-code-fields",
605 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName,
606 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription,
607 flags_ui::kOsIos,
608 FEATURE_VALUE_TYPE(
609 autofill::features::kAutofillParseMerchantPromoCodeFields)},
edchin257cea2f2021-04-07 13:07:13610 {"interest-feed-v2-clicks-and-views-cond-upload",
611 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
612 flag_descriptions::
613 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
614 flags_ui::kOsIos,
615 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Mohammad Refaat76b14f542021-10-27 14:46:55616 {"tabs-search-ios", flag_descriptions::kTabsSearchName,
617 flag_descriptions::kTabsSearchDescription, flags_ui::kOsIos,
618 FEATURE_VALUE_TYPE(kTabsSearch)},
Mohammad Refaat95410082022-02-23 02:01:02619 {"tabs-search-regular-results-suggested-actions-ios",
620 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsName,
621 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsDescription,
622 flags_ui::kOsIos,
623 FEATURE_VALUE_TYPE(kTabsSearchRegularResultsSuggestedActions)},
Side Yilmaz0e6c15a2021-04-26 12:55:09624 {"incognito-brand-consistency-for-ios",
625 flag_descriptions::kIncognitoBrandConsistencyForIOSName,
626 flag_descriptions::kIncognitoBrandConsistencyForIOSDescription,
627 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIncognitoBrandConsistencyForIOS)},
Side Yilmaz6c53f7102021-09-07 13:26:19628 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
629 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
630 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33631 {"update-history-entry-points-in-incognito",
632 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
633 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
634 flags_ui::kOsIos,
635 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
jlebeld95434d652021-06-22 10:32:48636 {"sync-trusted-vault-passphrase-ios-rpc",
637 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName,
638 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription,
639 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51640 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)},
Mikel Astiz850b0fe2021-06-16 09:47:27641 {"sync-trusted-vault-passphrase-promo",
642 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
643 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
644 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51645 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27646 {"sync-trusted-vault-passphrase-recovery",
647 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
648 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
649 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51650 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34651 {"wait-threshold-seconds-for-capabilities-api",
652 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
653 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
654 flags_ui::kOsIos,
655 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23656 {"autofill-fill-merchant-promo-code-fields",
657 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
658 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
659 flags_ui::kOsIos,
660 FEATURE_VALUE_TYPE(
661 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Gauthier Ambard14d3a262021-08-09 18:09:23662 {"context-menu-phase2",
663 flag_descriptions::kWebViewNativeContextMenuPhase2Name,
664 flag_descriptions::kWebViewNativeContextMenuPhase2Description,
665 flags_ui::kOsIos,
666 FEATURE_VALUE_TYPE(web::features::kWebViewNativeContextMenuPhase2)},
Gauthier Ambard14d3a262021-08-09 18:09:23667 {"default-wkwebview-context-menu",
668 flag_descriptions::kDefaultWebViewContextMenuName,
669 flag_descriptions::kDefaultWebViewContextMenuDescription, flags_ui::kOsIos,
670 FEATURE_VALUE_TYPE(web::features::kDefaultWebViewContextMenu)},
Sylvain Defresnedff67e42021-09-24 09:43:03671 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
672 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
673 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
674 {"enable-new-download-api", flag_descriptions::kEnableNewDownloadAPIName,
675 flag_descriptions::kEnableNewDownloadAPIDescription, flags_ui::kOsIos,
676 FEATURE_VALUE_TYPE(web::features::kEnableNewDownloadAPI)},
Evan Bernstein0a85f332021-09-29 19:07:24677 {"use-lens-to-search-for-image",
678 flag_descriptions::kUseLensToSearchForImageName,
679 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44680 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40681 {"use-load-simulated-request-for-error-page-navigation",
682 flag_descriptions::kUseLoadSimulatedRequestForErrorPageNavigationName,
683 flag_descriptions::
684 kUseLoadSimulatedRequestForErrorPageNavigationDescription,
685 flags_ui::kOsIos,
686 FEATURE_VALUE_TYPE(
687 web::features::kUseLoadSimulatedRequestForErrorPageNavigation)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03688 {"enable-discover-feed-static-resource-serving",
689 flag_descriptions::kEnableDiscoverFeedStaticResourceServingName,
690 flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription,
691 flags_ui::kOsIos,
692 FEATURE_WITH_PARAMS_VALUE_TYPE(
693 kEnableDiscoverFeedStaticResourceServing,
694 kEnableDiscoverFeedStaticResourceServingVariations,
695 "IOSDiscoverFeedStaticResourceServing")},
696 {"enable-disco-feed-endpoint",
697 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
698 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
699 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11700 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
701 {"enable-fre-default-browser-screen-testing",
702 flag_descriptions::kEnableFREDefaultBrowserScreenTestingName,
703 flag_descriptions::kEnableFREDefaultBrowserScreenTestingDescription,
704 flags_ui::kOsIos,
705 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserScreenTesting,
706 kFREDefaultPromoTestingVariations,
ginny huang5ba43b82021-10-06 18:28:18707 "EnableFREDefaultBrowserScreenTesting")},
edchin1313f2b2021-10-11 08:08:47708 {"enable-discover-feed-shorter-cache",
709 flag_descriptions::kEnableDiscoverFeedShorterCacheName,
710 flag_descriptions::kEnableDiscoverFeedShorterCacheDescription,
711 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedShorterCache)},
Tommy Martino7393d762021-10-12 17:59:28712 {"shared-highlighting-amp",
713 flag_descriptions::kIOSSharedHighlightingAmpName,
714 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
715 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28716 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42717 commerce::flag_descriptions::kCommercePriceTrackingName,
718 commerce::flag_descriptions::kCommercePriceTrackingDescription,
719 flags_ui::kOsIos,
720 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
721 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15722 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06723 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
724 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
725 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54726 {"ntp-view-hierarchy-repair",
727 flag_descriptions::kNTPViewHierarchyRepairName,
728 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
729 FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)},
Chris Lu37588a92021-11-02 21:19:45730 {"single-ntp", flag_descriptions::kSingleNtpName,
731 flag_descriptions::kSingleNtpDescription, flags_ui::kOsIos,
732 FEATURE_VALUE_TYPE(kSingleNtp)},
Justin Cohen69cec682021-11-04 20:10:26733 {"synthesized-restore-session",
734 flag_descriptions::kSynthesizedRestoreSessionName,
735 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
736 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Chris Lu4723b822021-11-05 21:47:44737 {"remove-extra-ntps", flag_descriptions::kRemoveExcessNTPsExperimentName,
738 flag_descriptions::kRemoveExcessNTPsExperimentDescription,
Sylvain Defresne1619dd002021-11-06 10:09:48739 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kRemoveExcessNTPs)},
740 {"lazily-create-web-state-on-restoration",
741 flag_descriptions::kLazilyCreateWebStateOnRestorationName,
742 flag_descriptions::kLazilyCreateWebStateOnRestorationDescription,
743 flags_ui::kOsIos,
744 FEATURE_VALUE_TYPE(web::features::kEnableUnrealizedWebStates)},
ginny huang1f1755c2021-11-11 23:38:23745 {"enable-shortened-password-auto-fill-instruction",
746 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionName,
747 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionDescription,
748 flags_ui::kOsIos,
749 FEATURE_VALUE_TYPE(kEnableShortenedPasswordAutoFillInstruction)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41750 {"enable-password-manager-branding-update",
751 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
752 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
753 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19754 FEATURE_VALUE_TYPE(
755 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
Gauthier Ambard1d326e22021-12-16 10:57:53756 {"default-mode-ua", flag_descriptions::kAddSettingForDefaultPageModeName,
757 flag_descriptions::kAddSettingForDefaultPageModeDescription,
758 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAddSettingForDefaultPageMode)},
ginnnnnnny1532d872021-12-20 15:57:37759 {"ios-media-permissions-control",
760 flag_descriptions::kMediaPermissionsControlName,
761 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
762 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34763 {"enable-save-session-tabs-in-separate-files",
764 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
765 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
766 flags_ui::kOsIos,
767 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Gauthier Ambard42ad0bb2021-12-22 16:50:48768 {"use-sf-symbols-samples", flag_descriptions::kUseSFSymbolsSamplesName,
769 flag_descriptions::kUseSFSymbolsSamplesDescription, flags_ui::kOsIos,
770 FEATURE_VALUE_TYPE(kUseSFSymbolsSamples)},
Gauthier Ambardfa182542022-01-07 08:27:50771 {"use-new-popup-menu", flag_descriptions::kUseUIKitPopupMenuName,
772 flag_descriptions::kUseUIKitPopupMenuDescription, flags_ui::kOsIos,
773 FEATURE_VALUE_TYPE(kUseUIKitPopupMenu)},
Nohemi Fernandez76f54802022-01-10 18:23:32774 {"enable-unicorn-account-support",
775 flag_descriptions::kEnableUnicornAccountSupportName,
776 flag_descriptions::kEnableUnicornAccountSupportDescription,
777 flags_ui::kOsIos,
778 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
Chris Lu411bea82022-01-12 18:19:22779 {"single-cell-content-suggestions",
780 flag_descriptions::kSingleCellContentSuggestionsName,
781 flag_descriptions::kSingleCellContentSuggestionsDescription,
782 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSingleCellContentSuggestions)},
Chris Lue5211052022-02-02 20:44:04783 {"content-suggestions-header-migration",
784 flag_descriptions::kContentSuggestionsHeaderMigrationName,
785 flag_descriptions::kContentSuggestionsHeaderMigrationDescription,
786 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContentSuggestionsHeaderMigration)},
rgod90cca8b2022-02-04 12:38:27787 {"leak-detection-unauthenticated",
788 flag_descriptions::kLeakDetectionUnauthenticatedName,
789 flag_descriptions::kLeakDetectionUnauthenticatedDescription,
790 flags_ui::kOsIos,
791 FEATURE_VALUE_TYPE(
792 password_manager::features::kLeakDetectionUnauthenticated)},
Veronique Nguyenfc9824b2022-02-10 17:12:53793 {"mute-compromised-passwords",
794 flag_descriptions::kMuteCompromisedPasswordsName,
795 flag_descriptions::kMuteCompromisedPasswordsDescription, flags_ui::kOsIos,
796 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Veronique Nguyen00ba26ea2022-02-25 14:57:17797 {"enable-favicon-passwords",
798 flag_descriptions::kEnableFaviconForPasswordsName,
799 flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos,
800 FEATURE_VALUE_TYPE(
801 password_manager::features::kEnableFaviconForPasswords)},
Shivani Chauhanbf97b0d2022-02-08 22:21:28802 {"autofill-enable-sending-bcn-in-get-upload-details",
803 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
804 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
805 flags_ui::kOsIos,
806 FEATURE_VALUE_TYPE(
807 autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
Ali Juma1429cf8a2022-02-09 15:31:01808 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
809 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
810 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramos34175732022-02-14 18:59:16811 {"enable-enhanced-safe-browsing",
812 flag_descriptions::kEnhancedProtectionName,
813 flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos,
814 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)},
Christian Xu612e2852022-02-10 17:27:42815 {"context-menu-phase2-screenshot",
816 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotName,
817 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotDescription,
818 flags_ui::kOsIos,
819 FEATURE_VALUE_TYPE(
820 web::features::kWebViewNativeContextMenuPhase2Screenshot)},
Shivani Chauhanaf1eb74d2022-02-11 21:13:19821 {"autofill-enable-unmask-card-request-set-instrument-id",
822 flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName,
823 flag_descriptions::
824 kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription,
825 flags_ui::kOsIos,
826 FEATURE_VALUE_TYPE(
827 autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00828 {"send-tab-to-self-signin-promo",
829 flag_descriptions::kSendTabToSelfSigninPromoName,
830 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Chris Lu7f560f72022-03-01 18:19:01832 {"content-suggestions-uiviewcontroller-migration",
833 flag_descriptions::kContentSuggestionsUIViewControllerMigrationName,
834 flag_descriptions::kContentSuggestionsUIViewControllerMigrationDescription,
835 flags_ui::kOsIos,
836 FEATURE_VALUE_TYPE(kContentSuggestionsUIViewControllerMigration)},
Christian Xubd60c4b72022-03-22 15:25:01837 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
838 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
839 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
840 kBubbleRichIPHVariations,
841 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22842 {"autofill-enforce-delays-in-strike-database",
843 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
844 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
845 flags_ui::kOsIos,
846 FEATURE_VALUE_TYPE(
847 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Ewann4f260562022-04-11 13:37:19848 {"download-calendar", flag_descriptions::kDownloadCalendarName,
849 flag_descriptions::kDownloadCalendarDescription, flags_ui::kOsIos,
850 FEATURE_VALUE_TYPE(kDownloadCalendar)},
Louis Romerofbfbd932022-04-15 18:04:50851 {"uiview-window-observing", flag_descriptions::kUIViewWindowObservingName,
852 flag_descriptions::kUIViewWindowObservingDescription, flags_ui::kOsIos,
853 FEATURE_VALUE_TYPE(kUIViewWindowObserving)},
Jared Saulb0473bd2022-04-20 00:03:41854 {"autofill-upstream-allow-additional-email-domains",
855 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
856 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
857 flags_ui::kOsIos,
858 FEATURE_VALUE_TYPE(
859 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
860 {"autofill-upstream-allow-all-email-domains",
861 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
862 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
863 flags_ui::kOsIos,
864 FEATURE_VALUE_TYPE(
865 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Olivier Robinffe767c2022-04-21 13:13:23866 {"enable-tflite-language-detection",
867 flag_descriptions::kTFLiteLanguageDetectionName,
868 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
869 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
870 {"optimization-guide-model-downloading",
871 flag_descriptions::kOptimizationGuideModelDownloadingName,
872 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
873 flags_ui::kOsIos,
874 FEATURE_VALUE_TYPE(
875 optimization_guide::features::kOptimizationGuideModelDownloading)},
876 {"optimization-target-prediction",
877 flag_descriptions::kOptimizationTargetPredictionName,
878 flag_descriptions::kOptimizationTargetPredictionDescription,
879 flags_ui::kOsIos,
880 FEATURE_VALUE_TYPE(
881 optimization_guide::features::kOptimizationTargetPrediction)},
Sylvain Defresne1619dd002021-11-06 10:09:48882};
sdefresne14900ee2015-11-27 14:43:21883
Rohit Raobed794c2020-04-27 15:27:45884bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
885 return false;
886}
887
888flags_ui::FlagsState& GetGlobalFlagsState() {
889 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
890 nullptr);
891 return *flags_state;
892}
David Jean5ca263c2021-08-18 09:19:30893// Creates the experimental test policies map, used by AsyncPolicyLoader and
894// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:34895NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:21896 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
897
Guillaume Jenkins25e9bd72020-08-27 17:39:06898 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:55899 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:06900 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:55901
Guillaume Jenkins25e9bd72020-08-27 17:39:06902 // Set some sample policy values for testing if EnableSamplePolicies is set to
903 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:40904 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:55905 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:01906 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
907
Guillaume Jenkinseeb7007c2020-06-25 22:55:40908 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
909
910 // 2 = Disable all variations
911 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
912
913 // 2 = Do not allow any site to show popups
914 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
915
Tina Wang5abee802020-07-29 23:09:52916 // Set default search engine.
917 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
918 @YES,
919 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
920 @"http://www.google.com/search?q={searchTerms}",
921 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:02922 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:52923
Tina Wang89068c82020-10-29 15:51:50924 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
925
Gauthier Ambard21b23702021-04-16 16:11:27926 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
927
Guillaume Jenkinseeb7007c2020-06-25 22:55:40928 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:01929
930 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:53931
932 // 2 = Enhanced safe browsing protection
933 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
934
935 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:55936 }];
937 }
938
Ewann227a3c02021-04-19 12:04:54939 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:04940 NSString* sync_policy_key =
941 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:30942 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:54943 }
Ewann227a3c02021-04-19 12:04:54944
Ewann570a6302021-08-17 07:22:42945 // SyncTypesListDisabled policy.
946 NSString* Sync_types_list_disabled_key =
947 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
948 NSMutableArray* Sync_types_list_disabled_values =
949 [[NSMutableArray alloc] init];
950 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
951 [Sync_types_list_disabled_values addObject:@"bookmarks"];
952 }
953 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
954 [Sync_types_list_disabled_values addObject:@"readingList"];
955 }
956 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
957 [Sync_types_list_disabled_values addObject:@"preferences"];
958 }
959 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
960 [Sync_types_list_disabled_values addObject:@"passwords"];
961 }
962 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
963 [Sync_types_list_disabled_values addObject:@"autofill"];
964 }
965 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
966 [Sync_types_list_disabled_values addObject:@"typedUrls"];
967 }
968 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
969 [Sync_types_list_disabled_values addObject:@"tabs"];
970 }
971 if ([Sync_types_list_disabled_values count]) {
972 [testing_policies addEntriesFromDictionary:@{
973 Sync_types_list_disabled_key : Sync_types_list_disabled_values
974 }];
Ewann570a6302021-08-17 07:22:42975 }
976
Gauthier Ambard073eaa92021-11-22 15:24:13977 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:52978 NSString* incognito_policy_key =
979 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
980 NSInteger incognito_mode_availability =
981 [defaults integerForKey:incognito_policy_key];
982 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:52983 [testing_policies addEntriesFromDictionary:@{
984 incognito_policy_key : @(incognito_mode_availability),
985 }];
986 }
987
Ewann40a8f8a2021-07-29 10:01:20988 NSString* restriction_pattern =
989 [defaults stringForKey:@"RestrictAccountsToPatterns"];
990 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:29991 NSString* restrict_key =
992 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:20993 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:29994 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:20995 }];
996 }
997
Vincent Boisselle19200bc2021-09-01 17:58:25998 // If the sign-in policy is set (not "None"), add the policy key to the list
999 // of enabled experimental policies, and set the value.
1000 NSString* const kSigninPolicyKey = @"BrowserSignin";
1001 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1002 if (signin_policy_mode) {
1003 // Remove the mode offset that was used to represent the unset policy.
1004 --signin_policy_mode;
1005 DCHECK(signin_policy_mode >= 0);
1006
Vincent Boisselle19200bc2021-09-01 17:58:251007 [testing_policies addEntriesFromDictionary:@{
1008 kSigninPolicyKey : @(signin_policy_mode),
1009 }];
1010 }
1011
Veronique Nguyen9b1044f2022-01-11 14:41:131012 // If the New Tab Page URL is set (not empty) add the value to the list of
1013 // test policies.
1014 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1015 if ([ntp_location length] > 0) {
1016 NSString* ntp_location_key =
1017 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1018 [testing_policies
1019 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571020 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131021 }
1022
Ali Juma9ec36d22022-03-28 14:53:121023 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1024 NSString* allow_backups_key =
1025 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1026 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1027 [allowed_experimental_policies addObject:allow_backups_key];
1028 }
1029
Guillaume Jenkins25e9bd72020-08-27 17:39:061030 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1031 // policy.
1032 if ([allowed_experimental_policies count] > 0) {
1033 [testing_policies setValue:allowed_experimental_policies
1034 forKey:base::SysUTF8ToNSString(
1035 policy::key::kEnableExperimentalPolicies)];
1036 }
1037
David Jean6f85d44f2021-08-19 08:08:451038 // Warning: Add new flags to TestingPoliciesHash() below.
1039
David Jean5ca263c2021-08-18 09:19:301040 return testing_policies;
1041}
David Jean6f85d44f2021-08-19 08:08:451042
1043// Generates a unique NSString based on currently monitored policies from
1044// NSUserDefaults standardUserDefaults.
1045NSString* TestingPoliciesHash() {
1046 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1047 return [NSString
Ali Juma9ec36d22022-03-28 14:53:121048 stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d",
1049 [defaults boolForKey:@"DisallowChromeDataInBackups"],
David Jean6f85d44f2021-08-19 08:08:451050 [defaults boolForKey:@"EnableSyncDisabledPolicy"],
1051 [defaults boolForKey:@"EnableSamplePolicies"],
1052 (int)[defaults
1053 integerForKey:@"IncognitoModeAvailability"],
1054 [defaults stringForKey:@"RestrictAccountsToPatterns"],
1055 [defaults boolForKey:@"SyncTypesListBookmarks"],
1056 [defaults boolForKey:@"SyncTypesListReadingList"],
1057 [defaults boolForKey:@"SyncTypesListPreferences"],
1058 [defaults boolForKey:@"SyncTypesListPasswords"],
1059 [defaults boolForKey:@"SyncTypesListAutofill"],
1060 [defaults boolForKey:@"SyncTypesListTypedUrls"],
1061 [defaults boolForKey:@"SyncTypesListTabs"]];
1062}
David Jean5ca263c2021-08-18 09:19:301063} // namespace
1064
1065// Add all switches from experimental flags to |command_line|.
1066void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1067 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1068
1069 // Set the UA flag if UseMobileSafariUA is enabled.
1070 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1071 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1072 // Chrome puts its product token.
1073 int32_t major = 0;
1074 int32_t minor = 0;
1075 int32_t bugfix = 0;
1076 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1077 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1078
1079 command_line->AppendSwitchASCII(switches::kUserAgent,
1080 web::BuildMobileUserAgent(product));
1081 }
1082
1083 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341084 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301085
1086 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1087 // Management to enabled and add the token to the list of policies.
1088 NSString* token_key =
1089 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1090 NSString* token = [defaults stringForKey:token_key];
1091
1092 if ([token length] > 0) {
1093 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1094 [testing_policies setValue:token forKey:token_key];
1095 }
1096
Vincent Boisselled042d552022-04-09 01:22:591097 if ([defaults boolForKey:@"EnableUserPolicy"]) {
1098 policy::EnableUserPolicy();
1099 }
1100
Guillaume Jenkins57606d72020-08-13 17:32:551101 // If some policies were set, commit them to the app's registration defaults.
1102 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401103 NSDictionary* registration_defaults =
1104 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1105 [defaults registerDefaults:registration_defaults];
1106 }
1107
sdefresne14900ee2015-11-27 14:43:211108 // Freeform commandline flags. These are added last, so that any flags added
1109 // earlier in this function take precedence.
1110 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1111 base::CommandLine::StringVector flags;
1112 // Append an empty "program" argument.
1113 flags.push_back("");
1114
1115 // The number of flags corresponds to the number of text fields in
1116 // Experimental.plist.
1117 const int kNumFreeformFlags = 5;
1118 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1119 NSString* key =
1120 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1121 NSString* flag = [defaults stringForKey:key];
1122 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331123 // iOS keyboard replaces -- with —, so undo that.
1124 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1125 withString:@"--"
1126 options:0
1127 range:NSMakeRange(0, 1)];
1128 // To make things easier, allow flags with no dashes by prepending them
1129 // here. This also allows for flags that just have one dash if they
1130 // exist.
1131 if (![flag hasPrefix:@"-"]) {
1132 flag = [@"--" stringByAppendingString:flag];
1133 }
sdefresne14900ee2015-11-27 14:43:211134 flags.push_back(base::SysNSStringToUTF8(flag));
1135 }
1136 }
1137
1138 base::CommandLine temp_command_line(flags);
1139 command_line->AppendArguments(temp_command_line, false);
1140 }
msardafc76f662017-02-24 12:46:281141
justincohendacc85d2017-06-28 23:34:101142 // Populate command line flag for 3rd party keyboard omnibox workaround.
1143 NSString* enableThirdPartyKeyboardWorkaround =
1144 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1145 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1146 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1147 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1148 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1149 }
1150
Sylvain Defresned3cd8d92022-01-18 13:35:081151 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211152}
1153
David Jean5ca263c2021-08-18 09:19:301154void MonitorExperimentalSettingsChanges() {
David Jean5ca263c2021-08-18 09:19:301155 // Startup values for settings to be observed.
David Jean6f85d44f2021-08-19 08:08:451156 __block NSString* hash = TestingPoliciesHash();
David Jeane83ed652021-08-25 14:52:481157 static std::atomic_bool pending_check(false);
David Jean5ca263c2021-08-18 09:19:301158
1159 auto monitor = ^(NSNotification* notification) {
David Jeane83ed652021-08-25 14:52:481160 bool has_pending_check = pending_check.exchange(true);
1161 if (has_pending_check)
1162 return;
1163
David Jeanbc0fae32021-08-25 10:31:391164 // Can be called from any thread from where the notification was sent,
1165 // but since it may change standardUserDefaults, and that has to be on main
1166 // thread, dispatch to main thread.
1167 dispatch_async(dispatch_get_main_queue(), ^{
1168 // Check if observed settings have changed. Since source and destination
1169 // are both user defaults, this is required to avoid cycling back here.
1170 NSString* newHash = TestingPoliciesHash();
1171 if (![newHash isEqualToString:hash]) {
1172 hash = newHash;
David Jean5ca263c2021-08-18 09:19:301173
David Jeanbc0fae32021-08-25 10:31:391174 // Publish update.
1175 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1176 NSMutableDictionary* testing_policies =
Vincent Boisselleed0e6f1a2021-11-09 06:47:341177 CreateExperimentalTestingPolicies();
David Jeanbc0fae32021-08-25 10:31:391178 NSDictionary* registration_defaults =
1179 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1180 [defaults registerDefaults:registration_defaults];
1181 }
David Jeane83ed652021-08-25 14:52:481182
1183 pending_check.store(false);
David Jeanbc0fae32021-08-25 10:31:391184 });
David Jean5ca263c2021-08-18 09:19:301185 };
1186
1187 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1188 [center addObserverForName:NSUserDefaultsDidChangeNotification
1189 object:nil
David Jeanbc0fae32021-08-25 10:31:391190 queue:nil
David Jean5ca263c2021-08-18 09:19:301191 usingBlock:monitor];
1192}
1193
sdefresne14900ee2015-11-27 14:43:211194void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1195 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181196 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111197 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531198 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211199}
1200
jkrcalbf073372016-07-29 07:21:311201std::vector<std::string> RegisterAllFeatureVariationParameters(
1202 flags_ui::FlagsStorage* flags_storage,
1203 base::FeatureList* feature_list) {
Justin Cohen2e2adb52019-10-25 17:00:021204 // Occasionally DCHECK crashes on canary can be very distuptive. An
1205 // experimental flag was added to aid in temporarily disabling this for
1206 // canary testers.
1207#if defined(DCHECK_IS_CONFIGURABLE)
1208 if (experimental_flags::AreDCHECKCrashesDisabled()) {
1209 std::vector<base::FeatureList::FeatureOverrideInfo> overrides;
1210 overrides.push_back(
1211 {std::cref(base::kDCheckIsFatalFeature),
1212 base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE});
1213 feature_list->RegisterExtraFeatureOverrides(std::move(overrides));
1214 }
1215#endif // defined(DCHECK_IS_CONFIGURABLE)
1216
Sylvain Defresne8327a2f2019-01-17 14:19:181217 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1218 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311219}
1220
sdefresne14900ee2015-11-27 14:43:211221void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1222 flags_ui::FlagAccess access,
Morten Stenshorne7afa5802021-07-15 10:04:431223 base::Value::ListStorage& supported_entries,
1224 base::Value::ListStorage& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181225 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211226 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511227 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211228}
1229
1230void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1231 const std::string& internal_name,
1232 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181233 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1234 enable);
sdefresne14900ee2015-11-27 14:43:211235}
1236
1237void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181238 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211239}
1240
1241namespace testing {
1242
Elly Fong-Jones323ab1092021-08-23 22:36:311243base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1244 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531245 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211246}
1247
1248} // namespace testing