blob: 5b8cfcb30cddac7bbb827fa8b06753b6ce2b85e9 [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"
Christian Xub8c06cd2022-04-29 20:55:0179#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Tina Wang17514e2f2021-09-24 23:57:1880#import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_features.h"
Robbie Gibson686c56732021-10-04 17:11:4581#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
gogerald0ff29e52021-02-03 18:56:1982#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Nazerke0bf10c42020-11-12 11:17:3283#import "ios/chrome/browser/ui/tab_switcher/tab_grid/features.h"
Kurt Horimoto79d590b2018-09-12 19:09:2884#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
Justin Cohen2d81c582018-01-22 14:46:4485#include "ios/chrome/browser/ui/ui_feature_flags.h"
Louis Romerofbfbd932022-04-15 18:04:5086#include "ios/chrome/browser/ui/util/features.h"
Yi Su392b3032018-06-05 07:26:4787#include "ios/chrome/browser/web/features.h"
sdefresne14900ee2015-11-27 14:43:2188#include "ios/chrome/grit/ios_strings.h"
Sylvain Defresne559ce5f2022-01-13 17:14:5889#include "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
Eugene But61818bc2019-04-15 21:04:0790#include "ios/web/common/features.h"
Eugene Bute79f2742019-07-26 17:07:2291#include "ios/web/common/user_agent.h"
Eugene Butb1416232019-07-22 17:31:5892#include "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:2193
Sylvain Defresne9c107082020-10-27 16:39:1394#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
95#include "ios/chrome/browser/screen_time/features.h"
96#endif
97
sdefresne14900ee2015-11-27 14:43:2198#if !defined(OFFICIAL_BUILD)
99#include "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22100#endif
stkhapuginc1be1792016-12-13 14:30:53101
102#if !defined(__has_feature) || !__has_feature(objc_arc)
103#error "This file requires ARC support."
104#endif
sdefresne14900ee2015-11-27 14:43:21105
elawrence816f6790e2017-06-16 18:19:28106using flags_ui::FeatureEntry;
107
sdefresne14900ee2015-11-27 14:43:21108namespace {
Emily Starkbafa9062017-12-27 15:22:46109
Olivier Robin3d60411622018-02-23 10:03:22110const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
111 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
112 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
113 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
114 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
115 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
116 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
117 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
118 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
119 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
120};
121
Nohemi Fernandez222d6d42020-09-30 20:35:57122const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = {
123 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
124 {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"},
125 {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"},
126 {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"},
127};
128
Nohemi Fernandezc00842a2021-07-26 11:47:34129const FeatureEntry::Choice
130 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
131 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
132 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
133 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
134 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
135};
136
Stepan Khapugincc4e9842019-01-23 13:38:13137const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
138 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
139const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
140 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
141const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
142 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
143const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
144 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
145const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
146 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
147const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
148 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
149const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
150 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
151
152const FeatureEntry::FeatureVariation
153 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
154 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53155 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13156 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53157 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13158 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53159 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13160 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53161 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13162 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53163 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13164 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53165 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13166 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53167 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13168
Caitlin Fischer37e01232019-05-24 13:05:45169const FeatureEntry::FeatureParam
170 kAutofillUseMobileLabelDisambiguationShowAll[] = {
171 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
172 autofill::features::
173 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
174const FeatureEntry::FeatureParam
175 kAutofillUseMobileLabelDisambiguationShowOne[] = {
176 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
177 autofill::features::
178 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
179
180const FeatureEntry::FeatureVariation
181 kAutofillUseMobileLabelDisambiguationVariations[] = {
182 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53183 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45184 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53185 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45186
Javier Ernesto Flores Roblese85f4a12021-02-23 18:10:10187const FeatureEntry::FeatureParam
Javier Ernesto Flores Robles159414232021-06-16 14:29:59188 kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = {
189 {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}};
190const FeatureEntry::FeatureVariation
191 kDefaultBrowserFullscreenPromoExperimentVariations[] = {
192 {"Remind me later",
193 kDefaultBrowserFullscreenPromoExperimentRemindMeLater,
Daniel Cheng1f047a82022-02-26 10:04:53194 std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater),
Javier Ernesto Flores Robles159414232021-06-16 14:29:59195 nullptr}};
196
gogeralddb0d8ae2020-11-13 03:56:58197const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = {
198 {kDiscoverFeedIsNativeUIEnabled, "true"}};
199const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = {
200 {"Native UI", kDiscoverFeedInNtpEnableNativeUI,
Daniel Cheng1f047a82022-02-26 10:04:53201 std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}};
gogeralddb0d8ae2020-11-13 03:56:58202
Sergio Collazos9fcc6ed2021-10-06 00:58:03203const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = {
204 {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}};
205const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = {
206 {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}};
207const FeatureEntry::FeatureVariation
208 kEnableDiscoverFeedStaticResourceServingVariations[] = {
209 {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53210 std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03211 {"Preload Templates", kDiscoverFeedSRSPreloadTemplates,
Daniel Cheng1f047a82022-02-26 10:04:53212 std::size(kDiscoverFeedSRSPreloadTemplates), nullptr},
Sergio Collazos9fcc6ed2021-10-06 00:58:03213};
214
Robbie Gibson46351032022-03-31 19:46:23215const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = {
216 {kIOSOmniboxUpdatedPopupUIVariationName,
217 kIOSOmniboxUpdatedPopupUIVariation1}};
218const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = {
219 {kIOSOmniboxUpdatedPopupUIVariationName,
220 kIOSOmniboxUpdatedPopupUIVariation2}};
221const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = {
222 {"Version 1", kiOSOmniboxUpdatedPopupUIVersion1,
223 std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr},
224 {"Version 2", kiOSOmniboxUpdatedPopupUIVersion2,
225 std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}};
226
gogerald53c6e7a2021-04-15 22:07:35227const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08228 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35229 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
230const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08231 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35232 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
233const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08234 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35235 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
236const FeatureEntry::FeatureParam
237 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
238 {kStartSurfaceShrinkLogoParam, "true"},
239 {kStartSurfaceReturnToRecentTabParam, "true"},
240 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
241const FeatureEntry::FeatureParam
242 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
243 {kStartSurfaceHideShortcutsParam, "true"},
244 {kStartSurfaceReturnToRecentTabParam, "true"},
245 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
246const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08247 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35248 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
249const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
250 {kStartSurfaceHideShortcutsParam, "true"},
251 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
252const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08253 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35254 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
255const FeatureEntry::FeatureParam
256 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
257 {kStartSurfaceShrinkLogoParam, "true"},
258 {kStartSurfaceReturnToRecentTabParam, "true"},
259 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
260const FeatureEntry::FeatureParam
261 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
262 {kStartSurfaceHideShortcutsParam, "true"},
263 {kStartSurfaceReturnToRecentTabParam, "true"},
264 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08265
gogerald0e39e3aa2021-02-10 18:41:23266const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35267 {"10s:Show Return to Recent Tab tile",
268 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53269 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35270 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53271 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35272 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53273 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35274 {"10s:Shrink Logo and show Return to Recent Tab tile",
275 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53276 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35277 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
278 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53279 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35280 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53281 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35282 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53283 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35284 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53285 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35286 {"1h:Shrink Logo and show Return to Recent Tab tile",
287 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53288 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35289 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
290 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53291 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08292};
gogerald0e39e3aa2021-02-10 18:41:23293
Aliona DANGLA8fae66f02021-10-06 15:47:11294const FeatureEntry::FeatureParam kFREDefaultPromoTestingDefaultDelay[] = {
295 {kFREDefaultPromoTestingDefaultDelayParam, "true"}};
Aliona DANGLAebfd7d022021-10-08 14:15:45296const FeatureEntry::FeatureParam kFREDefaultPromoTestingOnly[] = {
297 {kFREDefaultPromoTestingOnlyParam, "true"}};
Aliona DANGLA8fae66f02021-10-06 15:47:11298const FeatureEntry::FeatureParam kFREDefaultPromoTestingShortDelay[] = {
299 {kFREDefaultPromoTestingShortDelayParam, "true"}};
300const FeatureEntry::FeatureVariation kFREDefaultPromoTestingVariations[] = {
301 {"Wait 14 days after FRE default browser promo",
302 kFREDefaultPromoTestingDefaultDelay,
Daniel Cheng1f047a82022-02-26 10:04:53303 std::size(kFREDefaultPromoTestingDefaultDelay), nullptr},
Aliona DANGLAebfd7d022021-10-08 14:15:45304 {"FRE default browser promo only", kFREDefaultPromoTestingOnly,
Daniel Cheng1f047a82022-02-26 10:04:53305 std::size(kFREDefaultPromoTestingOnly), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11306 {"Wait 3 days after FRE default browser promo",
307 kFREDefaultPromoTestingShortDelay,
Daniel Cheng1f047a82022-02-26 10:04:53308 std::size(kFREDefaultPromoTestingShortDelay), nullptr},
Aliona DANGLA8fae66f02021-10-06 15:47:11309};
310
Veronique Nguyen6593c762021-11-30 17:28:56311const FeatureEntry::FeatureVariation kEnableFREUIModuleIOSVariations[] = {
312 {"TOP | OLD",
313 (FeatureEntry::FeatureParam[]){
314 {kFREUIIdentitySwitcherPositionParam, "top"},
315 {kFREUIStringsSetParam, "old"}},
316 2, nullptr},
317 {"BOTTOM | OLD",
318 (FeatureEntry::FeatureParam[]){
319 {kFREUIIdentitySwitcherPositionParam, "bottom"},
320 {kFREUIStringsSetParam, "old"}},
321 2, nullptr},
322 {"TOP | NEW",
323 (FeatureEntry::FeatureParam[]){
324 {kFREUIIdentitySwitcherPositionParam, "top"},
325 {kFREUIStringsSetParam, "new"}},
326 2, nullptr},
327 {"BOTTOM | NEW",
328 (FeatureEntry::FeatureParam[]){
329 {kFREUIIdentitySwitcherPositionParam, "bottom"},
330 {kFREUIStringsSetParam, "new"}},
331 2, nullptr}};
332
jlebel041fc1c2022-03-04 12:53:30333const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = {
334 {kNewMobileIdentityConsistencyFREParam,
335 kNewMobileIdentityConsistencyFREParamUMADialog}};
336const FeatureEntry::FeatureParam kNewMICEFREWithThreeSteps[] = {
337 {kNewMobileIdentityConsistencyFREParam,
338 kNewMobileIdentityConsistencyFREParamThreeSteps}};
339const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = {
340 {kNewMobileIdentityConsistencyFREParam,
341 kNewMobileIdentityConsistencyFREParamTwoSteps}};
342const FeatureEntry::FeatureVariation
343 kNewMobileIdentityConsistencyFREVariations[] = {
344 {"New FRE with UMA dialog", kNewMICEFREWithUMADialog,
345 std::size(kNewMICEFREWithUMADialog), nullptr},
346 {"new FRE with 3 steps", kNewMICEFREWithThreeSteps,
347 std::size(kNewMICEFREWithThreeSteps), nullptr},
348 {"new FRE with 2 steps", kNewMICEFREWithTwoSteps,
349 std::size(kNewMICEFREWithTwoSteps), nullptr}};
350
Louis Romero023cc5052022-04-08 23:29:39351const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = {
352 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}};
Christian Xubd60c4b72022-03-22 15:25:01353const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = {
354 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}};
355const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = {
356 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}};
357const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = {
358 {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}};
359const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = {
Louis Romero023cc5052022-04-08 23:29:39360 {"Target Highlight", kBubbleRichIPHTargetHighlight,
361 std::size(kBubbleRichIPHTargetHighlight), nullptr},
Christian Xubd60c4b72022-03-22 15:25:01362 {"Explicit dismissal", kBubbleRichIPHExplicitDismissal,
363 std::size(kBubbleRichIPHExplicitDismissal), nullptr},
364 {"Dismissal and rich content", kBubbleRichIPHRich,
365 std::size(kBubbleRichIPHRich), nullptr},
Louis Romero023cc5052022-04-08 23:29:39366 {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze,
Christian Xubd60c4b72022-03-22 15:25:01367 std::size(kBubbleRichIPHRichWithSnooze), nullptr},
368};
369
Cooper Knaak1e026562017-07-26 05:22:28370// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21371// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28372// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
373// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21374// macro for this type supplying the command line to the macro.
375// . MULTI_VALUE: a list of choices, the first of which should correspond to a
376// deactivated state for this lab (i.e. no command line option). To specify
377// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
378// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28379// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
380// either enabled, disabled, or uses the default value of the associated
381// base::Feature instance. To specify this type of entry use the macro
382// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
383// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
384// base::Feature instance. Choices corresponding to the default state, a
385// universally enabled state, and a universally disabled state are
386// automatically included. To specify this type of entry use the macro
387// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
388// the array of choices.
389//
sdefresne14900ee2015-11-27 14:43:21390// See the documentation of FeatureEntry for details on the fields.
391//
392// When adding a new choice, add it to the end of the list.
393const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28394 {"in-product-help-demo-mode-choice",
395 flag_descriptions::kInProductHelpDemoModeName,
396 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
397 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23398 feature_engagement::kIPHDemoMode,
399 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09400 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22401 {"enable-autofill-credit-card-upload",
402 flag_descriptions::kAutofillCreditCardUploadName,
403 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24404 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Tina Wang41d431c2021-06-21 21:04:13405 {"enable-discover-feed-preview",
406 flag_descriptions::kEnableDiscoverFeedPreviewName,
407 flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos,
408 FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)},
Moe Ahmadid6d5d172018-06-20 17:20:23409 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
410 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
411 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51412 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23413 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
414 {"wallet-service-use-sandbox",
415 flag_descriptions::kWalletServiceUseSandboxName,
416 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
417 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
418 autofill::switches::kWalletServiceUseSandbox,
419 "1",
420 autofill::switches::kWalletServiceUseSandbox,
421 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59422 {"show-autofill-type-predictions",
423 flag_descriptions::kShowAutofillTypePredictionsName,
424 flag_descriptions::kShowAutofillTypePredictionsDescription,
425 flags_ui::kOsIos,
Gauthier Ambardcfd85182018-01-05 10:37:46426 FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)},
Olivier Robin3d60411622018-02-23 10:03:22427 {"autofill-ios-delay-between-fields",
428 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
429 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
430 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Kurt Horimotodc33af32018-05-01 01:39:14431 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53432 flag_descriptions::kFullscreenSmoothScrollingName,
433 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
434 FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06435 {"webpage-default-zoom-from-dynamic-type",
436 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
437 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
438 flags_ui::kOsIos,
439 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56440 {"webpage-alternative-text-zoom",
441 flag_descriptions::kWebPageAlternativeTextZoomName,
442 flag_descriptions::kWebPageAlternativeTextZoomDescription,
443 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Kurt Horimoto79d590b2018-09-12 19:09:28444 {"toolbar-container", flag_descriptions::kToolbarContainerName,
445 flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
446 FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
Stepan Khapugincc4e9842019-01-23 13:38:13447 {"omnibox-ui-max-autocomplete-matches",
448 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
449 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
450 flags_ui::kOsIos,
451 FEATURE_WITH_PARAMS_VALUE_TYPE(
452 omnibox::kUIExperimentMaxAutocompleteMatches,
453 kOmniboxUIMaxAutocompleteMatchesVariations,
454 "OmniboxUIMaxAutocompleteVariations")},
Robbie Gibson84f1ddc2020-12-10 21:41:28455 {"omnibox-local-history-zero-suggest",
456 flag_descriptions::kOmniboxLocalHistoryZeroSuggestName,
457 flag_descriptions::kOmniboxLocalHistoryZeroSuggestDescription,
458 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggest)},
Justin Cohen20b6f072019-01-16 01:38:50459#if defined(DCHECK_IS_CONFIGURABLE)
460 {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName,
461 flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos,
462 FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)},
463#endif // defined(DCHECK_IS_CONFIGURABLE)
Caitlin Fischer43edd90a2019-05-01 13:24:30464 {"autofill-use-mobile-label-disambiguation",
465 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
466 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
467 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45468 FEATURE_WITH_PARAMS_VALUE_TYPE(
469 autofill::features::kAutofillUseMobileLabelDisambiguation,
470 kAutofillUseMobileLabelDisambiguationVariations,
471 "AutofillUseMobileLabelDisambiguation")},
Olivier Robin43814bb2021-06-22 15:25:45472 {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName,
473 flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos,
474 FEATURE_VALUE_TYPE(kMetrickitCrashReport)},
Mike Doughertyb6c770d2019-09-13 22:56:46475 {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName,
476 flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos,
Jesse McKenna85c1a59f2021-05-05 19:08:30477 FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)},
Eugene But2823dc7e2020-07-21 18:10:37478 {"ios-synthetic-crash-reports",
479 flag_descriptions::kSyntheticCrashReportsForUteName,
480 flag_descriptions::kSyntheticCrashReportsForUteDescription,
481 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)},
Jérôme Lebelc374fdd2019-09-27 10:36:48482 {"force-startup-signin-promo",
483 flag_descriptions::kForceStartupSigninPromoName,
484 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29485 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22486 {"restore-session-from-cache",
487 flag_descriptions::kRestoreSessionFromCacheName,
488 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49489 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
sczs4622e6e2019-11-06 01:17:59490 {"autofill-save-card-dismiss-on-navigation",
491 flag_descriptions::kAutofillSaveCardDismissOnNavigationName,
492 flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription,
493 flags_ui::kOsIos,
494 FEATURE_VALUE_TYPE(
495 autofill::features::kAutofillSaveCardDismissOnNavigation)},
sczs37d9c132020-07-18 06:06:33496 {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName,
adamta22a4d502020-05-21 03:12:21497 flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos,
gogeralddb0d8ae2020-11-13 03:56:58498 FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp,
499 kDiscoverFeedInNtpVariations,
500 "IOSDiscoverFeed")},
Roberto Mourab87b9722020-06-17 17:12:09501 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
502 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
503 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41504 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
505 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
506 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Veronique Nguyen6593c762021-11-30 17:28:56507 {"enable-fre-ui-module-ios-with-options",
508 flag_descriptions::kEnableFREUIModuleIOSName,
Tina Wanga252ca42021-04-01 17:14:23509 flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos,
Veronique Nguyen6593c762021-11-30 17:28:56510 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREUIModuleIOS,
511 kEnableFREUIModuleIOSVariations,
512 "EnableFREUIModuleIOS")},
jlebel041fc1c2022-03-04 12:53:30513 {"new-mobile-identity-consistency-fre",
514 flag_descriptions::kNewMobileIdentityConsistencyFREName,
515 flag_descriptions::kNewMobileIdentityConsistencyFREDescription,
516 flags_ui::kOsIos,
517 FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE,
518 kNewMobileIdentityConsistencyFREVariations,
519 "NewMobileIdentityConsistencyFRE")},
Tina Wang17514e2f2021-09-24 23:57:18520 {"enable-long-message-duration",
521 flag_descriptions::kEnableLongMessageDurationName,
522 flag_descriptions::kEnableLongMessageDurationDescription, flags_ui::kOsIos,
523 FEATURE_VALUE_TYPE(kEnableLongMessageDuration)},
Sylvain Defresne9c107082020-10-27 16:39:13524#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45525 {"screen-time-integration-ios",
526 flag_descriptions::kScreenTimeIntegrationName,
527 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
528 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13529#endif
Nazerke3e993f72020-09-21 13:00:06530 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
531 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
532 FEATURE_VALUE_TYPE(kModernTabStrip)},
Nohemi Fernandez222d6d42020-09-30 20:35:57533 {"minutes-delay-to-restore-gaia-cookies-if-deleted",
534 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName,
535 flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription,
536 flags_ui::kOsIos,
537 MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)},
Vidhan Jainb4de5c52021-08-30 17:08:02538 {"add-passwords-in-settings",
539 flag_descriptions::kAddPasswordsInSettingsName,
540 flag_descriptions::kAddPasswordsInSettingsDescription, flags_ui::kOsIos,
541 FEATURE_VALUE_TYPE(
542 password_manager::features::kSupportForAddPasswordsInSettings)},
Eugene Butf869bff2020-12-10 01:16:55543 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
544 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
545 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Chris Lub17195f2020-12-10 20:49:14546 {"default-browser-fullscreen-promo-experiment",
547 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName,
548 flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription,
549 flags_ui::kOsIos,
Javier Ernesto Flores Robles159414232021-06-16 14:29:59550 FEATURE_WITH_PARAMS_VALUE_TYPE(
551 kDefaultBrowserFullscreenPromoExperiment,
552 kDefaultBrowserFullscreenPromoExperimentVariations,
553 "IOSDefaultBrowserFullscreenPromoExperiment")},
Cheick Cisse76ade3d2020-12-16 00:15:11554 {"ios-shared-highlighting-color-change",
555 flag_descriptions::kIOSSharedHighlightingColorChangeName,
556 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07557 flags_ui::kOsIos,
558 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34559 {"ios-shared-highlighting-v2",
560 flag_descriptions::kIOSSharedHighlightingV2Name,
561 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
562 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45563 {"omnibox-new-textfield-implementation",
564 flag_descriptions::kOmniboxNewImplementationName,
565 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
566 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin422f08d2022-02-18 16:19:44567 {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName,
568 flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos,
Robbie Gibson46351032022-03-31 19:46:23569 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI,
570 kiOSOmniboxUpdatedPopupUIVariations,
571 "kIOSOmniboxUpdatedPopupUI")},
gogerald0ff29e52021-02-03 18:56:19572 {"start-surface", flag_descriptions::kStartSurfaceName,
573 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23574 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
575 kStartSurfaceVariations,
576 "StartSurface")},
Justin Cohen13ac7a202021-02-04 18:27:28577 {"ios-crashpad", flag_descriptions::kCrashpadIOSName,
578 flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos,
579 FEATURE_VALUE_TYPE(kCrashpadIOS)},
Vidhan Jain451b4752021-07-15 10:16:42580 {"autofill-address-verification-in-save-prompt",
581 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
582 flag_descriptions::
583 kEnableAutofillAddressSavePromptAddressVerificationDescription,
584 flags_ui::kOsIos,
585 FEATURE_VALUE_TYPE(
586 autofill::features::
587 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Vidhan Jaina65741552021-03-09 17:18:27588 {"autofill-address-save-prompt",
589 flag_descriptions::kEnableAutofillAddressSavePromptName,
590 flag_descriptions::kEnableAutofillAddressSavePromptDescription,
591 flags_ui::kOsIos,
592 FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)},
Viktor Semeniuk68e794a2021-03-24 10:23:25593 {"filling-across-affiliated-websites",
594 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
595 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
596 flags_ui::kOsIos,
597 FEATURE_VALUE_TYPE(
598 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Jared Sauld47c2b72021-03-25 22:47:31599 {"autofill-parse-merchant-promo-code-fields",
600 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName,
601 flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription,
602 flags_ui::kOsIos,
603 FEATURE_VALUE_TYPE(
604 autofill::features::kAutofillParseMerchantPromoCodeFields)},
edchin257cea2f2021-04-07 13:07:13605 {"interest-feed-v2-clicks-and-views-cond-upload",
606 flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName,
607 flag_descriptions::
608 kInterestFeedV2ClickAndViewActionsConditionalUploadDescription,
609 flags_ui::kOsIos,
610 FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)},
Mohammad Refaat76b14f542021-10-27 14:46:55611 {"tabs-search-ios", flag_descriptions::kTabsSearchName,
612 flag_descriptions::kTabsSearchDescription, flags_ui::kOsIos,
613 FEATURE_VALUE_TYPE(kTabsSearch)},
Mohammad Refaat95410082022-02-23 02:01:02614 {"tabs-search-regular-results-suggested-actions-ios",
615 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsName,
616 flag_descriptions::kTabsSearchRegularResultsSuggestedActionsDescription,
617 flags_ui::kOsIos,
618 FEATURE_VALUE_TYPE(kTabsSearchRegularResultsSuggestedActions)},
Side Yilmaz0e6c15a2021-04-26 12:55:09619 {"incognito-brand-consistency-for-ios",
620 flag_descriptions::kIncognitoBrandConsistencyForIOSName,
621 flag_descriptions::kIncognitoBrandConsistencyForIOSDescription,
622 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIncognitoBrandConsistencyForIOS)},
Side Yilmaz6c53f7102021-09-07 13:26:19623 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
624 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
625 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Side YILMAZ4b40a3082022-04-11 10:13:33626 {"update-history-entry-points-in-incognito",
627 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
628 flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
629 flags_ui::kOsIos,
630 FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
jlebeld95434d652021-06-22 10:32:48631 {"sync-trusted-vault-passphrase-ios-rpc",
632 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName,
633 flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription,
634 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51635 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)},
Mikel Astiz850b0fe2021-06-16 09:47:27636 {"sync-trusted-vault-passphrase-promo",
637 flag_descriptions::kSyncTrustedVaultPassphrasePromoName,
638 flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription,
639 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51640 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)},
Mikel Astiz850b0fe2021-06-16 09:47:27641 {"sync-trusted-vault-passphrase-recovery",
642 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName,
643 flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription,
644 flags_ui::kOsIos,
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51645 FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)},
Nohemi Fernandezc00842a2021-07-26 11:47:34646 {"wait-threshold-seconds-for-capabilities-api",
647 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
648 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
649 flags_ui::kOsIos,
650 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23651 {"autofill-fill-merchant-promo-code-fields",
652 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
653 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
654 flags_ui::kOsIos,
655 FEATURE_VALUE_TYPE(
656 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Gauthier Ambard14d3a262021-08-09 18:09:23657 {"context-menu-phase2",
658 flag_descriptions::kWebViewNativeContextMenuPhase2Name,
659 flag_descriptions::kWebViewNativeContextMenuPhase2Description,
660 flags_ui::kOsIos,
661 FEATURE_VALUE_TYPE(web::features::kWebViewNativeContextMenuPhase2)},
Gauthier Ambard14d3a262021-08-09 18:09:23662 {"default-wkwebview-context-menu",
663 flag_descriptions::kDefaultWebViewContextMenuName,
664 flag_descriptions::kDefaultWebViewContextMenuDescription, flags_ui::kOsIos,
665 FEATURE_VALUE_TYPE(web::features::kDefaultWebViewContextMenu)},
Sylvain Defresnedff67e42021-09-24 09:43:03666 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
667 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
668 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
669 {"enable-new-download-api", flag_descriptions::kEnableNewDownloadAPIName,
670 flag_descriptions::kEnableNewDownloadAPIDescription, flags_ui::kOsIos,
671 FEATURE_VALUE_TYPE(web::features::kEnableNewDownloadAPI)},
Evan Bernstein0a85f332021-09-29 19:07:24672 {"use-lens-to-search-for-image",
673 flag_descriptions::kUseLensToSearchForImageName,
674 flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos,
Ali Juma02a9b7b2021-10-01 13:44:44675 FEATURE_VALUE_TYPE(kUseLensToSearchForImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40676 {"use-load-simulated-request-for-error-page-navigation",
677 flag_descriptions::kUseLoadSimulatedRequestForErrorPageNavigationName,
678 flag_descriptions::
679 kUseLoadSimulatedRequestForErrorPageNavigationDescription,
680 flags_ui::kOsIos,
681 FEATURE_VALUE_TYPE(
682 web::features::kUseLoadSimulatedRequestForErrorPageNavigation)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03683 {"enable-discover-feed-static-resource-serving",
684 flag_descriptions::kEnableDiscoverFeedStaticResourceServingName,
685 flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription,
686 flags_ui::kOsIos,
687 FEATURE_WITH_PARAMS_VALUE_TYPE(
688 kEnableDiscoverFeedStaticResourceServing,
689 kEnableDiscoverFeedStaticResourceServingVariations,
690 "IOSDiscoverFeedStaticResourceServing")},
691 {"enable-disco-feed-endpoint",
692 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
693 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
694 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11695 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
696 {"enable-fre-default-browser-screen-testing",
697 flag_descriptions::kEnableFREDefaultBrowserScreenTestingName,
698 flag_descriptions::kEnableFREDefaultBrowserScreenTestingDescription,
699 flags_ui::kOsIos,
700 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserScreenTesting,
701 kFREDefaultPromoTestingVariations,
ginny huang5ba43b82021-10-06 18:28:18702 "EnableFREDefaultBrowserScreenTesting")},
edchin1313f2b2021-10-11 08:08:47703 {"enable-discover-feed-shorter-cache",
704 flag_descriptions::kEnableDiscoverFeedShorterCacheName,
705 flag_descriptions::kEnableDiscoverFeedShorterCacheDescription,
706 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedShorterCache)},
Tommy Martino7393d762021-10-12 17:59:28707 {"shared-highlighting-amp",
708 flag_descriptions::kIOSSharedHighlightingAmpName,
709 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
710 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28711 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42712 commerce::flag_descriptions::kCommercePriceTrackingName,
713 commerce::flag_descriptions::kCommercePriceTrackingDescription,
714 flags_ui::kOsIos,
715 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
716 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15717 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06718 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
719 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
720 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54721 {"ntp-view-hierarchy-repair",
722 flag_descriptions::kNTPViewHierarchyRepairName,
723 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
724 FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)},
Chris Lu37588a92021-11-02 21:19:45725 {"single-ntp", flag_descriptions::kSingleNtpName,
726 flag_descriptions::kSingleNtpDescription, flags_ui::kOsIos,
727 FEATURE_VALUE_TYPE(kSingleNtp)},
Justin Cohen69cec682021-11-04 20:10:26728 {"synthesized-restore-session",
729 flag_descriptions::kSynthesizedRestoreSessionName,
730 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
731 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Chris Lu4723b822021-11-05 21:47:44732 {"remove-extra-ntps", flag_descriptions::kRemoveExcessNTPsExperimentName,
733 flag_descriptions::kRemoveExcessNTPsExperimentDescription,
Sylvain Defresne1619dd002021-11-06 10:09:48734 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kRemoveExcessNTPs)},
735 {"lazily-create-web-state-on-restoration",
736 flag_descriptions::kLazilyCreateWebStateOnRestorationName,
737 flag_descriptions::kLazilyCreateWebStateOnRestorationDescription,
738 flags_ui::kOsIos,
739 FEATURE_VALUE_TYPE(web::features::kEnableUnrealizedWebStates)},
ginny huang1f1755c2021-11-11 23:38:23740 {"enable-shortened-password-auto-fill-instruction",
741 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionName,
742 flag_descriptions::kEnableShortenedPasswordAutoFillInstructionDescription,
743 flags_ui::kOsIos,
744 FEATURE_VALUE_TYPE(kEnableShortenedPasswordAutoFillInstruction)},
Benjamin Williams0e7e2fb2021-11-17 03:03:41745 {"enable-password-manager-branding-update",
746 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName,
747 flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription,
748 flags_ui::kOsIos,
Aliona DANGLAe5b0b6e52021-11-30 11:58:19749 FEATURE_VALUE_TYPE(
750 password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)},
Gauthier Ambard1d326e22021-12-16 10:57:53751 {"default-mode-ua", flag_descriptions::kAddSettingForDefaultPageModeName,
752 flag_descriptions::kAddSettingForDefaultPageModeDescription,
753 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAddSettingForDefaultPageMode)},
ginnnnnnny1532d872021-12-20 15:57:37754 {"ios-media-permissions-control",
755 flag_descriptions::kMediaPermissionsControlName,
756 flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos,
757 FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)},
Olivier Robin3a957df2021-12-21 18:04:34758 {"enable-save-session-tabs-in-separate-files",
759 flag_descriptions::kSaveSessionTabsToSeparateFilesName,
760 flag_descriptions::kSaveSessionTabsToSeparateFilesDescription,
761 flags_ui::kOsIos,
762 FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)},
Gauthier Ambard42ad0bb2021-12-22 16:50:48763 {"use-sf-symbols-samples", flag_descriptions::kUseSFSymbolsSamplesName,
764 flag_descriptions::kUseSFSymbolsSamplesDescription, flags_ui::kOsIos,
765 FEATURE_VALUE_TYPE(kUseSFSymbolsSamples)},
Gauthier Ambardfa182542022-01-07 08:27:50766 {"use-new-popup-menu", flag_descriptions::kUseUIKitPopupMenuName,
767 flag_descriptions::kUseUIKitPopupMenuDescription, flags_ui::kOsIos,
768 FEATURE_VALUE_TYPE(kUseUIKitPopupMenu)},
Nohemi Fernandez76f54802022-01-10 18:23:32769 {"enable-unicorn-account-support",
770 flag_descriptions::kEnableUnicornAccountSupportName,
771 flag_descriptions::kEnableUnicornAccountSupportDescription,
772 flags_ui::kOsIos,
773 FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)},
Chris Lu411bea82022-01-12 18:19:22774 {"single-cell-content-suggestions",
775 flag_descriptions::kSingleCellContentSuggestionsName,
776 flag_descriptions::kSingleCellContentSuggestionsDescription,
777 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSingleCellContentSuggestions)},
Chris Lue5211052022-02-02 20:44:04778 {"content-suggestions-header-migration",
779 flag_descriptions::kContentSuggestionsHeaderMigrationName,
780 flag_descriptions::kContentSuggestionsHeaderMigrationDescription,
781 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContentSuggestionsHeaderMigration)},
rgod90cca8b2022-02-04 12:38:27782 {"leak-detection-unauthenticated",
783 flag_descriptions::kLeakDetectionUnauthenticatedName,
784 flag_descriptions::kLeakDetectionUnauthenticatedDescription,
785 flags_ui::kOsIos,
786 FEATURE_VALUE_TYPE(
787 password_manager::features::kLeakDetectionUnauthenticated)},
Veronique Nguyenfc9824b2022-02-10 17:12:53788 {"mute-compromised-passwords",
789 flag_descriptions::kMuteCompromisedPasswordsName,
790 flag_descriptions::kMuteCompromisedPasswordsDescription, flags_ui::kOsIos,
791 FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)},
Veronique Nguyen00ba26ea2022-02-25 14:57:17792 {"enable-favicon-passwords",
793 flag_descriptions::kEnableFaviconForPasswordsName,
794 flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos,
795 FEATURE_VALUE_TYPE(
796 password_manager::features::kEnableFaviconForPasswords)},
Shivani Chauhanbf97b0d2022-02-08 22:21:28797 {"autofill-enable-sending-bcn-in-get-upload-details",
798 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName,
799 flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription,
800 flags_ui::kOsIos,
801 FEATURE_VALUE_TYPE(
802 autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)},
Ali Juma1429cf8a2022-02-09 15:31:01803 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
804 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
805 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramos34175732022-02-14 18:59:16806 {"enable-enhanced-safe-browsing",
807 flag_descriptions::kEnhancedProtectionName,
808 flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos,
809 FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)},
Christian Xu612e2852022-02-10 17:27:42810 {"context-menu-phase2-screenshot",
811 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotName,
812 flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotDescription,
813 flags_ui::kOsIos,
814 FEATURE_VALUE_TYPE(
815 web::features::kWebViewNativeContextMenuPhase2Screenshot)},
Shivani Chauhanaf1eb74d2022-02-11 21:13:19816 {"autofill-enable-unmask-card-request-set-instrument-id",
817 flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName,
818 flag_descriptions::
819 kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription,
820 flags_ui::kOsIos,
821 FEATURE_VALUE_TYPE(
822 autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:00823 {"send-tab-to-self-signin-promo",
824 flag_descriptions::kSendTabToSelfSigninPromoName,
825 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
826 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Chris Lu7f560f72022-03-01 18:19:01827 {"content-suggestions-uiviewcontroller-migration",
828 flag_descriptions::kContentSuggestionsUIViewControllerMigrationName,
829 flag_descriptions::kContentSuggestionsUIViewControllerMigrationDescription,
830 flags_ui::kOsIos,
831 FEATURE_VALUE_TYPE(kContentSuggestionsUIViewControllerMigration)},
Christian Xubd60c4b72022-03-22 15:25:01832 {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName,
833 flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos,
834 FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH,
835 kBubbleRichIPHVariations,
836 "BubbleRichIPH")},
Siyu Anff02e742022-04-07 19:08:22837 {"autofill-enforce-delays-in-strike-database",
838 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
839 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
840 flags_ui::kOsIos,
841 FEATURE_VALUE_TYPE(
842 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Ewann4f260562022-04-11 13:37:19843 {"download-calendar", flag_descriptions::kDownloadCalendarName,
844 flag_descriptions::kDownloadCalendarDescription, flags_ui::kOsIos,
845 FEATURE_VALUE_TYPE(kDownloadCalendar)},
Louis Romerofbfbd932022-04-15 18:04:50846 {"uiview-window-observing", flag_descriptions::kUIViewWindowObservingName,
847 flag_descriptions::kUIViewWindowObservingDescription, flags_ui::kOsIos,
848 FEATURE_VALUE_TYPE(kUIViewWindowObserving)},
Jared Saulb0473bd2022-04-20 00:03:41849 {"autofill-upstream-allow-additional-email-domains",
850 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
851 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
852 flags_ui::kOsIos,
853 FEATURE_VALUE_TYPE(
854 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
855 {"autofill-upstream-allow-all-email-domains",
856 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
857 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
858 flags_ui::kOsIos,
859 FEATURE_VALUE_TYPE(
860 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Olivier Robinffe767c2022-04-21 13:13:23861 {"enable-tflite-language-detection",
862 flag_descriptions::kTFLiteLanguageDetectionName,
863 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
864 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
865 {"optimization-guide-model-downloading",
866 flag_descriptions::kOptimizationGuideModelDownloadingName,
867 flag_descriptions::kOptimizationGuideModelDownloadingDescription,
868 flags_ui::kOsIos,
869 FEATURE_VALUE_TYPE(
870 optimization_guide::features::kOptimizationGuideModelDownloading)},
871 {"optimization-target-prediction",
872 flag_descriptions::kOptimizationTargetPredictionName,
873 flag_descriptions::kOptimizationTargetPredictionDescription,
874 flags_ui::kOsIos,
875 FEATURE_VALUE_TYPE(
876 optimization_guide::features::kOptimizationTargetPrediction)},
Rushan Suleymanov727309602022-04-28 20:08:54877 {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName,
878 flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos,
879 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)},
880 {"sync-standalone-invalidations-wallet-and-offer",
881 flag_descriptions::kSyncInvalidationsWalletAndOfferName,
882 flag_descriptions::kSyncInvalidationsWalletAndOfferDescription,
883 flags_ui::kOsIos,
884 FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)},
Christian Xub8c06cd2022-04-29 20:55:01885 {"suggestions-scrolling-ipad",
886 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
887 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
888 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Sylvain Defresne1619dd002021-11-06 10:09:48889};
sdefresne14900ee2015-11-27 14:43:21890
Rohit Raobed794c2020-04-27 15:27:45891bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
892 return false;
893}
894
895flags_ui::FlagsState& GetGlobalFlagsState() {
896 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
897 nullptr);
898 return *flags_state;
899}
David Jean5ca263c2021-08-18 09:19:30900// Creates the experimental test policies map, used by AsyncPolicyLoader and
901// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:34902NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:21903 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
904
Guillaume Jenkins25e9bd72020-08-27 17:39:06905 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:55906 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:06907 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:55908
Guillaume Jenkins25e9bd72020-08-27 17:39:06909 // Set some sample policy values for testing if EnableSamplePolicies is set to
910 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:40911 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:55912 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:01913 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
914
Guillaume Jenkinseeb7007c2020-06-25 22:55:40915 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
916
917 // 2 = Disable all variations
918 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
919
920 // 2 = Do not allow any site to show popups
921 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
922
Tina Wang5abee802020-07-29 23:09:52923 // Set default search engine.
924 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
925 @YES,
926 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
927 @"http://www.google.com/search?q={searchTerms}",
928 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:02929 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:52930
Tina Wang89068c82020-10-29 15:51:50931 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
932
Gauthier Ambard21b23702021-04-16 16:11:27933 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
934
Guillaume Jenkinseeb7007c2020-06-25 22:55:40935 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO,
Tina Wang59d0b7e2020-08-11 04:41:01936
937 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:53938
939 // 2 = Enhanced safe browsing protection
940 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
941
942 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Guillaume Jenkins57606d72020-08-13 17:32:55943 }];
944 }
945
Ewann227a3c02021-04-19 12:04:54946 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:04947 NSString* sync_policy_key =
948 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:30949 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:54950 }
Ewann227a3c02021-04-19 12:04:54951
Ewann570a6302021-08-17 07:22:42952 // SyncTypesListDisabled policy.
953 NSString* Sync_types_list_disabled_key =
954 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
955 NSMutableArray* Sync_types_list_disabled_values =
956 [[NSMutableArray alloc] init];
957 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
958 [Sync_types_list_disabled_values addObject:@"bookmarks"];
959 }
960 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
961 [Sync_types_list_disabled_values addObject:@"readingList"];
962 }
963 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
964 [Sync_types_list_disabled_values addObject:@"preferences"];
965 }
966 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
967 [Sync_types_list_disabled_values addObject:@"passwords"];
968 }
969 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
970 [Sync_types_list_disabled_values addObject:@"autofill"];
971 }
972 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
973 [Sync_types_list_disabled_values addObject:@"typedUrls"];
974 }
975 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
976 [Sync_types_list_disabled_values addObject:@"tabs"];
977 }
978 if ([Sync_types_list_disabled_values count]) {
979 [testing_policies addEntriesFromDictionary:@{
980 Sync_types_list_disabled_key : Sync_types_list_disabled_values
981 }];
Ewann570a6302021-08-17 07:22:42982 }
983
Gauthier Ambard073eaa92021-11-22 15:24:13984 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:52985 NSString* incognito_policy_key =
986 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
987 NSInteger incognito_mode_availability =
988 [defaults integerForKey:incognito_policy_key];
989 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:52990 [testing_policies addEntriesFromDictionary:@{
991 incognito_policy_key : @(incognito_mode_availability),
992 }];
993 }
994
Ewann40a8f8a2021-07-29 10:01:20995 NSString* restriction_pattern =
996 [defaults stringForKey:@"RestrictAccountsToPatterns"];
997 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:29998 NSString* restrict_key =
999 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201000 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291001 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201002 }];
1003 }
1004
Vincent Boisselle19200bc2021-09-01 17:58:251005 // If the sign-in policy is set (not "None"), add the policy key to the list
1006 // of enabled experimental policies, and set the value.
1007 NSString* const kSigninPolicyKey = @"BrowserSignin";
1008 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1009 if (signin_policy_mode) {
1010 // Remove the mode offset that was used to represent the unset policy.
1011 --signin_policy_mode;
1012 DCHECK(signin_policy_mode >= 0);
1013
Vincent Boisselle19200bc2021-09-01 17:58:251014 [testing_policies addEntriesFromDictionary:@{
1015 kSigninPolicyKey : @(signin_policy_mode),
1016 }];
1017 }
1018
Veronique Nguyen9b1044f2022-01-11 14:41:131019 // If the New Tab Page URL is set (not empty) add the value to the list of
1020 // test policies.
1021 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1022 if ([ntp_location length] > 0) {
1023 NSString* ntp_location_key =
1024 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1025 [testing_policies
1026 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571027 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131028 }
1029
Ali Juma9ec36d22022-03-28 14:53:121030 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1031 NSString* allow_backups_key =
1032 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1033 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1034 [allowed_experimental_policies addObject:allow_backups_key];
1035 }
1036
Guillaume Jenkins25e9bd72020-08-27 17:39:061037 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1038 // policy.
1039 if ([allowed_experimental_policies count] > 0) {
1040 [testing_policies setValue:allowed_experimental_policies
1041 forKey:base::SysUTF8ToNSString(
1042 policy::key::kEnableExperimentalPolicies)];
1043 }
1044
David Jean6f85d44f2021-08-19 08:08:451045 // Warning: Add new flags to TestingPoliciesHash() below.
1046
David Jean5ca263c2021-08-18 09:19:301047 return testing_policies;
1048}
David Jean6f85d44f2021-08-19 08:08:451049
1050// Generates a unique NSString based on currently monitored policies from
1051// NSUserDefaults standardUserDefaults.
1052NSString* TestingPoliciesHash() {
1053 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1054 return [NSString
Ali Juma9ec36d22022-03-28 14:53:121055 stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d",
1056 [defaults boolForKey:@"DisallowChromeDataInBackups"],
David Jean6f85d44f2021-08-19 08:08:451057 [defaults boolForKey:@"EnableSyncDisabledPolicy"],
1058 [defaults boolForKey:@"EnableSamplePolicies"],
1059 (int)[defaults
1060 integerForKey:@"IncognitoModeAvailability"],
1061 [defaults stringForKey:@"RestrictAccountsToPatterns"],
1062 [defaults boolForKey:@"SyncTypesListBookmarks"],
1063 [defaults boolForKey:@"SyncTypesListReadingList"],
1064 [defaults boolForKey:@"SyncTypesListPreferences"],
1065 [defaults boolForKey:@"SyncTypesListPasswords"],
1066 [defaults boolForKey:@"SyncTypesListAutofill"],
1067 [defaults boolForKey:@"SyncTypesListTypedUrls"],
1068 [defaults boolForKey:@"SyncTypesListTabs"]];
1069}
David Jean5ca263c2021-08-18 09:19:301070} // namespace
1071
1072// Add all switches from experimental flags to |command_line|.
1073void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1074 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1075
1076 // Set the UA flag if UseMobileSafariUA is enabled.
1077 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1078 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1079 // Chrome puts its product token.
1080 int32_t major = 0;
1081 int32_t minor = 0;
1082 int32_t bugfix = 0;
1083 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1084 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1085
1086 command_line->AppendSwitchASCII(switches::kUserAgent,
1087 web::BuildMobileUserAgent(product));
1088 }
1089
1090 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341091 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301092
1093 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1094 // Management to enabled and add the token to the list of policies.
1095 NSString* token_key =
1096 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1097 NSString* token = [defaults stringForKey:token_key];
1098
1099 if ([token length] > 0) {
1100 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1101 [testing_policies setValue:token forKey:token_key];
1102 }
1103
Vincent Boisselled042d552022-04-09 01:22:591104 if ([defaults boolForKey:@"EnableUserPolicy"]) {
1105 policy::EnableUserPolicy();
1106 }
1107
Guillaume Jenkins57606d72020-08-13 17:32:551108 // If some policies were set, commit them to the app's registration defaults.
1109 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401110 NSDictionary* registration_defaults =
1111 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1112 [defaults registerDefaults:registration_defaults];
1113 }
1114
sdefresne14900ee2015-11-27 14:43:211115 // Freeform commandline flags. These are added last, so that any flags added
1116 // earlier in this function take precedence.
1117 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1118 base::CommandLine::StringVector flags;
1119 // Append an empty "program" argument.
1120 flags.push_back("");
1121
1122 // The number of flags corresponds to the number of text fields in
1123 // Experimental.plist.
1124 const int kNumFreeformFlags = 5;
1125 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1126 NSString* key =
1127 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1128 NSString* flag = [defaults stringForKey:key];
1129 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331130 // iOS keyboard replaces -- with —, so undo that.
1131 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1132 withString:@"--"
1133 options:0
1134 range:NSMakeRange(0, 1)];
1135 // To make things easier, allow flags with no dashes by prepending them
1136 // here. This also allows for flags that just have one dash if they
1137 // exist.
1138 if (![flag hasPrefix:@"-"]) {
1139 flag = [@"--" stringByAppendingString:flag];
1140 }
sdefresne14900ee2015-11-27 14:43:211141 flags.push_back(base::SysNSStringToUTF8(flag));
1142 }
1143 }
1144
1145 base::CommandLine temp_command_line(flags);
1146 command_line->AppendArguments(temp_command_line, false);
1147 }
msardafc76f662017-02-24 12:46:281148
justincohendacc85d2017-06-28 23:34:101149 // Populate command line flag for 3rd party keyboard omnibox workaround.
1150 NSString* enableThirdPartyKeyboardWorkaround =
1151 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1152 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1153 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1154 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1155 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1156 }
1157
Sylvain Defresned3cd8d92022-01-18 13:35:081158 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211159}
1160
David Jean5ca263c2021-08-18 09:19:301161void MonitorExperimentalSettingsChanges() {
David Jean5ca263c2021-08-18 09:19:301162 // Startup values for settings to be observed.
David Jean6f85d44f2021-08-19 08:08:451163 __block NSString* hash = TestingPoliciesHash();
David Jeane83ed652021-08-25 14:52:481164 static std::atomic_bool pending_check(false);
David Jean5ca263c2021-08-18 09:19:301165
1166 auto monitor = ^(NSNotification* notification) {
David Jeane83ed652021-08-25 14:52:481167 bool has_pending_check = pending_check.exchange(true);
1168 if (has_pending_check)
1169 return;
1170
David Jeanbc0fae32021-08-25 10:31:391171 // Can be called from any thread from where the notification was sent,
1172 // but since it may change standardUserDefaults, and that has to be on main
1173 // thread, dispatch to main thread.
1174 dispatch_async(dispatch_get_main_queue(), ^{
1175 // Check if observed settings have changed. Since source and destination
1176 // are both user defaults, this is required to avoid cycling back here.
1177 NSString* newHash = TestingPoliciesHash();
1178 if (![newHash isEqualToString:hash]) {
1179 hash = newHash;
David Jean5ca263c2021-08-18 09:19:301180
David Jeanbc0fae32021-08-25 10:31:391181 // Publish update.
1182 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1183 NSMutableDictionary* testing_policies =
Vincent Boisselleed0e6f1a2021-11-09 06:47:341184 CreateExperimentalTestingPolicies();
David Jeanbc0fae32021-08-25 10:31:391185 NSDictionary* registration_defaults =
1186 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1187 [defaults registerDefaults:registration_defaults];
1188 }
David Jeane83ed652021-08-25 14:52:481189
1190 pending_check.store(false);
David Jeanbc0fae32021-08-25 10:31:391191 });
David Jean5ca263c2021-08-18 09:19:301192 };
1193
1194 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1195 [center addObserverForName:NSUserDefaultsDidChangeNotification
1196 object:nil
David Jeanbc0fae32021-08-25 10:31:391197 queue:nil
David Jean5ca263c2021-08-18 09:19:301198 usingBlock:monitor];
1199}
1200
sdefresne14900ee2015-11-27 14:43:211201void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1202 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181203 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111204 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531205 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211206}
1207
jkrcalbf073372016-07-29 07:21:311208std::vector<std::string> RegisterAllFeatureVariationParameters(
1209 flags_ui::FlagsStorage* flags_storage,
1210 base::FeatureList* feature_list) {
Justin Cohen2e2adb52019-10-25 17:00:021211 // Occasionally DCHECK crashes on canary can be very distuptive. An
1212 // experimental flag was added to aid in temporarily disabling this for
1213 // canary testers.
1214#if defined(DCHECK_IS_CONFIGURABLE)
1215 if (experimental_flags::AreDCHECKCrashesDisabled()) {
1216 std::vector<base::FeatureList::FeatureOverrideInfo> overrides;
1217 overrides.push_back(
1218 {std::cref(base::kDCheckIsFatalFeature),
1219 base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE});
1220 feature_list->RegisterExtraFeatureOverrides(std::move(overrides));
1221 }
1222#endif // defined(DCHECK_IS_CONFIGURABLE)
1223
Sylvain Defresne8327a2f2019-01-17 14:19:181224 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1225 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311226}
1227
sdefresne14900ee2015-11-27 14:43:211228void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1229 flags_ui::FlagAccess access,
Morten Stenshorne7afa5802021-07-15 10:04:431230 base::Value::ListStorage& supported_entries,
1231 base::Value::ListStorage& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181232 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211233 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511234 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211235}
1236
1237void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1238 const std::string& internal_name,
1239 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181240 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1241 enable);
sdefresne14900ee2015-11-27 14:43:211242}
1243
1244void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181245 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211246}
1247
1248namespace testing {
1249
Elly Fong-Jones323ab1092021-08-23 22:36:311250base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1251 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531252 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211253}
1254
1255} // namespace testing