blob: 2bacf2b9b40394217662e4bf5b34745c2a2c2d4d [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2012 The Chromium Authors
sdefresne14900ee2015-11-27 14:43:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Implementation of about_flags for iOS that sets flags based on experimental
6// settings.
7
Gauthier Ambard999088c2022-09-13 08:36:578#import "ios/chrome/browser/flags/about_flags.h"
sdefresne14900ee2015-11-27 14:43:219
Nazerke9c259052019-06-26 15:30:1010#import <UIKit/UIKit.h>
Gauthier Ambard999088c2022-09-13 08:36:5711#import <stddef.h>
12#import <stdint.h>
sdefresne14900ee2015-11-27 14:43:2113
Gauthier Ambard999088c2022-09-13 08:36:5714#import "base/base_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5715#import "base/check_op.h"
Peter Boström3f798572022-07-26 23:44:3616#import "base/debug/debugging_buildflags.h"
Avi Drissmancac43f22023-01-12 00:58:4117#import "base/functional/bind.h"
18#import "base/functional/callback_helpers.h"
David Jean5ca263c2021-08-18 09:19:3019#import "base/mac/foundation_util.h"
Gauthier Ambard999088c2022-09-13 08:36:5720#import "base/no_destructor.h"
21#import "base/strings/stringprintf.h"
22#import "base/strings/sys_string_conversions.h"
23#import "base/system/sys_info.h"
24#import "components/autofill/core/common/autofill_features.h"
25#import "components/autofill/core/common/autofill_payments_features.h"
26#import "components/autofill/core/common/autofill_switches.h"
27#import "components/autofill/ios/browser/autofill_switches.h"
Menghan YANGf3fe2de52023-02-27 16:38:5028#import "components/bookmarks/common/bookmark_features.h"
Gauthier Ambard999088c2022-09-13 08:36:5729#import "components/commerce/core/commerce_feature_list.h"
30#import "components/commerce/core/flag_descriptions.h"
31#import "components/content_settings/core/common/features.h"
32#import "components/dom_distiller/core/dom_distiller_switches.h"
Raj Tb95d813542022-11-16 21:27:5233#import "components/download/public/background_service/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5734#import "components/enterprise/browser/enterprise_switches.h"
35#import "components/feature_engagement/public/feature_constants.h"
36#import "components/feature_engagement/public/feature_list.h"
37#import "components/feed/feed_feature_list.h"
38#import "components/flags_ui/feature_entry.h"
39#import "components/flags_ui/feature_entry_macros.h"
40#import "components/flags_ui/flags_storage.h"
41#import "components/flags_ui/flags_ui_switches.h"
Benjamin Williams11f39912023-04-13 19:00:2542#import "components/history/core/browser/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5743#import "components/invalidation/impl/invalidation_switches.h"
Benjamin Williamsaa8da8142022-11-14 19:51:0344#import "components/ntp_tiles/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5745#import "components/ntp_tiles/switches.h"
46#import "components/omnibox/browser/omnibox_field_trial.h"
47#import "components/omnibox/common/omnibox_features.h"
48#import "components/optimization_guide/core/optimization_guide_features.h"
Raj Ta921ffc2022-08-25 19:00:2049#import "components/optimization_guide/core/optimization_guide_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5750#import "components/password_manager/core/common/password_manager_features.h"
51#import "components/payments/core/features.h"
52#import "components/policy/core/common/features.h"
Guillaume Jenkinseeb7007c2020-06-25 22:55:4053#import "components/policy/core/common/policy_loader_ios_constants.h"
Gauthier Ambard999088c2022-09-13 08:36:5754#import "components/policy/policy_constants.h"
Menghan YANG5b3a78a2023-03-24 17:38:2655#import "components/reading_list/features/reading_list_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5756#import "components/safe_browsing/core/common/features.h"
Victor Hugo Vianna Silva0399402f2021-09-07 21:41:2557#import "components/send_tab_to_self/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5758#import "components/shared_highlighting/core/common/shared_highlighting_features.h"
59#import "components/signin/core/browser/account_reconcilor.h"
60#import "components/signin/ios/browser/features.h"
61#import "components/signin/public/base/signin_switches.h"
62#import "components/strings/grit/components_strings.h"
63#import "components/sync/base/command_line_switches.h"
64#import "components/sync/base/features.h"
65#import "components/sync/base/pref_names.h"
66#import "components/translate/core/browser/translate_prefs.h"
67#import "components/translate/core/common/translate_util.h"
Duong Dac4181ab52023-06-07 12:51:5068#import "components/variations/service/google_groups_updater_service.h"
Ed Chin91e44992022-07-27 13:42:3469#import "ios/chrome/app/background_mode_buildflags.h"
ginnnnnnnya81c7192023-03-24 18:05:2070#import "ios/chrome/browser/bring_android_tabs/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5771#import "ios/chrome/browser/browsing_data/browsing_data_features.h"
72#import "ios/chrome/browser/crash_report/features.h"
Huiting Yua68998d2022-12-14 17:47:5473#import "ios/chrome/browser/credential_provider_promo/features.h"
Scott Yoder663a2262023-03-29 14:27:0474#import "ios/chrome/browser/default_browser/utils.h"
Quentin Pubert154fc6a2023-01-09 15:58:5875#import "ios/chrome/browser/find_in_page/features.h"
Gauthier Ambard92605132022-08-26 13:25:1776#import "ios/chrome/browser/flags/chrome_switches.h"
Gauthier Ambard999088c2022-09-13 08:36:5777#import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
Tina Wangd3f6f192023-04-05 05:22:4378#import "ios/chrome/browser/follow/follow_features.h"
Ed Chin100660bf2022-04-26 16:59:1379#import "ios/chrome/browser/ntp/features.h"
Vincent Boisselle88fef222022-09-23 18:54:5080#import "ios/chrome/browser/policy/cloud/user_policy_constants.h"
Vincent Boissellead6cbe22022-07-04 19:32:3981#import "ios/chrome/browser/policy/cloud/user_policy_switch.h"
Gauthier Ambard999088c2022-09-13 08:36:5782#import "ios/chrome/browser/policy/policy_util.h"
Benjamin Williams14233d72022-07-26 18:32:2083#import "ios/chrome/browser/promos_manager/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5784#import "ios/chrome/browser/screen_time/screen_time_buildflags.h"
Gauthier Ambard7aa0fb922023-03-09 15:10:4685#import "ios/chrome/browser/shared/public/features/features.h"
Gauthier Ambard818938c2023-06-16 14:48:3586#import "ios/chrome/browser/shared/public/features/system_flags.h"
Ewann Pelle903a05e62023-02-01 17:51:0687#import "ios/chrome/browser/tabs/features.h"
Aliona DANGLA3de5d242023-02-15 16:52:3088#import "ios/chrome/browser/tabs/inactive_tabs/features.h"
Zhixiang Teoh40027a22022-07-28 03:24:3489#import "ios/chrome/browser/text_selection/text_selection_util.h"
Hira Mahmoodb0e5f412022-09-01 19:41:0590#import "ios/chrome/browser/ui/app_store_rating/features.h"
Gauthier Ambard999088c2022-09-13 08:36:5791#import "ios/chrome/browser/ui/autofill/features.h"
adamta22a4d502020-05-21 03:12:2192#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
Hira Mahmood6b0e5502023-06-12 21:51:4393#import "ios/chrome/browser/ui/default_promo/post_restore/features.h"
Ewann1a9d33d2021-06-14 11:12:2494#import "ios/chrome/browser/ui/download/features.h"
adamta273568472020-12-04 23:53:5795#import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h"
adamtab69ebd52023-05-23 18:37:3196#import "ios/chrome/browser/ui/ntp/new_tab_page_field_trial_constants.h"
Christian Xub8c06cd2022-04-29 20:55:0197#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h"
Robbie Gibson686c56732021-10-04 17:11:4598#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h"
gogerald0ff29e52021-02-03 18:56:1999#import "ios/chrome/browser/ui/start_surface/start_surface_features.h"
Cheick Cisse5d2b6cb82023-06-05 17:27:58100#import "ios/chrome/browser/ui/whats_new/whats_new_util.h"
Gauthier Ambard999088c2022-09-13 08:36:57101#import "ios/chrome/browser/web/features.h"
102#import "ios/chrome/grit/ios_strings.h"
103#import "ios/components/security_interstitials/https_only_mode/feature.h"
104#import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h"
105#import "ios/web/common/features.h"
106#import "ios/web/common/user_agent.h"
107#import "ios/web/common/web_view_creation_util.h"
sdefresne14900ee2015-11-27 14:43:21108
Sylvain Defresne9c107082020-10-27 16:39:13109#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
Gauthier Ambard999088c2022-09-13 08:36:57110#import "ios/chrome/browser/screen_time/features.h"
Sylvain Defresne9c107082020-10-27 16:39:13111#endif
112
sdefresne14900ee2015-11-27 14:43:21113#if !defined(OFFICIAL_BUILD)
Gauthier Ambard999088c2022-09-13 08:36:57114#import "components/variations/variations_switches.h"
vitaliii489217aa2017-01-30 14:50:22115#endif
stkhapuginc1be1792016-12-13 14:30:53116
117#if !defined(__has_feature) || !__has_feature(objc_arc)
118#error "This file requires ARC support."
119#endif
sdefresne14900ee2015-11-27 14:43:21120
elawrence816f6790e2017-06-16 18:19:28121using flags_ui::FeatureEntry;
122
sdefresne14900ee2015-11-27 14:43:21123namespace {
Emily Starkbafa9062017-12-27 15:22:46124
Olivier Robin3d60411622018-02-23 10:03:22125const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = {
126 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
127 {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"},
128 {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"},
129 {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"},
130 {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"},
131 {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"},
132 {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"},
133 {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"},
134 {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"},
135};
136
Nohemi Fernandezc00842a2021-07-26 11:47:34137const FeatureEntry::Choice
138 kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = {
139 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
140 {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"},
141 {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"},
142 {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"},
143};
144
Cheick Cisse8835611a2023-06-02 21:42:54145// Uses int values from DefaultPromoType enum.
146const FeatureEntry::Choice kDefaultBrowserPromoForceShowPromoChoices[] = {
147 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
148 {"Show generic promo", "default-browser-promo-force-show-promo", "0"},
149 {"Show tailored stay safe promo", "default-browser-promo-force-show-promo",
150 "1"},
151 {"Show tailored made for ios promo",
152 "default-browser-promo-force-show-promo", "2"},
153 {"Show tailored all tabs promo", "default-browser-promo-force-show-promo",
154 "3"},
155 {"Show video promo", "default-browser-promo-force-show-promo", "4"},
156};
157
Stepan Khapugincc4e9842019-01-23 13:38:13158const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
159 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
160const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
161 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
162const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = {
163 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}};
164const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
165 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
166const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
167 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
168const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
169 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
170const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
171 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
172
173const FeatureEntry::FeatureVariation
174 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
175 {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
Daniel Cheng1f047a82022-02-26 10:04:53176 std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13177 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
Daniel Cheng1f047a82022-02-26 10:04:53178 std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13179 {"5 matches", kOmniboxUIMaxAutocompleteMatches5,
Daniel Cheng1f047a82022-02-26 10:04:53180 std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13181 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
Daniel Cheng1f047a82022-02-26 10:04:53182 std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13183 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
Daniel Cheng1f047a82022-02-26 10:04:53184 std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13185 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
Daniel Cheng1f047a82022-02-26 10:04:53186 std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr},
Stepan Khapugincc4e9842019-01-23 13:38:13187 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
Daniel Cheng1f047a82022-02-26 10:04:53188 std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
Stepan Khapugincc4e9842019-01-23 13:38:13189
Stepan Khapuginbac467e2022-05-06 21:11:54190const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = {
191 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}};
192const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = {
193 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}};
194const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = {
195 {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}};
196
197const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = {
198 {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6),
199 nullptr},
200 {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15),
201 nullptr},
202 {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20),
203 nullptr},
204};
205
Christian Xucf26d562022-07-06 09:28:36206const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = {
207 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}};
208const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = {
209 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}};
210const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = {
211 {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}};
212
213const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = {
214 {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5),
215 nullptr},
216 {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6),
217 nullptr},
218 {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7),
219 nullptr},
220};
221
Cheick Cisse2806f082b2023-04-25 14:20:01222const FeatureEntry::FeatureParam kDefaultBrowserVideoPromoHalfscreen[] = {
223 {"default_browser_video_promo_halfscreen", "true"}};
Cheick Cisse929dd752023-06-14 15:07:01224const FeatureEntry::FeatureParam kDefaultBrowserVideoPromoFullscreen[] = {
225 {"default_browser_video_promo_halfscreen", "false"}};
Cheick Cisse2806f082b2023-04-25 14:20:01226const FeatureEntry::FeatureVariation kDefaultBrowserVideoPromoVariations[] = {
227 {"Show half screen ui", kDefaultBrowserVideoPromoHalfscreen,
228 std::size(kDefaultBrowserVideoPromoHalfscreen), nullptr},
Cheick Cisse929dd752023-06-14 15:07:01229 {"Show full screen ui", kDefaultBrowserVideoPromoFullscreen,
230 std::size(kDefaultBrowserVideoPromoFullscreen), nullptr},
Cheick Cisse2806f082b2023-04-25 14:20:01231};
232
Caitlin Fischer37e01232019-05-24 13:05:45233const FeatureEntry::FeatureParam
Gayane Petrosyan5960a172023-06-19 15:40:17234 kDefaultBrowserTriggerCriteriaExperimentParamOptions[] = {
235 {kDefaultBrowserTriggerOnOmniboxCopyPaste, "true"}};
236const FeatureEntry::FeatureVariation
237 kDefaultBrowserTriggerCriteriaExperimentParams[] = {
238 {"Trigger on omnibox copy-paste",
239 kDefaultBrowserTriggerCriteriaExperimentParamOptions,
240 std::size(kDefaultBrowserTriggerCriteriaExperimentParamOptions),
241 nullptr},
242};
243
244const FeatureEntry::FeatureParam
Caitlin Fischer37e01232019-05-24 13:05:45245 kAutofillUseMobileLabelDisambiguationShowAll[] = {
246 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
247 autofill::features::
248 kAutofillUseMobileLabelDisambiguationParameterShowAll}};
249const FeatureEntry::FeatureParam
250 kAutofillUseMobileLabelDisambiguationShowOne[] = {
251 {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName,
252 autofill::features::
253 kAutofillUseMobileLabelDisambiguationParameterShowOne}};
254
255const FeatureEntry::FeatureVariation
256 kAutofillUseMobileLabelDisambiguationVariations[] = {
257 {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll,
Daniel Cheng1f047a82022-02-26 10:04:53258 std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr},
Caitlin Fischer37e01232019-05-24 13:05:45259 {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne,
Daniel Cheng1f047a82022-02-26 10:04:53260 std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}};
Caitlin Fischer37e01232019-05-24 13:05:45261
adamta37c6b832023-03-10 20:04:09262// Uses int values from SigninPromoViewStyle enum.
263const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoStandard[] = {
264 {kDiscoverFeedTopSyncPromoStyle, "0"}};
265const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactTitled[] = {
266 {kDiscoverFeedTopSyncPromoStyle, "1"}};
267const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactHorizontal[] =
268 {{kDiscoverFeedTopSyncPromoStyle, "2"}};
269const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompactVertical[] = {
270 {kDiscoverFeedTopSyncPromoStyle, "3"}};
adamtadb0bfc62022-08-01 17:37:47271
Mohammad Refaatab6bee62022-05-16 16:31:15272const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = {
adamta37c6b832023-03-10 20:04:09273 {"Standard", kDiscoverFeedTopSyncPromoStandard,
274 std::size(kDiscoverFeedTopSyncPromoStandard), nullptr},
275 {"Compact Titled (Unpersonalized)", kDiscoverFeedTopSyncPromoCompactTitled,
276 std::size(kDiscoverFeedTopSyncPromoCompactTitled), nullptr},
277 {"Compact Horizontal", kDiscoverFeedTopSyncPromoCompactHorizontal,
278 std::size(kDiscoverFeedTopSyncPromoCompactHorizontal), nullptr},
279 {"Compact Vertical", kDiscoverFeedTopSyncPromoCompactVertical,
280 std::size(kDiscoverFeedTopSyncPromoCompactVertical), nullptr}};
Mohammad Refaatab6bee62022-05-16 16:31:15281
adamta4a6f2fd22023-02-13 17:37:14282const FeatureEntry::FeatureParam kFeedHeaderSettingDisabledStickyHeader[] = {
283 {kDisableStickyHeaderForFollowingFeed, "true"}};
284const FeatureEntry::FeatureParam kFeedHeaderSettingReducedHeight[] = {
adamtabc048042023-03-15 22:42:18285 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14286const FeatureEntry::FeatureParam kFeedHeaderSettingAllImprovements[] = {
287 {kDisableStickyHeaderForFollowingFeed, "true"},
adamtabc048042023-03-15 22:42:18288 {kOverrideFeedHeaderHeight, "30"}};
adamta4a6f2fd22023-02-13 17:37:14289
290const FeatureEntry::FeatureVariation kFeedHeaderSettingsVariations[] = {
291 {"Disable sticky header", kFeedHeaderSettingDisabledStickyHeader,
292 std::size(kFeedHeaderSettingDisabledStickyHeader), nullptr},
293 {"Reduced header height", kFeedHeaderSettingReducedHeight,
294 std::size(kFeedHeaderSettingReducedHeight), nullptr},
295 {"All improvements", kFeedHeaderSettingAllImprovements,
296 std::size(kFeedHeaderSettingAllImprovements), nullptr}};
297
gogerald53c6e7a2021-04-15 22:07:35298const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08299 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35300 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
301const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = {
Chris Lu5470417c2021-03-03 18:43:08302 {kStartSurfaceHideShortcutsParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35303 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
304const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08305 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35306 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
307const FeatureEntry::FeatureParam
308 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = {
309 {kStartSurfaceShrinkLogoParam, "true"},
310 {kStartSurfaceReturnToRecentTabParam, "true"},
311 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
312const FeatureEntry::FeatureParam
313 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = {
314 {kStartSurfaceHideShortcutsParam, "true"},
315 {kStartSurfaceReturnToRecentTabParam, "true"},
316 {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}};
317const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = {
Chris Lu5470417c2021-03-03 18:43:08318 {kStartSurfaceShrinkLogoParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35319 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
320const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = {
321 {kStartSurfaceHideShortcutsParam, "true"},
322 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
323const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = {
Chris Lu5470417c2021-03-03 18:43:08324 {kStartSurfaceReturnToRecentTabParam, "true"},
gogerald53c6e7a2021-04-15 22:07:35325 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
326const FeatureEntry::FeatureParam
327 kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = {
328 {kStartSurfaceShrinkLogoParam, "true"},
329 {kStartSurfaceReturnToRecentTabParam, "true"},
330 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
331const FeatureEntry::FeatureParam
332 kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = {
333 {kStartSurfaceHideShortcutsParam, "true"},
334 {kStartSurfaceReturnToRecentTabParam, "true"},
335 {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}};
Chris Lu5470417c2021-03-03 18:43:08336
gogerald0e39e3aa2021-02-10 18:41:23337const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = {
gogerald53c6e7a2021-04-15 22:07:35338 {"10s:Show Return to Recent Tab tile",
339 kStartSurfaceTenSecondsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53340 std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35341 {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53342 std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35343 {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53344 std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35345 {"10s:Shrink Logo and show Return to Recent Tab tile",
346 kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53347 std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35348 {"10s:Hide Shortcuts and show Return to Recent Tab tile",
349 kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53350 std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35351 {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53352 std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35353 {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo,
Daniel Cheng1f047a82022-02-26 10:04:53354 std::size(kStartSurfaceOneHourShrinkLogo), nullptr},
gogerald53c6e7a2021-04-15 22:07:35355 {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts,
Daniel Cheng1f047a82022-02-26 10:04:53356 std::size(kStartSurfaceOneHourHideShortcuts), nullptr},
gogerald53c6e7a2021-04-15 22:07:35357 {"1h:Shrink Logo and show Return to Recent Tab tile",
358 kStartSurfaceOneHourShrinkLogoReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53359 std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr},
gogerald53c6e7a2021-04-15 22:07:35360 {"1h:Hide Shortcuts and show Return to Recent Tab tile",
361 kStartSurfaceOneHourHideShortcutsReturnToRecentTab,
Daniel Cheng1f047a82022-02-26 10:04:53362 std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr},
Chris Lu5470417c2021-03-03 18:43:08363};
gogerald0e39e3aa2021-02-10 18:41:23364
Chris Luce928eb2023-05-12 21:36:26365const FeatureEntry::FeatureParam kMagicStackMostVisitedModule[] = {
366 {kMagicStackMostVisitedModuleParam, "true"},
367 {kReducedSpaceParam, "-80"}};
368const FeatureEntry::FeatureParam kMagicStackPushedDown[] = {
369 {kMagicStackMostVisitedModuleParam, "false"},
370 {kReducedSpaceParam, "-30"}};
371const FeatureEntry::FeatureParam kMagicStackReducedNTPTopSpace[] = {
372 {kMagicStackMostVisitedModuleParam, "false"},
373 {kReducedSpaceParam, "20"}};
374
375const FeatureEntry::FeatureVariation kMagicStackVariations[]{
376 {"Most Visited Tiles in Magic Stack", kMagicStackMostVisitedModule,
377 std::size(kMagicStackMostVisitedModule), nullptr},
378 {"Magic Stack with more NTP Top Space", kMagicStackPushedDown,
379 std::size(kMagicStackPushedDown), nullptr},
380 {"Magic Stack with Reduced NTP Top Space", kMagicStackReducedNTPTopSpace,
381 std::size(kMagicStackReducedNTPTopSpace), nullptr},
382};
383
adamta09aa47e2023-05-23 18:20:43384const FeatureEntry::FeatureParam kHideAllContentSuggestionsTilesAll[] = {
385 {kHideContentSuggestionsTilesParamMostVisited, "true"},
386 {kHideContentSuggestionsTilesParamShortcuts, "true"},
387};
388const FeatureEntry::FeatureParam kHideAllContentSuggestionsTilesMVT[] = {
389 {kHideContentSuggestionsTilesParamMostVisited, "true"},
390 {kHideContentSuggestionsTilesParamShortcuts, "false"},
391};
392const FeatureEntry::FeatureParam kHideAllContentSuggestionsTilesShortcuts[] = {
393 {kHideContentSuggestionsTilesParamMostVisited, "false"},
394 {kHideContentSuggestionsTilesParamShortcuts, "true"},
395};
396
397const FeatureEntry::FeatureVariation kHideContentSuggestionTilesVariations[]{
398 {"Hide all tiles", kHideAllContentSuggestionsTilesAll,
399 std::size(kHideAllContentSuggestionsTilesAll), nullptr},
400 {"Hide Most Visited tiles", kHideAllContentSuggestionsTilesMVT,
401 std::size(kHideAllContentSuggestionsTilesMVT), nullptr},
402 {"Hide Shortcuts tiles", kHideAllContentSuggestionsTilesShortcuts,
403 std::size(kHideAllContentSuggestionsTilesShortcuts), nullptr},
404};
405
Ed Chin91e44992022-07-27 13:42:34406#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin178ec2a2023-02-10 22:21:26407// Feed Background Refresh Feature Params.
Ed Chin321b8fe2022-08-16 07:02:01408const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04409 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
410 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01411 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04412 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01413const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04414 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
415 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01416 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04417 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01418const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04419 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
420 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01421 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
Ed Chin59f617b2022-07-19 22:12:04422 {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}};
Ed Chin321b8fe2022-08-16 07:02:01423const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04424 {kEnableServerDrivenBackgroundRefreshSchedule, "false"},
425 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01426 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
Ed Chin59f617b2022-07-19 22:12:04427 {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}};
Ed Chin321b8fe2022-08-16 07:02:01428const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = {
Ed Chin59f617b2022-07-19 22:12:04429 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
430 {kEnableRecurringBackgroundRefreshSchedule, "false"},
Ed Chin321b8fe2022-08-16 07:02:01431 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
432 {kBackgroundRefreshIntervalInSeconds, "0"}};
433const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = {
Ed Chin59f617b2022-07-19 22:12:04434 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
435 {kEnableRecurringBackgroundRefreshSchedule, "true"},
Ed Chin321b8fe2022-08-16 07:02:01436 {kMaxCacheAgeInSeconds, /*60*60*/ "3600"},
437 {kBackgroundRefreshIntervalInSeconds, "0"}};
438const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = {
439 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
440 {kEnableRecurringBackgroundRefreshSchedule, "false"},
441 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
442 {kBackgroundRefreshIntervalInSeconds, "0"}};
443const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = {
444 {kEnableServerDrivenBackgroundRefreshSchedule, "true"},
445 {kEnableRecurringBackgroundRefreshSchedule, "true"},
446 {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"},
447 {kBackgroundRefreshIntervalInSeconds, "0"}};
Ed Chin59f617b2022-07-19 22:12:04448
Ed Chin178ec2a2023-02-10 22:21:26449// Feed Background Refresh Feature Variations.
Ed Chin59f617b2022-07-19 22:12:04450const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = {
Ed Chin321b8fe2022-08-16 07:02:01451 {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce,
452 std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr},
453 {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce,
454 std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr},
455 {"1hr Interval 1hr Max Age Recurring",
456 kOneHourIntervalOneHourMaxAgeRecurring,
457 std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr},
458 {"4hr Interval 6hr Max Age Recurring",
459 kFourHourIntervalSixHourMaxAgeRecurring,
460 std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr},
461 {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce,
462 std::size(kServerDrivenOneHourMaxAgeOnce), nullptr},
463 {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring,
464 std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr},
465 {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce,
466 std::size(kServerDrivenSixHourMaxAgeOnce), nullptr},
467 {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring,
468 std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr},
Ed Chin59f617b2022-07-19 22:12:04469};
Ed Chin91e44992022-07-27 13:42:34470#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin59f617b2022-07-19 22:12:04471
Ed Chin178ec2a2023-02-10 22:21:26472// Feed Foreground Refresh Feature Params.
Ed Chin5c1fd532023-03-20 17:43:29473const FeatureEntry::FeatureParam kFeedSessionCloseForegroundRefresh[] = {
474 {kEnableFeedSessionCloseForegroundRefresh, "true"},
Ed Chin44e6c7e2023-03-22 00:32:54475 {kEnableFeedAppCloseForegroundRefresh, "false"},
476 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
Ed Chin5c1fd532023-03-20 17:43:29477const FeatureEntry::FeatureParam kFeedAppCloseForegroundRefresh[] = {
478 {kEnableFeedSessionCloseForegroundRefresh, "false"},
Ed Chin44e6c7e2023-03-22 00:32:54479 {kEnableFeedAppCloseForegroundRefresh, "true"},
480 {kEnableFeedAppCloseBackgroundRefresh, "false"}};
481const FeatureEntry::FeatureParam kFeedAppCloseBackgroundRefresh[] = {
482 {kEnableFeedSessionCloseForegroundRefresh, "false"},
483 {kEnableFeedAppCloseForegroundRefresh, "false"},
484 {kEnableFeedAppCloseBackgroundRefresh, "true"}};
Ed Chin178ec2a2023-02-10 22:21:26485
Ed Chin5c1fd532023-03-20 17:43:29486// Feed Invisible Foreground Refresh Feature Variations.
487const FeatureEntry::FeatureVariation
488 kFeedInvisibleForegroundRefreshVariations[] = {
489 {"session close foreground refresh", kFeedSessionCloseForegroundRefresh,
490 std::size(kFeedSessionCloseForegroundRefresh), nullptr},
491 {"app close foreground refresh", kFeedAppCloseForegroundRefresh,
492 std::size(kFeedAppCloseForegroundRefresh), nullptr},
Ed Chin44e6c7e2023-03-22 00:32:54493 {"app close background refresh", kFeedAppCloseBackgroundRefresh,
494 std::size(kFeedAppCloseBackgroundRefresh), nullptr},
Ed Chin178ec2a2023-02-10 22:21:26495};
496
Ewann Pelle87019cdf2023-02-17 14:28:16497const FeatureEntry::FeatureParam kEnablePinnedTabsOverflow[] = {
498 {kEnablePinnedTabsOverflowParam, "true"}};
Ewann Pelle3774cac532022-11-15 10:12:37499
500const FeatureEntry::FeatureVariation kEnablePinnedTabsVariations[] = {
Ewann Pelle87019cdf2023-02-17 14:28:16501 {"+ overflow entry", kEnablePinnedTabsOverflow,
502 std::size(kEnablePinnedTabsOverflow), nullptr},
Ewann Pelle3774cac532022-11-15 10:12:37503};
504
ginnnnnnnyf907fd92023-06-14 22:21:40505const FeatureEntry::FeatureParam kAutofillBrandingIOSUntilInteracted[] = {
506 {autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
507 autofill::features::kAutofillBrandingIOSParamFrequencyTypeUntilInteracted},
508 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
509 autofill::features::
510 kAutofillBrandingIOSParamFrequencyTypeUntilInteracted}};
511const FeatureEntry::FeatureParam kAutofillBrandingIOSAlwaysShowAndSlideOut[] = {
ginnnnnnnycde6fcbb2023-05-23 16:18:07512 {autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
513 autofill::features::
514 kAutofillBrandingIOSParamFrequencyTypeAlwaysShowAndDismiss},
515 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
516 autofill::features::kAutofillBrandingIOSParamFrequencyTypeAlways}};
ginnnnnnnyf907fd92023-06-14 22:21:40517const FeatureEntry::FeatureParam kAutofillBrandingIOSSlideOutWhenInteracted[] =
518 {{autofill::features::kAutofillBrandingIOSParamFrequencyTypePhone,
519 autofill::features::
520 kAutofillBrandingIOSParamFrequencyTypeDismissWhenInteracted},
521 {autofill::features::kAutofillBrandingIOSParamFrequencyTypeTablet,
522 autofill::features::kAutofillBrandingIOSParamFrequencyTypeAlways}};
ginnnnnnny591a4972022-09-01 16:10:27523const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = {
ginnnnnnnycde6fcbb2023-05-23 16:18:07524 {"(will not show again after user interacts with keyboard accessories)",
ginnnnnnnyf907fd92023-06-14 22:21:40525 kAutofillBrandingIOSUntilInteracted,
526 std::size(kAutofillBrandingIOSUntilInteracted), nullptr},
527 {"(shows and slides out from leading edge every time)",
528 kAutofillBrandingIOSAlwaysShowAndSlideOut,
529 std::size(kAutofillBrandingIOSAlwaysShowAndSlideOut), nullptr},
530 {"(slides out from leading edge after user interacts with keyboard "
531 "accessories)",
532 kAutofillBrandingIOSSlideOutWhenInteracted,
533 std::size(kAutofillBrandingIOSSlideOutWhenInteracted), nullptr}};
ginnnnnnny591a4972022-09-01 16:10:27534
adamtab69ebd52023-05-23 18:37:31535const FeatureEntry::FeatureParam kNewTabPageFieldTrialTileAblationHideAll[] = {
536 {ntp_tiles::kNewTabPageFieldTrialParam, "1"}};
537const FeatureEntry::FeatureParam
538 kNewTabPageFieldTrialTileAblationHideMVTOnly[] = {
539 {ntp_tiles::kNewTabPageFieldTrialParam, "2"}};
540const FeatureEntry::FeatureVariation kNewTabPageFieldTrialVariations[] = {
541 {"- Tile ablation, Hide all", kNewTabPageFieldTrialTileAblationHideAll,
542 std::size(kNewTabPageFieldTrialTileAblationHideAll), nullptr},
adamta8886def42023-03-07 19:45:23543 {"- Tile ablation, Hide MVT only",
adamtab69ebd52023-05-23 18:37:31544 kNewTabPageFieldTrialTileAblationHideMVTOnly,
545 std::size(kNewTabPageFieldTrialTileAblationHideMVTOnly), nullptr}};
Benjamin Williamsaa8da8142022-11-14 19:51:03546
Raj T18a2c8c2023-03-15 17:20:15547const FeatureEntry::FeatureParam kEnableExpKitTextClassifierDate[] = {
548 {"date", "true"}};
549const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAddress[] = {
550 {"address", "true"}};
551const FeatureEntry::FeatureParam kEnableExpKitTextClassifierPhoneNumber[] = {
552 {"phonenumber", "true"}};
553const FeatureEntry::FeatureParam kEnableExpKitTextClassifierEmail[] = {
554 {"email", "true"}};
Raj Te702d4e2023-05-15 21:03:50555const FeatureEntry::FeatureParam kEnableExpKitTextClassifierOneTap[] = {
556 {"onetap", "true"}};
Raj T18a2c8c2023-03-15 17:20:15557const FeatureEntry::FeatureParam kEnableExpKitTextClassifierAll[] = {
558 {"date", "true"},
559 {"address", "true"},
560 {"phonenumber", "true"},
561 {"email", "true"}};
562const FeatureEntry::FeatureVariation kEnableExpKitTextClassifierVariations[] = {
563 {"Enabled for all entities", kEnableExpKitTextClassifierAll,
564 std::size(kEnableExpKitTextClassifierAll), nullptr},
565 {"Enabled for date", kEnableExpKitTextClassifierDate,
566 std::size(kEnableExpKitTextClassifierDate), nullptr},
567 {"Enabled for address", kEnableExpKitTextClassifierAddress,
568 std::size(kEnableExpKitTextClassifierAddress), nullptr},
569 {"Enabled for phonenumber", kEnableExpKitTextClassifierPhoneNumber,
570 std::size(kEnableExpKitTextClassifierPhoneNumber), nullptr},
571 {"Enabled for email", kEnableExpKitTextClassifierEmail,
Raj Te702d4e2023-05-15 21:03:50572 std::size(kEnableExpKitTextClassifierEmail), nullptr},
573 {"Enabled for One Tap mode", kEnableExpKitTextClassifierOneTap,
574 std::size(kEnableExpKitTextClassifierOneTap), nullptr}};
Raj T18a2c8c2023-03-15 17:20:15575
adamta3811f9182022-10-24 17:49:33576const FeatureEntry::FeatureParam kFollowingFeedSortTypeGroupedByPublisher[] = {
577 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "true"},
578 {kFollowingFeedDefaultSortTypeSortByLatest, "false"}};
579const FeatureEntry::FeatureParam kFollowingFeedSortTypeSortByLatest[] = {
580 {kFollowingFeedDefaultSortTypeGroupedByPublisher, "false"},
581 {kFollowingFeedDefaultSortTypeSortByLatest, "true"}};
582
583const FeatureEntry::FeatureVariation kFollowingFeedDefaultSortTypeVariations[] =
584 {{"Grouped by Publisher", kFollowingFeedSortTypeGroupedByPublisher,
585 std::size(kFollowingFeedSortTypeGroupedByPublisher), nullptr},
586 {"Sort by Latest", kFollowingFeedSortTypeSortByLatest,
587 std::size(kFollowingFeedSortTypeSortByLatest), nullptr}};
588
Quentin Pubert154fc6a2023-01-09 15:58:58589const FeatureEntry::FeatureParam kNativeFindInPageWithChromeFindBar[] = {
590 {kNativeFindInPageParameterName, kNativeFindInPageWithChromeFindBarParam}};
591const FeatureEntry::FeatureVariation kNativeFindInPageVariations[] = {
592 {"With Chrome Find Bar", kNativeFindInPageWithChromeFindBar,
593 std::size(kNativeFindInPageWithChromeFindBar), nullptr}};
594
Louis Romero93e9b50a2023-01-26 01:46:12595const FeatureEntry::FeatureParam kTabInactivityThresholdOneWeek[] = {
596 {kTabInactivityThresholdParameterName,
597 kTabInactivityThresholdOneWeekParam}};
598const FeatureEntry::FeatureParam kTabInactivityThresholdTwoWeeks[] = {
599 {kTabInactivityThresholdParameterName,
600 kTabInactivityThresholdTwoWeeksParam}};
601const FeatureEntry::FeatureParam kTabInactivityThresholdThreeWeeks[] = {
602 {kTabInactivityThresholdParameterName,
603 kTabInactivityThresholdThreeWeeksParam}};
Louis Romero56abd902023-03-15 16:21:58604const FeatureEntry::FeatureParam kTabInactivityThresholdOneMinuteDemo[] = {
605 {kTabInactivityThresholdParameterName,
606 kTabInactivityThresholdOneMinuteDemoParam}};
Louis Romero93e9b50a2023-01-26 01:46:12607
608const FeatureEntry::FeatureVariation kTabInactivityThresholdVariations[] = {
609 {"One week", kTabInactivityThresholdOneWeek,
610 std::size(kTabInactivityThresholdOneWeek), nullptr},
611 {"Two weeks", kTabInactivityThresholdTwoWeeks,
612 std::size(kTabInactivityThresholdTwoWeeks), nullptr},
613 {"Three weeks", kTabInactivityThresholdThreeWeeks,
614 std::size(kTabInactivityThresholdThreeWeeks), nullptr},
Louis Romero56abd902023-03-15 16:21:58615 {"One minute [Demo]", kTabInactivityThresholdOneMinuteDemo,
616 std::size(kTabInactivityThresholdOneMinuteDemo), nullptr},
Louis Romero93e9b50a2023-01-26 01:46:12617};
618
Huiting Yud7d2a5322023-02-09 21:14:22619const FeatureEntry::FeatureParam
620 kCredentialProviderExtensionPromoOnPasswordSaved[] = {
621 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
622const FeatureEntry::FeatureParam
623 kCredentialProviderExtensionPromoOnPasswordCopied[] = {
624 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"}};
625const FeatureEntry::FeatureParam
626 kCredentialProviderExtensionPromoOnLoginWithAutofill[] = {
627 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"}};
Hira Mahmood1baa9be2023-05-25 13:55:20628const FeatureEntry::FeatureParam
629 kCredentialProviderExtensionPromoOnAllTriggers[] = {
630 {kCredentialProviderExtensionPromoOnLoginWithAutofillParam, "true"},
631 {kCredentialProviderExtensionPromoOnPasswordCopiedParam, "true"},
632 {kCredentialProviderExtensionPromoOnPasswordSavedParam, "true"}};
Huiting Yud7d2a5322023-02-09 21:14:22633
634const FeatureEntry::FeatureVariation
635 kCredentialProviderExtensionPromoVariations[] = {
636 {"On password saved", kCredentialProviderExtensionPromoOnPasswordSaved,
637 std::size(kCredentialProviderExtensionPromoOnPasswordSaved), nullptr},
638 {"On password copied",
639 kCredentialProviderExtensionPromoOnPasswordCopied,
640 std::size(kCredentialProviderExtensionPromoOnPasswordCopied), nullptr},
641 {"On successful login with autofill",
642 kCredentialProviderExtensionPromoOnLoginWithAutofill,
643 std::size(kCredentialProviderExtensionPromoOnLoginWithAutofill),
644 nullptr},
Hira Mahmood1baa9be2023-05-25 13:55:20645 {"On all triggers", kCredentialProviderExtensionPromoOnAllTriggers,
646 std::size(kCredentialProviderExtensionPromoOnAllTriggers), nullptr},
Huiting Yud7d2a5322023-02-09 21:14:22647};
648
Olivier ROBINfd3887b72023-02-23 14:45:42649const FeatureEntry::FeatureParam kIOSEditMenuPartialTranslateNoIncognito[] = {
650 {kIOSEditMenuPartialTranslateNoIncognitoParam, "true"}};
651const FeatureEntry::FeatureVariation kIOSEditMenuPartialTranslateVariations[] =
652 {{"Disable on incognito", kIOSEditMenuPartialTranslateNoIncognito,
653 std::size(kIOSEditMenuPartialTranslateNoIncognito), nullptr}};
654
Olivier ROBIN2ca64952023-02-23 17:11:48655const FeatureEntry::FeatureParam kAddToHomeScreenDisableIncognito[] = {
656 {kAddToHomeScreenDisableIncognitoParam, "true"}};
657const FeatureEntry::FeatureVariation kAddToHomeScreenVariations[] = {
658 {"Disable on incognito", kAddToHomeScreenDisableIncognito,
659 std::size(kAddToHomeScreenDisableIncognito), nullptr}};
660
ginnnnnnny75903622023-03-01 18:00:00661const FeatureEntry::FeatureParam kBringYourOwnTabsIOSBottomMessage[] = {
662 {kBringYourOwnTabsIOSParam, "true"}};
663const FeatureEntry::FeatureVariation kBringYourOwnTabsIOSVariations[] = {
664 {"with bottom message on tab grid", kBringYourOwnTabsIOSBottomMessage,
665 std::size(kBringYourOwnTabsIOSBottomMessage), nullptr}};
666
Olivier ROBIN2613bcd02023-04-20 10:00:47667const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearchWith[] = {
668 {kIOSEditMenuSearchWithTitleParamTitle,
669 kIOSEditMenuSearchWithTitleSearchWithParam}};
670const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleSearch[] = {
671 {kIOSEditMenuSearchWithTitleParamTitle,
672 kIOSEditMenuSearchWithTitleSearchParam}};
673const FeatureEntry::FeatureParam kIOSEditMenuSearchWithTitleWebSearch[] = {
674 {kIOSEditMenuSearchWithTitleParamTitle,
675 kIOSEditMenuSearchWithTitleWebSearchParam}};
676const FeatureEntry::FeatureVariation kIOSEditMenuSearchWithVariations[] = {
677 {"Search with DSE", kIOSEditMenuSearchWithTitleSearchWith,
678 std::size(kIOSEditMenuSearchWithTitleSearchWith), nullptr},
679 {"Search", kIOSEditMenuSearchWithTitleSearch,
680 std::size(kIOSEditMenuSearchWithTitleSearch), nullptr},
681 {"Web Search", kIOSEditMenuSearchWithTitleWebSearch,
682 std::size(kIOSEditMenuSearchWithTitleWebSearch), nullptr},
683};
684
Hira Mahmood6b0e5502023-06-12 21:51:43685const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoHalfscreen[] = {
686 {kPostRestoreDefaultBrowserPromoHalfscreenParam, "true"}};
687const FeatureEntry::FeatureParam kPostRestoreDefaultBrowserPromoFullscreen[] = {
688 {kPostRestoreDefaultBrowserPromoFullscreenParam, "true"}};
689const FeatureEntry::FeatureVariation
690 kPostRestoreDefaultBrowserPromoVariations[] = {
691 {"with half screen ui", kPostRestoreDefaultBrowserPromoHalfscreen,
692 std::size(kPostRestoreDefaultBrowserPromoHalfscreen), nullptr},
693 {"with full screen ui", kPostRestoreDefaultBrowserPromoFullscreen,
694 std::size(kPostRestoreDefaultBrowserPromoFullscreen), nullptr},
695};
696
Marc Treib9bddebb2023-06-15 14:03:34697const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = {
698 {"Default", "", ""},
699 {"Base only", "enable-features", "ReplaceSyncPromosWithSignInPromos"},
700 {"Everything (bookmarks, reading list, etc)", "enable-features",
701 "ReplaceSyncPromosWithSignInPromos,"
Marc Treib81d732c2023-06-19 10:20:39702 "SyncEnableContactInfoDataType,"
Marc Treib9bddebb2023-06-15 14:03:34703 "SyncEnableContactInfoDataTypeInTransportMode,"
704 "EnablePasswordsAccountStorage,"
705 "EnableBookmarksAccountStorage,"
706 "ReadingListEnableDualReadingListModel,"
Marc Treib81d732c2023-06-19 10:20:39707 "ReadingListEnableSyncTransportModeUponSignIn,"
708 "SyncEnableHistoryDataType"},
Marc Treib9bddebb2023-06-15 14:03:34709};
710
Cooper Knaak1e026562017-07-26 05:22:28711// To add a new entry, add to the end of kFeatureEntries. There are four
sdefresne14900ee2015-11-27 14:43:21712// distinct types of entries:
Cooper Knaak1e026562017-07-26 05:22:28713// . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the
714// default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE
sdefresne14900ee2015-11-27 14:43:21715// macro for this type supplying the command line to the macro.
716// . MULTI_VALUE: a list of choices, the first of which should correspond to a
717// deactivated state for this lab (i.e. no command line option). To specify
718// this type of entry use the macro MULTI_VALUE_TYPE supplying it the
719// array of choices.
Cooper Knaak1e026562017-07-26 05:22:28720// . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is
721// either enabled, disabled, or uses the default value of the associated
722// base::Feature instance. To specify this type of entry use the macro
723// FEATURE_VALUE_TYPE supplying it the base::Feature instance.
724// . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a
725// base::Feature instance. Choices corresponding to the default state, a
726// universally enabled state, and a universally disabled state are
727// automatically included. To specify this type of entry use the macro
728// FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and
729// the array of choices.
730//
sdefresne14900ee2015-11-27 14:43:21731// See the documentation of FeatureEntry for details on the fields.
732//
733// When adding a new choice, add it to the end of the list.
734const flags_ui::FeatureEntry kFeatureEntries[] = {
Cooper Knaak1e026562017-07-26 05:22:28735 {"in-product-help-demo-mode-choice",
736 flag_descriptions::kInProductHelpDemoModeName,
737 flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos,
738 FEATURE_WITH_PARAMS_VALUE_TYPE(
Tommy Nyquistc1d6dea12017-07-26 20:37:23739 feature_engagement::kIPHDemoMode,
740 feature_engagement::kIPHDemoModeChoiceVariations,
Marc Treib2752e8b2017-08-04 14:12:09741 "IPH_DemoMode")},
Moe Ahmadic3fd7cd2018-05-11 21:40:22742 {"enable-autofill-credit-card-upload",
743 flag_descriptions::kAutofillCreditCardUploadName,
744 flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos,
Anne Lim579b5732018-08-30 18:24:24745 FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)},
Moe Ahmadid6d5d172018-06-20 17:20:23746 {"use-sync-sandbox", flag_descriptions::kSyncSandboxName,
747 flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos,
748 SINGLE_VALUE_TYPE_AND_VALUE(
Victor Hugo Vianna Silva3cd7ae92022-02-09 20:49:51749 syncer::kSyncServiceURL,
Moe Ahmadid6d5d172018-06-20 17:20:23750 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
751 {"wallet-service-use-sandbox",
752 flag_descriptions::kWalletServiceUseSandboxName,
753 flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos,
754 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
755 autofill::switches::kWalletServiceUseSandbox,
756 "1",
757 autofill::switches::kWalletServiceUseSandbox,
758 "0")},
Mohamad Ahmadic4df81f2017-12-20 04:41:59759 {"show-autofill-type-predictions",
760 flag_descriptions::kShowAutofillTypePredictionsName,
761 flag_descriptions::kShowAutofillTypePredictionsDescription,
762 flags_ui::kOsIos,
Florian Leimgruberf53ca392023-02-21 15:56:50763 FEATURE_VALUE_TYPE(
764 autofill::features::test::kAutofillShowTypePredictions)},
Vidhan Jainb86c94b2023-04-06 14:13:57765 {"autofill-account-profiles-storage",
766 flag_descriptions::kAutofillAccountProfilesStorageName,
767 flag_descriptions::kAutofillAccountProfilesStorageDescription,
768 flags_ui::kOsIos,
769 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfileStorage)},
Vidhan Jaincbb3d53f2023-01-23 19:13:26770 {"autofill-account-profiles-union-view",
771 flag_descriptions::kAutofillAccountProfilesUnionViewName,
772 flag_descriptions::kAutofillAccountProfilesUnionViewDescription,
773 flags_ui::kOsIos,
774 FEATURE_VALUE_TYPE(autofill::features::kAutofillAccountProfilesUnionView)},
Olivier Robin3d60411622018-02-23 10:03:22775 {"autofill-ios-delay-between-fields",
776 flag_descriptions::kAutofillIOSDelayBetweenFieldsName,
777 flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription,
778 flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)},
Benjamin Williamsdf18e7e2022-10-03 18:46:05779 {"fullscreen-promos-manager-skip-internal-limits",
780 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsName,
781 flag_descriptions::kFullscreenPromosManagerSkipInternalLimitsDescription,
782 flags_ui::kOsIos,
783 FEATURE_VALUE_TYPE(kFullscreenPromosManagerSkipInternalLimits)},
Kurt Horimotodc33af32018-05-01 01:39:14784 {"fullscreen-viewport-adjustment-experiment",
Chris Lu481a9322019-09-25 22:16:53785 flag_descriptions::kFullscreenSmoothScrollingName,
786 flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos,
Aliona DANGLA4e3b4732023-03-22 09:35:19787 FEATURE_VALUE_TYPE(web::features::kSmoothScrollingDefault)},
Robbie Gibson1f37a5e2020-08-06 17:03:06788 {"webpage-default-zoom-from-dynamic-type",
789 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName,
790 flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription,
791 flags_ui::kOsIos,
792 FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)},
Robbie Gibson88f23962020-09-28 14:35:56793 {"webpage-alternative-text-zoom",
794 flag_descriptions::kWebPageAlternativeTextZoomName,
795 flag_descriptions::kWebPageAlternativeTextZoomDescription,
796 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)},
Robbie Gibson1095b72c2022-06-06 17:03:34797 {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName,
798 flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos,
799 FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)},
Stepan Khapugincc4e9842019-01-23 13:38:13800 {"omnibox-ui-max-autocomplete-matches",
801 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
802 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription,
803 flags_ui::kOsIos,
804 FEATURE_WITH_PARAMS_VALUE_TYPE(
805 omnibox::kUIExperimentMaxAutocompleteMatches,
806 kOmniboxUIMaxAutocompleteMatchesVariations,
807 "OmniboxUIMaxAutocompleteVariations")},
Moe Ahmadi01028f22022-08-06 17:57:35808 {"omnibox-local-history-zero-suggest-beyond-ntp",
809 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName,
810 flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription,
811 flags_ui::kOsIos,
812 FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)},
Stepan Khapuginbac467e2022-05-06 21:11:54813 {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName,
814 flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos,
815 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches,
816 kOmniboxMaxZPSMatchesVariations,
817 "OmniboxMaxZPSVariations")},
Stepan Khapugind9876842023-01-27 17:59:45818
819 {"omnibox-most-visited-tiles-on-srp",
820 flag_descriptions::kOmniboxMostVisitedTilesOnSrpName,
821 flag_descriptions::kOmniboxMostVisitedTilesOnSrpDescription,
822 flags_ui::kOsIos,
823 FEATURE_VALUE_TYPE(omnibox::kOmniboxMostVisitedTilesOnSrp)},
Caitlin Fischer43edd90a2019-05-01 13:24:30824 {"autofill-use-mobile-label-disambiguation",
825 flag_descriptions::kAutofillUseMobileLabelDisambiguationName,
826 flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription,
827 flags_ui::kOsIos,
Caitlin Fischer37e01232019-05-24 13:05:45828 FEATURE_WITH_PARAMS_VALUE_TYPE(
829 autofill::features::kAutofillUseMobileLabelDisambiguation,
830 kAutofillUseMobileLabelDisambiguationVariations,
831 "AutofillUseMobileLabelDisambiguation")},
Jérôme Lebelc374fdd2019-09-27 10:36:48832 {"force-startup-signin-promo",
833 flag_descriptions::kForceStartupSigninPromoName,
834 flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos,
Alice Wang345e09442021-07-05 09:03:29835 FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)},
Yoichi Osato7ae11752021-03-16 03:27:22836 {"restore-session-from-cache",
837 flag_descriptions::kRestoreSessionFromCacheName,
838 flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos,
Justin Cohen3ec2522c2021-04-23 18:23:49839 FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)},
Roberto Mourab87b9722020-06-17 17:12:09840 {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName,
841 flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos,
842 FEATURE_VALUE_TYPE(kExpandedTabStrip)},
Tommy Martino6b4eb7e2020-06-25 18:25:41843 {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName,
844 flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos,
845 FEATURE_VALUE_TYPE(kSharedHighlightingIOS)},
Sylvain Defresne9c107082020-10-27 16:39:13846#if BUILDFLAG(IOS_SCREEN_TIME_ENABLED)
edchin81467b82020-09-03 19:31:45847 {"screen-time-integration-ios",
848 flag_descriptions::kScreenTimeIntegrationName,
849 flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
850 FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
Sylvain Defresne9c107082020-10-27 16:39:13851#endif
Nazerke3e993f72020-09-21 13:00:06852 {"modern-tab-strip", flag_descriptions::kModernTabStripName,
853 flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos,
854 FEATURE_VALUE_TYPE(kModernTabStrip)},
Eugene Butf869bff2020-12-10 01:16:55855 {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName,
856 flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos,
857 FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)},
Cheick Cisse76ade3d2020-12-16 00:15:11858 {"ios-shared-highlighting-color-change",
859 flag_descriptions::kIOSSharedHighlightingColorChangeName,
860 flag_descriptions::kIOSSharedHighlightingColorChangeDescription,
Cheick Cissed0b5bfe2021-02-11 14:23:07861 flags_ui::kOsIos,
862 FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)},
Cheick Cissefe994862021-12-15 16:01:34863 {"ios-shared-highlighting-v2",
864 flag_descriptions::kIOSSharedHighlightingV2Name,
865 flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos,
866 FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)},
Stepan Khapugin04341202021-01-07 12:22:45867 {"omnibox-new-textfield-implementation",
868 flag_descriptions::kOmniboxNewImplementationName,
869 flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos,
870 FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)},
Stepan Khapugin0be8f6d2022-09-21 20:22:26871 {"omnibox-on-focus-suggestions-contextual-web",
872 flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName,
873 flag_descriptions::
874 kOmniboxFocusTriggersContextualWebZeroSuggestDescription,
875 flags_ui::kOsIos,
876 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)},
877 {"omnibox-on-focus-suggestions-srp",
878 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName,
879 flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription,
880 flags_ui::kOsIos,
881 FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)},
Stepan Khapugin0da12382023-01-24 16:08:12882 {"omnibox-report-assisted-query-stats",
883 flag_descriptions::kOmniboxReportAssistedQueryStatsName,
884 flag_descriptions::kOmniboxReportAssistedQueryStatsDescription,
885 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportAssistedQueryStats)},
886 {"omnibox-report-searchbox-stats",
887 flag_descriptions::kOmniboxReportSearchboxStatsName,
888 flag_descriptions::kOmniboxReportSearchboxStatsDescription,
889 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kReportSearchboxStats)},
Stepan Khapuginecf128a92022-08-30 11:23:15890 {"omnibox-fuzzy-url-suggestions",
891 flag_descriptions::kOmniboxFuzzyUrlSuggestionsName,
892 flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription,
893 flags_ui::kOsIos,
894 FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)},
gogerald0ff29e52021-02-03 18:56:19895 {"start-surface", flag_descriptions::kStartSurfaceName,
896 flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos,
gogerald0e39e3aa2021-02-10 18:41:23897 FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface,
898 kStartSurfaceVariations,
899 "StartSurface")},
Vidhan Jain451b4752021-07-15 10:16:42900 {"autofill-address-verification-in-save-prompt",
901 flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName,
902 flag_descriptions::
903 kEnableAutofillAddressSavePromptAddressVerificationDescription,
904 flags_ui::kOsIos,
905 FEATURE_VALUE_TYPE(
906 autofill::features::
907 kAutofillAddressProfileSavePromptAddressVerificationSupport)},
Viktor Semeniuk68e794a2021-03-24 10:23:25908 {"filling-across-affiliated-websites",
909 flag_descriptions::kFillingAcrossAffiliatedWebsitesName,
910 flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription,
911 flags_ui::kOsIos,
912 FEATURE_VALUE_TYPE(
913 password_manager::features::kFillingAcrossAffiliatedWebsites)},
Side Yilmaz6c53f7102021-09-07 13:26:19914 {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
915 flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
916 FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
Nohemi Fernandezc00842a2021-07-26 11:47:34917 {"wait-threshold-seconds-for-capabilities-api",
918 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName,
919 flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription,
920 flags_ui::kOsIos,
921 MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)},
Jared Saul2188f762021-08-02 21:22:23922 {"autofill-fill-merchant-promo-code-fields",
923 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName,
924 flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription,
925 flags_ui::kOsIos,
926 FEATURE_VALUE_TYPE(
927 autofill::features::kAutofillFillMerchantPromoCodeFields)},
Sylvain Defresnedff67e42021-09-24 09:43:03928 {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName,
929 flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos,
930 FEATURE_VALUE_TYPE(kNewOverflowMenu)},
Robbie Gibsoned7f6ffb2023-05-15 16:03:57931 {"overflow-menu-customization",
932 flag_descriptions::kOverflowMenuCustomizationName,
933 flag_descriptions::kOverflowMenuCustomizationDescription, flags_ui::kOsIos,
934 FEATURE_VALUE_TYPE(kOverflowMenuCustomization)},
Jason Hu3830a072022-08-19 20:56:22935 {"enable-lens-in-home-screen-widget",
936 flag_descriptions::kEnableLensInHomeScreenWidgetName,
937 flag_descriptions::kEnableLensInHomeScreenWidgetDescription,
938 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)},
939 {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName,
940 flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos,
941 FEATURE_VALUE_TYPE(kEnableLensInKeyboard)},
942 {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName,
943 flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos,
944 FEATURE_VALUE_TYPE(kEnableLensInNTP)},
Anudeep Palanki403c907a2023-01-25 20:30:03945 {"enable-lens-context-menu-alt-text",
946 flag_descriptions::kEnableLensContextMenuAltTextName,
947 flag_descriptions::kEnableLensContextMenuAltTextDescription,
948 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensContextMenuAltText)},
Jason Hu67cfb0f2022-11-14 20:21:44949 {"enable-lens-in-omnibox-copied-image",
950 flag_descriptions::kEnableLensInOmniboxCopiedImageName,
951 flag_descriptions::kEnableLensInOmniboxCopiedImageDescription,
952 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInOmniboxCopiedImage)},
Benjamin Williamsbee6ab62022-02-28 18:09:40953 {"use-load-simulated-request-for-error-page-navigation",
Gauthier Ambard33cceaf2022-05-05 14:00:23954 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName,
955 flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription,
Benjamin Williamsbee6ab62022-02-28 18:09:40956 flags_ui::kOsIos,
Gauthier Ambard33cceaf2022-05-05 14:00:23957 FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)},
Sergio Collazos9fcc6ed2021-10-06 00:58:03958 {"enable-disco-feed-endpoint",
959 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName,
960 flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription,
961 flags_ui::kOsIos,
Aliona DANGLA8fae66f02021-10-06 15:47:11962 FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)},
Mohammad Refaatab6bee62022-05-16 16:31:15963 {"enable-discover-feed-top-sync-promo",
964 flag_descriptions::kEnableDiscoverFeedTopSyncPromoName,
965 flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription,
966 flags_ui::kOsIos,
967 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
968 kDiscoverFeedTopSyncPromoVariations,
969 "EnableDiscoverFeedTopSyncPromo")},
adamta4a6f2fd22023-02-13 17:37:14970 {"feed-header-settings", flag_descriptions::kEnableFeedHeaderSettingsName,
971 flag_descriptions::kEnableFeedHeaderSettingsDescription, flags_ui::kOsIos,
972 FEATURE_WITH_PARAMS_VALUE_TYPE(kFeedHeaderSettings,
973 kFeedHeaderSettingsVariations,
974 "FeedHeaderSettings")},
Tommy Martino7393d762021-10-12 17:59:28975 {"shared-highlighting-amp",
976 flag_descriptions::kIOSSharedHighlightingAmpName,
977 flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,
978 FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)},
David Maunderf4a5e1e2021-10-18 17:24:28979 {"enable-commerce-price-tracking",
Matt Jones125dfb42022-02-11 17:23:42980 commerce::flag_descriptions::kCommercePriceTrackingName,
981 commerce::flag_descriptions::kCommercePriceTrackingDescription,
982 flags_ui::kOsIos,
983 FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking,
984 commerce::kCommercePriceTrackingVariations,
adamta67b6c5812021-10-19 17:02:15985 "CommercePriceTracking")},
Tina Wang8058d5f2021-11-04 20:06:06986 {"web-feed-ios", flag_descriptions::kEnableWebChannelsName,
987 flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos,
988 FEATURE_VALUE_TYPE(kEnableWebChannels)},
adamta39331592021-11-01 20:18:54989 {"ntp-view-hierarchy-repair",
990 flag_descriptions::kNTPViewHierarchyRepairName,
991 flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:20992 FEATURE_VALUE_TYPE(kEnableNTPViewHierarchyRepair)},
Justin Cohen69cec682021-11-04 20:10:26993 {"synthesized-restore-session",
994 flag_descriptions::kSynthesizedRestoreSessionName,
995 flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos,
996 FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)},
Veronique Nguyen11f8c9f2022-09-12 16:51:26997 {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName,
998 flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos,
999 FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)},
Ali Juma1429cf8a2022-02-09 15:31:011000 {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName,
1001 flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos,
1002 FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)},
Joemer Ramosc34a30a02022-09-22 15:18:431003 {"enable-tailored-security-integration",
1004 flag_descriptions::kTailoredSecurityIntegrationName,
1005 flag_descriptions::kTailoredSecurityIntegrationDescription,
1006 flags_ui::kOsIos,
1007 FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)},
Vishwas Uppoor89303a92022-08-03 00:56:261008 {"autofill-enable-card-product-name",
1009 flag_descriptions::kAutofillEnableCardProductNameName,
1010 flag_descriptions::kAutofillEnableCardProductNameDescription,
1011 flags_ui::kOsIos,
1012 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)},
Victor Hugo Vianna Silvaf0a44002022-02-16 10:38:001013 {"send-tab-to-self-signin-promo",
1014 flag_descriptions::kSendTabToSelfSigninPromoName,
1015 flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos,
1016 FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)},
Siyu Anff02e742022-04-07 19:08:221017 {"autofill-enforce-delays-in-strike-database",
1018 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName,
1019 flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription,
1020 flags_ui::kOsIos,
1021 FEATURE_VALUE_TYPE(
1022 autofill::features::kAutofillEnforceDelaysInStrikeDatabase)},
Jared Saulb0473bd2022-04-20 00:03:411023 {"autofill-upstream-allow-additional-email-domains",
1024 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName,
1025 flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription,
1026 flags_ui::kOsIos,
1027 FEATURE_VALUE_TYPE(
1028 autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)},
1029 {"autofill-upstream-allow-all-email-domains",
1030 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName,
1031 flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription,
1032 flags_ui::kOsIos,
1033 FEATURE_VALUE_TYPE(
1034 autofill::features::kAutofillUpstreamAllowAllEmailDomains)},
Raj Tb95d813542022-11-16 21:27:521035 {"enable-download-service-foreground-session",
1036 flag_descriptions::kDownloadServiceForegroundSessionName,
1037 flag_descriptions::kDownloadServiceForegroundSessionDescription,
1038 flags_ui::kOsIos,
1039 FEATURE_VALUE_TYPE(download::kDownloadServiceForegroundSessionIOSFeature)},
Olivier Robinffe767c2022-04-21 13:13:231040 {"enable-tflite-language-detection",
1041 flag_descriptions::kTFLiteLanguageDetectionName,
1042 flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos,
1043 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)},
Raj Ta921ffc2022-08-25 19:00:201044 {"optimization-guide-debug-logs",
1045 flag_descriptions::kOptimizationGuideDebugLogsName,
1046 flag_descriptions::kOptimizationGuideDebugLogsDescription,
1047 flags_ui::kOsIos,
1048 SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)},
Raj T5aacebd2023-05-22 19:45:091049 {"optimization-guide-install-wide-model-store",
1050 flag_descriptions::kOptimizationGuideInstallWideModelStoreName,
1051 flag_descriptions::kOptimizationGuideInstallWideModelStoreDescription,
1052 flags_ui::kOsIos,
1053 FEATURE_VALUE_TYPE(optimization_guide::features::
1054 kOptimizationGuideInstallWideModelStore)},
Daniel Whited02b6962023-02-14 14:19:551055 {"optimization-guide-push-notifications",
1056 flag_descriptions::kOptimizationGuidePushNotificationClientName,
1057 flag_descriptions::kOptimizationGuidePushNotificationClientDescription,
1058 flags_ui::kOsIos,
1059 FEATURE_VALUE_TYPE(optimization_guide::features::kPushNotifications)},
Benjamin Williams11f39912023-04-13 19:00:251060 {"sync-segments-data", flag_descriptions::kSyncSegmentsDataName,
1061 flag_descriptions::kSyncSegmentsDataDescription, flags_ui::kOsIos,
1062 FEATURE_VALUE_TYPE(history::kSyncSegmentsData)},
Christian Xub8c06cd2022-04-29 20:55:011063 {"suggestions-scrolling-ipad",
1064 flag_descriptions::kEnableSuggestionsScrollingOnIPadName,
1065 flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription,
1066 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)},
Stepan Khapuginfee136c62022-11-28 13:24:001067 {"popout-omnibox-ipad", flag_descriptions::kEnablePopoutOmniboxIpadName,
1068 flag_descriptions::kEnablePopoutOmniboxIpadDescription, flags_ui::kOsIos,
1069 FEATURE_VALUE_TYPE(kEnablePopoutOmniboxIpad)},
Elmehdi Rahmaoui5a6273a22022-11-28 16:19:251070 {"intents-on-phone-number", flag_descriptions::kPhoneNumberName,
1071 flag_descriptions::kPhoneNumberDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331072 FEATURE_VALUE_TYPE(web::features::kEnablePhoneNumbers)},
Elmehdi Rahmaoui21e87d52022-11-09 15:00:551073 {"experience-kit-apple-calendar",
1074 flag_descriptions::kAppleCalendarExperienceKitName,
1075 flag_descriptions::kAppleCalendarExperienceKitDescription,
1076 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitAppleCalendar)},
Raj T7db7a0e2022-11-17 16:33:081077 {"enable-expkit-text-classifier",
1078 flag_descriptions::kEnableExpKitTextClassifierName,
1079 flag_descriptions::kEnableExpKitTextClassifierDescription,
Raj T18a2c8c2023-03-15 17:20:151080 flags_ui::kOsIos,
1081 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableExpKitTextClassifier,
1082 kEnableExpKitTextClassifierVariations,
1083 "ExpKitTextClassifier")},
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331084 {"one-tap-experience-maps", flag_descriptions::kOneTapForMapsName,
1085 flag_descriptions::kOneTapForMapsDescription, flags_ui::kOsIos,
1086 FEATURE_VALUE_TYPE(web::features::kOneTapForMaps)},
Mustafa Emre Acer4de8863a2022-05-03 22:17:011087 {"https-only-mode", flag_descriptions::kHttpsOnlyModeName,
1088 flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos,
1089 FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)},
Mustafa Emre Acerb8bb01f2022-07-20 19:43:251090 {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName,
1091 flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos,
1092 FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)},
Benjamin Williamsf721fc22023-01-10 23:28:251093 {"smart-sorting-price-tracking-destination",
1094 flag_descriptions::kSmartSortingPriceTrackingDestinationName,
1095 flag_descriptions::kSmartSortingPriceTrackingDestinationDescription,
1096 flags_ui::kOsIos,
1097 FEATURE_VALUE_TYPE(kSmartSortingPriceTrackingDestination)},
Scott Yoder10493562022-06-28 17:37:441098 {"new-overflow-menu-share-chrome-action",
1099 flag_descriptions::kNewOverflowMenuShareChromeActionName,
1100 flag_descriptions::kNewOverflowMenuShareChromeActionDescription,
1101 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)},
Alexander Tekleb4643812023-01-06 23:12:301102 {"autofill-enable-ranking-formula-address-profiles",
1103 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesName,
1104 flag_descriptions::kAutofillEnableRankingFormulaAddressProfilesDescription,
1105 flags_ui::kOsIos,
1106 FEATURE_VALUE_TYPE(
1107 autofill::features::kAutofillEnableRankingFormulaAddressProfiles)},
Alexander Tekle35dfbbd2023-01-31 08:32:391108 {"autofill-enable-ranking-formula-credit-cards",
1109 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsName,
1110 flag_descriptions::kAutofillEnableRankingFormulaCreditCardsDescription,
1111 flags_ui::kOsIos,
1112 FEATURE_VALUE_TYPE(
1113 autofill::features::kAutofillEnableRankingFormulaCreditCards)},
Sergio Collazos58558712022-05-18 17:24:021114 {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName,
1115 flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos,
1116 FEATURE_VALUE_TYPE(kEnableFeedAblation)},
Tina Wang30df7172022-12-09 22:02:021117 {"enable-feed-bottom-sign-in-promo",
1118 flag_descriptions::kEnableFeedBottomSignInPromoName,
1119 flag_descriptions::kEnableFeedBottomSignInPromoDescription,
1120 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedBottomSignInPromo)},
1121 {"enable-feed-card-menu-sign-in-promo",
1122 flag_descriptions::kEnableFeedCardMenuSignInPromoName,
1123 flag_descriptions::kEnableFeedCardMenuSignInPromoDescription,
1124 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedCardMenuSignInPromo)},
Chris Luc36e3962023-04-11 21:50:521125 {"content-suggestions-magic-stack", flag_descriptions::kMagicStackName,
1126 flag_descriptions::kMagicStackDescription, flags_ui::kOsIos,
Chris Luce928eb2023-05-12 21:36:261127 FEATURE_WITH_PARAMS_VALUE_TYPE(kMagicStack,
1128 kMagicStackVariations,
1129 flag_descriptions::kMagicStackName)},
Olivier Robin058c1fad2022-05-31 18:24:061130 {"default-browser-intents-show-settings",
1131 flag_descriptions::kDefaultBrowserIntentsShowSettingsName,
1132 flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription,
1133 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)},
Tommy Martinoad42be52022-06-13 11:51:191134 {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName,
1135 flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos,
1136 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)},
Scott Yoder16bff3c2023-03-24 16:00:551137 {"ios-set-up-list", flag_descriptions::kIOSSetUpListName,
1138 flag_descriptions::kIOSSetUpListDescription, flags_ui::kOsIos,
1139 FEATURE_VALUE_TYPE(kIOSSetUpList)},
Veronique Nguyenc3d7db52023-03-08 22:52:321140 {"ios-password-bottom-sheet",
1141 flag_descriptions::kIOSPasswordBottomSheetName,
1142 flag_descriptions::kIOSPasswordBottomSheetDescription, flags_ui::kOsIos,
1143 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordBottomSheet)},
Alexis Hétu459451a2023-06-01 17:05:311144 {"ios-payments-bottom-sheet",
1145 flag_descriptions::kIOSPaymentsBottomSheetName,
1146 flag_descriptions::kIOSPaymentsBottomSheetDescription, flags_ui::kOsIos,
1147 FEATURE_VALUE_TYPE(kIOSPaymentsBottomSheet)},
adamtab69ebd52023-05-23 18:37:311148 {"ios-new-tab-page-retention", flag_descriptions::kNewTabPageFieldTrialName,
1149 flag_descriptions::kNewTabPageFieldTrialDescription, flags_ui::kOsIos,
1150 FEATURE_WITH_PARAMS_VALUE_TYPE(ntp_tiles::kNewTabPageFieldTrial,
1151 kNewTabPageFieldTrialVariations,
1152 ntp_tiles::kNewTabPageFieldTrialName)},
Nakul Vaidyaddfdfbc2022-06-28 23:43:321153 {"autofill-parse-iban-fields",
Nakul Vaidya876210f2022-08-08 17:47:191154 flag_descriptions::kAutofillParseIBANFieldsName,
1155 flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos,
1156 FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)},
Moe Ahmadi098519d82022-07-27 18:34:241157 {"omnibox-zero-suggest-prefetching",
1158 flag_descriptions::kOmniboxZeroSuggestPrefetchingName,
1159 flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription,
1160 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)},
Khalid Peer79df5652022-10-26 21:59:451161 {"omnibox-zero-suggest-prefetching-on-srp",
1162 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPName,
1163 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnSRPDescription,
1164 flags_ui::kOsIos,
1165 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnSRP)},
1166 {"omnibox-zero-suggest-prefetching-on-web",
1167 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebName,
1168 flag_descriptions::kOmniboxZeroSuggestPrefetchingOnWebDescription,
1169 flags_ui::kOsIos,
1170 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)},
Khalid Peer11b4b2c2022-10-12 20:53:471171 {"omnibox-zero-suggest-in-memory-caching",
1172 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingName,
1173 flag_descriptions::kOmniboxZeroSuggestInMemoryCachingDescription,
1174 flags_ui::kOsIos,
1175 FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
Ce Chenbdfaed22022-10-20 16:08:351176 {"omnibox-on-device-tail-suggestions",
1177 flag_descriptions::kOmniboxOnDeviceTailSuggestionsName,
1178 flag_descriptions::kOmniboxOnDeviceTailSuggestionsDescription,
1179 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kOnDeviceTailModel)},
Joemer Ramosbde5d5d2023-03-31 13:18:371180 {"enable-browser-lockdown-mode",
Joemer Ramos944cbc792023-05-11 16:58:411181 flag_descriptions::kBrowserLockdownModeAvailableName,
1182 flag_descriptions::kBrowserLockdownModeAvailableDescription,
1183 flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kBrowserLockdownModeAvailable)},
Joemer Ramosada1e852023-03-10 19:14:411184 {"enable-button-configuration-usage",
1185 flag_descriptions::kEnableUIButtonConfigurationName,
1186 flag_descriptions::kEnableUIButtonConfigurationDescription,
1187 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableUIButtonConfiguration)},
Vincent Boissellead6cbe22022-07-04 19:32:391188 {"enable-user-policy", flag_descriptions::kEnableUserPolicyName,
1189 flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos,
Vincent Boisselle88fef222022-09-23 18:54:501190 FEATURE_VALUE_TYPE(policy::kUserPolicy)},
Marc Treibb9d8ed802022-07-05 15:15:491191 {"enable-sync-history-datatype",
1192 flag_descriptions::kSyncEnableHistoryDataTypeName,
1193 flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos,
1194 FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)},
Christian Xucf26d562022-07-06 09:28:361195 {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName,
1196 flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos,
1197 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches,
1198 kOmniboxMaxURLMatchesVariations,
1199 "OmniboxMaxURLMatches")},
Olivier Robin60d3a062022-07-06 17:34:061200 {"metrickit-non-crash-reports",
1201 flag_descriptions::kMetrickitNonCrashReportName,
1202 flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos,
1203 FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)},
Siyu An3194bda2022-07-13 19:30:371204 {"autofill-enable-remade-downstream-metrics",
1205 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName,
1206 flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription,
1207 flags_ui::kOsIos,
1208 FEATURE_VALUE_TYPE(
1209 autofill::features::kAutofillEnableRemadeDownstreamMetrics)},
Nakul Vaidya13ca2042022-07-27 01:59:551210 {"autofill-parse-vcn-card-on-file-standalone-cvc-fields",
1211 flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName,
1212 flag_descriptions::
1213 kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription,
1214 flags_ui::kOsIos,
1215 FEATURE_VALUE_TYPE(
1216 autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)},
Cheick Cisse1a168ef2023-03-24 10:39:531217 {"default-browser-refactoring-promo-manager",
1218 flag_descriptions::kDefaultBrowserRefactoringPromoManagerName,
1219 flag_descriptions::kDefaultBrowserRefactoringPromoManagerDescription,
1220 flags_ui::kOsIos,
1221 FEATURE_VALUE_TYPE(kDefaultBrowserRefactoringPromoManager)},
Cheick Cisse2806f082b2023-04-25 14:20:011222 {"default-browser-video-promo",
1223 flag_descriptions::kDefaultBrowserVideoPromoName,
1224 flag_descriptions::kDefaultBrowserVideoPromoDescription, flags_ui::kOsIos,
1225 FEATURE_WITH_PARAMS_VALUE_TYPE(kDefaultBrowserVideoPromo,
1226 kDefaultBrowserVideoPromoVariations,
1227 "DefaultBrowserVideoPromoVariations")},
Cheick Cisse8835611a2023-06-02 21:42:541228 {"default-browser-promo-force-show-promo",
1229 flag_descriptions::kDefaultBrowserPromoForceShowPromoName,
1230 flag_descriptions::kDefaultBrowserPromoForceShowPromoDescription,
1231 flags_ui::kOsIos,
1232 MULTI_VALUE_TYPE(kDefaultBrowserPromoForceShowPromoChoices)},
Gayane Petrosyan5960a172023-06-19 15:40:171233 {"default-browser-promo-trigger-criteria-experiment",
1234 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentName,
1235 flag_descriptions::kDefaultBrowserTriggerCriteriaExperimentDescription,
1236 flags_ui::kOsIos,
1237 FEATURE_WITH_PARAMS_VALUE_TYPE(
1238 kDefaultBrowserTriggerCriteriaExperiment,
1239 kDefaultBrowserTriggerCriteriaExperimentParams,
1240 "DefaultBrowserTriggerCriteriaExperimentParams")},
Ed Chin91e44992022-07-27 13:42:341241#if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
1242 {"feed-background-refresh-ios",
1243 flag_descriptions::kFeedBackgroundRefreshName,
1244 flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos,
1245 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh,
1246 kFeedBackgroundRefreshVariations,
1247 "FeedBackgroundRefresh")},
Ed Chin178ec2a2023-02-10 22:21:261248#endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED)
Ed Chin5c1fd532023-03-20 17:43:291249 {"feed-invisible-foreground-refresh-ios",
1250 flag_descriptions::kFeedInvisibleForegroundRefreshName,
1251 flag_descriptions::kFeedInvisibleForegroundRefreshDescription,
1252 flags_ui::kOsIos,
1253 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedInvisibleForegroundRefresh,
1254 kFeedInvisibleForegroundRefreshVariations,
1255 "FeedInvisibleForegroundRefresh")},
Christian Xu164a2e512022-08-01 20:38:191256 {"omnibox-keyboard-paste-button",
1257 flag_descriptions::kOmniboxKeyboardPasteButtonName,
1258 flag_descriptions::kOmniboxKeyboardPasteButtonDescription,
1259 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)},
Cheick Cisse5d2b6cb82023-06-05 17:27:581260 {"whats-new-ios-m116", flag_descriptions::kWhatsNewIOSM116Name,
1261 flag_descriptions::kWhatsNewIOSM116Description, flags_ui::kOsIos,
1262 FEATURE_VALUE_TYPE(kWhatsNewIOSM116)},
ginnnnnnny591a4972022-09-01 16:10:271263 {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName,
1264 flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos,
1265 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS,
1266 kAutofillBrandingIOSVariations,
Hira Mahmoodb0e5f412022-09-01 19:41:051267 "AutofillBrandingIOS")},
1268 {"app-store-rating", flag_descriptions::kAppStoreRatingName,
1269 flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos,
1270 FEATURE_VALUE_TYPE(kAppStoreRating)},
Christian Xu6b90c2a32022-09-13 18:17:021271 {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName,
1272 flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos,
1273 FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)},
Olivier ROBINf05518782022-09-14 23:55:501274 {"enable-tflite-language-detection-ignore",
1275 flag_descriptions::kTFLiteLanguageDetectionIgnoreName,
1276 flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription,
1277 flags_ui::kOsIos,
1278 FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)},
Tina Wang89ae4252022-10-14 00:39:471279 {"enable-check-visibility-on-attention-log-start",
1280 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartName,
1281 flag_descriptions::kEnableCheckVisibilityOnAttentionLogStartDescription,
1282 flags_ui::kOsIos,
1283 FEATURE_VALUE_TYPE(kEnableCheckVisibilityOnAttentionLogStart)},
1284 {"enable-refine-data-source-reload-reporting",
1285 flag_descriptions::kEnableRefineDataSourceReloadReportingName,
1286 flag_descriptions::kEnableRefineDataSourceReloadReportingDescription,
1287 flags_ui::kOsIos,
1288 FEATURE_VALUE_TYPE(kEnableRefineDataSourceReloadReporting)},
Victor Hugo Vianna Silvabb878dea2022-10-18 10:19:041289 {"enable-passwords-account-storage",
1290 flag_descriptions::kEnablePasswordsAccountStorageName,
1291 flag_descriptions::kEnablePasswordsAccountStorageDescription,
1292 flags_ui::kOsIos,
1293 FEATURE_VALUE_TYPE(
1294 password_manager::features::kEnablePasswordsAccountStorage)},
adamta3811f9182022-10-24 17:49:331295 {"enable-default-following-feed-sort-type",
1296 flag_descriptions::kFollowingFeedDefaultSortTypeName,
1297 flag_descriptions::kFollowingFeedDefaultSortTypeDescription,
1298 flags_ui::kOsIos,
adamta8da8dce2022-11-17 18:03:201299 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFollowingFeedDefaultSortType,
adamta3811f9182022-10-24 17:49:331300 kFollowingFeedDefaultSortTypeVariations,
adamta8da8dce2022-11-17 18:03:201301 "EnableFollowingFeedDefaultSortType")},
Louis Romero1e2a88e92023-01-18 17:08:201302 {"tab-grid-recency-sort", flag_descriptions::kTabGridRecencySortName,
Gauthier Ambard9898eb882022-11-07 18:12:011303 flag_descriptions::kTabGridRecencySortDescription, flags_ui::kOsIos,
1304 FEATURE_VALUE_TYPE(kTabGridRecencySort)},
Petro Akzhygitov2e2322e2023-04-25 16:26:571305 {"tab-grid-new-transitions", flag_descriptions::kTabGridNewTransitionsName,
1306 flag_descriptions::kTabGridNewTransitionsDescription, flags_ui::kOsIos,
1307 FEATURE_VALUE_TYPE(kTabGridNewTransitions)},
Ewann Pelle3774cac532022-11-15 10:12:371308 {"enable-pinned-tabs", flag_descriptions::kEnablePinnedTabsName,
1309 flag_descriptions::kEnablePinnedTabsDescription, flags_ui::kOsIos,
1310 FEATURE_WITH_PARAMS_VALUE_TYPE(kEnablePinnedTabs,
1311 kEnablePinnedTabsVariations,
1312 "EnablePinnedTabs")},
Hira Mahmoodea109752022-11-17 17:45:411313 {"credential-provider-extension-promo",
1314 flag_descriptions::kCredentialProviderExtensionPromoName,
1315 flag_descriptions::kCredentialProviderExtensionPromoDescription,
Huiting Yud7d2a5322023-02-09 21:14:221316 flags_ui::kOsIos,
1317 FEATURE_WITH_PARAMS_VALUE_TYPE(kCredentialProviderExtensionPromo,
1318 kCredentialProviderExtensionPromoVariations,
1319 "CredentialProviderExtensionPromo")},
Nicolas MacBethfb43e152022-11-28 19:31:521320 {"default-browser-blue-dot-promo",
1321 flag_descriptions::kDefaultBrowserBlueDotPromoName,
1322 flag_descriptions::kDefaultBrowserBlueDotPromoDescription,
1323 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserBlueDotPromo)},
Olivier ROBINa8838c12022-12-05 17:50:271324 {"ios-force-translate-enabled",
1325 flag_descriptions::kIOSForceTranslateEnabledName,
1326 flag_descriptions::kIOSForceTranslateEnabledDescription, flags_ui::kOsIos,
1327 FEATURE_VALUE_TYPE(translate::kIOSForceTranslateEnabled)},
Daniel Whiteae1cb672022-12-14 18:25:251328 {"iph-price-notifications-while-browsing",
1329 flag_descriptions::kIPHPriceNotificationsWhileBrowsingName,
1330 flag_descriptions::kIPHPriceNotificationsWhileBrowsingDescription,
1331 flags_ui::kOsIos,
1332 FEATURE_VALUE_TYPE(
1333 feature_engagement::kIPHPriceNotificationsWhileBrowsingFeature)},
Qihui Zhao72836c62022-12-16 04:31:411334 {"autofill-offer-to-save-card-with-same-last-four",
1335 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourName,
1336 flag_descriptions::kAutofillOfferToSaveCardWithSameLastFourDescription,
1337 flags_ui::kOsIos,
1338 FEATURE_VALUE_TYPE(
1339 autofill::features::kAutofillOfferToSaveCardWithSameLastFour)},
Christian Xu588330f32023-01-05 10:51:041340 {"omnibox-multiline-search-suggest",
1341 flag_descriptions::kOmniboxMultilineSearchSuggestName,
1342 flag_descriptions::kOmniboxMultilineSearchSuggestDescription,
1343 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxMultilineSearchSuggest)},
Vipul Vinod Koulaebbcb3a2023-01-05 19:50:501344 {"autofill-suggest-server-card-instead-of-local-card",
1345 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardName,
1346 flag_descriptions::kAutofillSuggestServerCardInsteadOfLocalCardDescription,
1347 flags_ui::kOsIos,
1348 FEATURE_VALUE_TYPE(
1349 autofill::features::kAutofillSuggestServerCardInsteadOfLocalCard)},
Quentin Pubert154fc6a2023-01-09 15:58:581350 {"native-find-in-page", flag_descriptions::kNativeFindInPageName,
1351 flag_descriptions::kNativeFindInPageDescription, flags_ui::kOsIos,
1352 FEATURE_WITH_PARAMS_VALUE_TYPE(kNativeFindInPage,
1353 kNativeFindInPageVariations,
1354 "NativeFindInPage")},
Elmehdi Rahmaoui5d8ba8e2023-01-11 14:53:551355 {"intents-on-email", flag_descriptions::kEmailName,
1356 flag_descriptions::kEmailDescription, flags_ui::kOsIos,
Elmehdi Rahmaoui458f4a22023-02-14 15:13:331357 FEATURE_VALUE_TYPE(web::features::kEnableEmails)},
Ernesto Izquierdo Clua023bb52352023-01-12 19:33:341358 {"ios-password-checkup", flag_descriptions::kIOSPasswordCheckupName,
1359 flag_descriptions::kIOSPasswordCheckupDescription, flags_ui::kOsIos,
1360 FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordCheckup)},
Christian Xu7e5234c12023-01-16 09:26:351361 {"multiline-fade-truncating-label",
1362 flag_descriptions::kMultilineFadeTruncatingLabelName,
1363 flag_descriptions::kMultilineFadeTruncatingLabelDescription,
1364 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kMultilineFadeTruncatingLabel)},
Robbie Gibson88f680a2023-01-19 16:47:301365 {"promos-manager-uses-fet", flag_descriptions::kPromosManagerUsesFETName,
1366 flag_descriptions::kPromosManagerUsesFETDescription, flags_ui::kOsIos,
1367 FEATURE_VALUE_TYPE(kPromosManagerUsesFET)},
Ewann Pelledec2d042023-01-25 15:28:391368 {"shopping-list", commerce::flag_descriptions::kShoppingListName,
1369 commerce::flag_descriptions::kShoppingListDescription, flags_ui::kOsIos,
1370 FEATURE_VALUE_TYPE(commerce::kShoppingList)},
Matt Jones5c8c8e32023-06-13 22:49:471371 {"shopping-list-track-by-default",
1372 commerce::flag_descriptions::kShoppingListTrackByDefaultName,
1373 commerce::flag_descriptions::kShoppingListTrackByDefaultDescription,
1374 flags_ui::kOsIos,
1375 FEATURE_VALUE_TYPE(commerce::kShoppingListTrackByDefault)},
Matt Jones1795eda2023-05-09 20:24:481376 {"local-pdp-detection",
1377 commerce::flag_descriptions::kCommerceLocalPDPDetectionName,
1378 commerce::flag_descriptions::kCommerceLocalPDPDetectionDescription,
1379 flags_ui::kOsIos,
1380 FEATURE_VALUE_TYPE(commerce::kCommerceLocalPDPDetection)},
Louis Romero93e9b50a2023-01-26 01:46:121381 {"tab-inactivity-threshold", flag_descriptions::kTabInactivityThresholdName,
1382 flag_descriptions::kTabInactivityThresholdDescription, flags_ui::kOsIos,
1383 FEATURE_WITH_PARAMS_VALUE_TYPE(kTabInactivityThreshold,
1384 kTabInactivityThresholdVariations,
1385 "TabInactivityThreshold")},
Sergio Collazos8d2ac27942023-01-26 19:03:411386 {"enable-feed-synthetic-capabilities",
1387 flag_descriptions::kEnableFeedSyntheticCapabilitiesName,
1388 flag_descriptions::kEnableFeedSyntheticCapabilitiesDescription,
1389 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableFeedSyntheticCapabilities)},
Louis Romero58f355022023-02-13 19:04:311390 {"show-inactive-tabs-count", flag_descriptions::kShowInactiveTabsCountName,
1391 flag_descriptions::kShowInactiveTabsCountDescription, flags_ui::kOsIos,
1392 FEATURE_VALUE_TYPE(kShowInactiveTabsCount)},
Olivier ROBIN52eddbf32023-02-15 10:33:421393 {"ios-edit-menu-partial-translate",
1394 flag_descriptions::kIOSEditMenuPartialTranslateName,
1395 flag_descriptions::kIOSEditMenuPartialTranslateDescription,
Olivier ROBINfd3887b72023-02-23 14:45:421396 flags_ui::kOsIos,
1397 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuPartialTranslate,
1398 kIOSEditMenuPartialTranslateVariations,
1399 "IOSEditMenuPartialTranslate")},
Olivier Robin7057bd72023-02-16 18:35:201400 {"ios-custom-browser-edit-menu",
1401 flag_descriptions::kIOSCustomBrowserEditMenuName,
1402 flag_descriptions::kIOSCustomBrowserEditMenuDescription, flags_ui::kOsIos,
1403 FEATURE_VALUE_TYPE(kIOSCustomBrowserEditMenu)},
Ali Juma57849c42023-02-21 22:53:431404 {"notification-settings-menu-item",
1405 flag_descriptions::kNotificationSettingsMenuItemName,
1406 flag_descriptions::kNotificationSettingsMenuItemDescription,
1407 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNotificationSettingsMenuItem)},
rgodba72acf82023-02-20 10:29:351408 {"password-notes", flag_descriptions::kPasswordNotesWithBackupName,
1409 flag_descriptions::kPasswordNotesWithBackupDescription, flags_ui::kOsIos,
1410 FEATURE_VALUE_TYPE(syncer::kPasswordNotesWithBackup)},
Ed Chin97560fc42023-02-20 16:48:321411 {"feed-experiment-tagging-ios",
1412 flag_descriptions::kFeedExperimentTaggingName,
1413 flag_descriptions::kFeedExperimentTaggingDescription, flags_ui::kOsIos,
1414 FEATURE_VALUE_TYPE(kEnableFeedExperimentTagging)},
Stepan Khapugin551917f82023-02-21 18:00:061415 {"spotlight-reading-list-source",
1416 flag_descriptions::kSpotlightReadingListSourceName,
1417 flag_descriptions::kSpotlightReadingListSourceDescription,
1418 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSpotlightReadingListSource)},
kalettuced6ba72cb2023-02-22 00:55:381419 {"consistency-new-account-interface",
1420 flag_descriptions::kConsistencyNewAccountInterfaceName,
1421 flag_descriptions::kConsistencyNewAccountInterfaceDescription,
1422 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kConsistencyNewAccountInterface)},
Olivier ROBINabcb8ce2023-02-22 13:55:201423 {"add-to-home-screen", flag_descriptions::kAddToHomeScreenName,
1424 flag_descriptions::kAddToHomeScreenDescription, flags_ui::kOsIos,
Olivier ROBIN2ca64952023-02-23 17:11:481425 FEATURE_WITH_PARAMS_VALUE_TYPE(kAddToHomeScreen,
1426 kAddToHomeScreenVariations,
1427 "IOSEditMenuPartialTranslate")},
Salma Elmahallawy72c5d34d2023-02-27 23:44:421428 {"policy-logs-page-ios", flag_descriptions::kPolicyLogsPageIOSName,
1429 flag_descriptions::kPolicyLogsPageIOSDescription, flags_ui::kOsIos,
1430 FEATURE_VALUE_TYPE(policy::features::kPolicyLogsPageIOS)},
Vincent Boisselle6e9780c2023-02-25 01:05:341431 {"indicate-account-storage-error-in-account-cell",
1432 flag_descriptions::kIndicateAccountStorageErrorInAccountCellName,
1433 flag_descriptions::kIndicateAccountStorageErrorInAccountCellDescription,
1434 flags_ui::kOsIos,
Mikel Astize597fc82023-03-22 01:39:491435 FEATURE_VALUE_TYPE(syncer::kIndicateAccountStorageErrorInAccountCell)},
Menghan YANGf3fe2de52023-02-27 16:38:501436 {"enable-bookmarks-account-storage",
1437 flag_descriptions::kEnableBookmarksAccountStorageName,
1438 flag_descriptions::kEnableBookmarksAccountStorageDescription,
1439 flags_ui::kOsIos,
1440 FEATURE_VALUE_TYPE(bookmarks::kEnableBookmarksAccountStorage)},
kalettucefb09e402023-02-27 18:35:531441 {"web-feed-feedback-reroute",
1442 flag_descriptions::kWebFeedFeedbackRerouteName,
1443 flag_descriptions::kWebFeedFeedbackRerouteDescription, flags_ui::kOsIos,
1444 FEATURE_VALUE_TYPE(kWebFeedFeedbackReroute)},
Jason Huac58fea2023-02-28 20:25:551445 {"new-ntp-omnibox-layout", flag_descriptions::kNewNTPOmniboxLayoutName,
1446 flag_descriptions::kNewNTPOmniboxLayoutDescription, flags_ui::kOsIos,
1447 FEATURE_VALUE_TYPE(kNewNTPOmniboxLayout)},
ginnnnnnny75903622023-03-01 18:00:001448 {"bring-your-own-tabs-ios", flag_descriptions::kBringYourOwnTabsIOSName,
1449 flag_descriptions::kBringYourOwnTabsIOSDescription, flags_ui::kOsIos,
1450 FEATURE_WITH_PARAMS_VALUE_TYPE(kBringYourOwnTabsIOS,
1451 kBringYourOwnTabsIOSVariations,
1452 "BringYourOwnTabsIOS")},
Tina Wangd3f6f192023-04-05 05:22:431453 {"enable-follow-IPH-exp-params",
1454 flag_descriptions::kEnableFollowIPHExpParamsName,
1455 flag_descriptions::kEnableFollowIPHExpParamsDescription, flags_ui::kOsIos,
1456 FEATURE_VALUE_TYPE(kEnableFollowIPHExpParams)},
Tina Wange81e24d2023-03-08 21:10:031457 {"enable-follow-management-instant-reload",
1458 flag_descriptions::kEnableFollowManagementInstantReloadName,
1459 flag_descriptions::kEnableFollowManagementInstantReloadDescription,
1460 flags_ui::kOsIos,
1461 FEATURE_VALUE_TYPE(kEnableFollowManagementInstantReload)},
Guillem Perez3c139a822023-05-24 19:34:251462 {"enable-follow-ui-update", flag_descriptions::kEnableFollowUIUpdateName,
1463 flag_descriptions::kEnableFollowUIUpdateDescription, flags_ui::kOsIos,
1464 FEATURE_VALUE_TYPE(kEnableFollowUIUpdate)},
Mustafa Acerc8c0b152023-03-09 02:41:441465 {"mixed-content-autoupgrade-ios",
1466 flag_descriptions::kMixedContentAutoupgradeName,
1467 flag_descriptions::kMixedContentAutoupgradeDescription, flags_ui::kOsIos,
1468 FEATURE_VALUE_TYPE(
1469 security_interstitials::features::kMixedContentAutoupgrade)},
Menghan YANGc4c94ea22023-03-09 12:48:241470 {"enable-email-in-bookmarks-reading-list-snackbar",
1471 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarName,
1472 flag_descriptions::kEnableEmailInBookmarksReadingListSnackbarDescription,
1473 flags_ui::kOsIos,
1474 FEATURE_VALUE_TYPE(kEnableEmailInBookmarksReadingListSnackbar)},
Jared Saul5363f3962023-03-10 23:03:511475 {"autofill-upstream-authenticate-preflight-call",
1476 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallName,
1477 flag_descriptions::kAutofillUpstreamAuthenticatePreflightCallDescription,
1478 flags_ui::kOsIos,
1479 FEATURE_VALUE_TYPE(
1480 autofill::features::kAutofillUpstreamAuthenticatePreflightCall)},
Marc Treibe9f79ea72023-03-14 10:25:421481 {"enable-preferences-account-storage",
1482 flag_descriptions::kEnablePreferencesAccountStorageName,
1483 flag_descriptions::kEnablePreferencesAccountStorageDescription,
1484 flags_ui::kOsIos,
1485 FEATURE_VALUE_TYPE(syncer::kEnablePreferencesAccountStorage)},
Vincent Boisselle92fa8c472023-03-20 21:35:511486 {"indicate-identity-error-overflow-menu",
1487 flag_descriptions::kIndicateIdentityErrorInOverflowMenuName,
1488 flag_descriptions::kIndicateIdentityErrorInOverflowMenuDescription,
1489 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIndicateSyncErrorInOverflowMenu)},
Olivier ROBINa229d2132023-03-21 12:44:201490 {"ios-browser-edit-menu-metrics",
1491 flag_descriptions::kIOSBrowserEditMenuMetricsName,
1492 flag_descriptions::kIOSBrowserEditMenuMetricsDescription, flags_ui::kOsIos,
1493 FEATURE_VALUE_TYPE(kIOSBrowserEditMenuMetrics)},
Gauthier Ambardb27b29c2023-03-29 07:43:441494 {"sf-symbols-follow-up", flag_descriptions::kSFSymbolsFollowUpName,
1495 flag_descriptions::kSFSymbolsFollowUpDescription, flags_ui::kOsIos,
1496 FEATURE_VALUE_TYPE(kSFSymbolsFollowUp)},
Menghan YANG5b3a78a2023-03-24 17:38:261497 {"enable-reading-list-account-storage",
1498 flag_descriptions::kEnableReadingListAccountStorageName,
1499 flag_descriptions::kEnableReadingListAccountStorageDescription,
1500 flags_ui::kOsIos,
1501 FEATURE_VALUE_TYPE(
1502 reading_list::switches::kReadingListEnableDualReadingListModel)},
1503 {"enable-reading-list-sign-in-promo",
1504 flag_descriptions::kEnableReadingListSignInPromoName,
1505 flag_descriptions::kEnableReadingListSignInPromoDescription,
1506 flags_ui::kOsIos,
1507 FEATURE_VALUE_TYPE(reading_list::switches::
1508 kReadingListEnableSyncTransportModeUponSignIn)},
Stepan Khapuginb2f49522023-04-03 18:25:241509 {"omnibox-grouping-framework-zps",
1510 flag_descriptions::kOmniboxGroupingFrameworkForZPSName,
1511 flag_descriptions::kOmniboxGroupingFrameworkForZPSDescription,
1512 flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForZPS)},
1513 {"omnibox-grouping-framework-non-zps",
1514 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsName,
1515 flag_descriptions::kOmniboxGroupingFrameworkForTypedSuggestionsDescription,
1516 flags_ui::kOsIos,
1517 FEATURE_VALUE_TYPE(omnibox::kGroupingFrameworkForNonZPS)},
Sylvain Defresne935e6f72023-04-04 09:54:471518 {"enable-session-serialization-optimizations",
1519 flag_descriptions::kEnableSessionSerializationOptimizationsName,
1520 flag_descriptions::kEnableSessionSerializationOptimizationsDescription,
1521 flags_ui::kOsIos,
1522 FEATURE_VALUE_TYPE(
1523 web::features::kEnableSessionSerializationOptimizations)},
Stepan Khapugin8c075872023-04-05 14:29:411524 {"bottom-omnibox-steady-state",
1525 flag_descriptions::kBottomOmniboxSteadyStateName,
1526 flag_descriptions::kBottomOmniboxSteadyStateDescription, flags_ui::kOsIos,
1527 FEATURE_VALUE_TYPE(kBottomOmniboxSteadyState)},
Jared Saul19f8ba12023-04-11 17:44:531528 {"autofill-upstream-use-alternate-secure-data-type",
1529 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeName,
1530 flag_descriptions::kAutofillUpstreamUseAlternateSecureDataTypeDescription,
1531 flags_ui::kOsIos,
1532 FEATURE_VALUE_TYPE(
1533 autofill::features::kAutofillUpstreamUseAlternateSecureDataType)},
Robbie Gibson0ea280602023-04-12 01:02:391534 {"only-access-clipboard-async",
1535 flag_descriptions::kOnlyAccessClipboardAsyncName,
1536 flag_descriptions::kOnlyAccessClipboardAsyncDescription, flags_ui::kOsIos,
1537 FEATURE_VALUE_TYPE(kOnlyAccessClipboardAsync)},
Christian Xue5f60232023-04-12 17:50:091538 {"omnibox-tail-suggest", flag_descriptions::kOmniboxTailSuggestName,
1539 flag_descriptions::kOmniboxTailSuggestDescription, flags_ui::kOsIos,
1540 FEATURE_VALUE_TYPE(kOmniboxTailSuggest)},
Ed Chinecb7d5b2023-04-14 19:22:091541 {"feed-disable-hot-start-refresh-ios",
1542 flag_descriptions::kFeedDisableHotStartRefreshName,
1543 flag_descriptions::kFeedDisableHotStartRefreshDescription,
1544 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kFeedDisableHotStartRefresh)},
Olivier ROBIN2613bcd02023-04-20 10:00:471545 {"ios-edit-menu-search-with", flag_descriptions::kIOSEditMenuSearchWithName,
1546 flag_descriptions::kIOSEditMenuSearchWithDescription, flags_ui::kOsIos,
1547 FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSEditMenuSearchWith,
1548 kIOSEditMenuSearchWithVariations,
1549 "IOSEditMenuSearchWith")},
1550 {"ios-edit-menu-hide-search-web",
1551 flag_descriptions::kIOSEditMenuHideSearchWebName,
1552 flag_descriptions::kIOSEditMenuHideSearchWebDescription, flags_ui::kOsIos,
1553 FEATURE_VALUE_TYPE(kIOSEditMenuHideSearchWeb)},
Stephen McGruer9afca1a2023-05-18 20:55:171554 {"autofill-enable-card-art-image",
1555 flag_descriptions::kAutofillEnableCardArtImageName,
1556 flag_descriptions::kAutofillEnableCardArtImageDescription,
1557 flags_ui::kOsIos,
1558 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardArtImage)},
adamta09aa47e2023-05-23 18:20:431559 {"hide-content-suggestions-tiles",
1560 flag_descriptions::kHideContentSuggestionTilesName,
1561 flag_descriptions::kHideContentSuggestionTilesDescription,
1562 flags_ui::kOsIos,
1563 FEATURE_WITH_PARAMS_VALUE_TYPE(
1564 kHideContentSuggestionsTiles,
1565 kHideContentSuggestionTilesVariations,
1566 flag_descriptions::kHideContentSuggestionTilesName)},
Tina Wangcda2c902023-05-25 17:39:451567 {"enable-signed-out-view-demotion",
1568 flag_descriptions::kEnableSignedOutViewDemotionName,
1569 flag_descriptions::kEnableSignedOutViewDemotionDescription,
1570 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSignedOutViewDemotion)},
Stephen McGruerb4c8f7f2023-06-01 21:28:251571 {"autofill-use-two-dots-for-last-four-digits",
1572 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsName,
1573 flag_descriptions::kAutofillUseTwoDotsForLastFourDigitsDescription,
1574 flags_ui::kOsIos,
1575 FEATURE_VALUE_TYPE(
1576 autofill::features::kAutofillUseTwoDotsForLastFourDigits)},
Duong Dac4181ab52023-06-07 12:51:501577 {"enable-variations-google-group-filtering",
1578 flag_descriptions::kEnableVariationsGoogleGroupFilteringName,
1579 flag_descriptions::kEnableVariationsGoogleGroupFilteringDescription,
1580 flags_ui::kOsIos, FEATURE_VALUE_TYPE(kVariationsGoogleGroupFiltering)},
sebsg977f9aa2023-06-08 18:48:241581 {"autofill-disable-profile-updates",
1582 flag_descriptions::kAutofillDisableProfileUpdatesName,
1583 flag_descriptions::kAutofillDisableProfileUpdatesDescription,
1584 flags_ui::kOsIos,
1585 FEATURE_VALUE_TYPE(
1586 autofill::features::test::kAutofillDisableProfileUpdates)},
1587 {"autofill-disable-silent-profile-updates",
1588 flag_descriptions::kAutofillDisableSilentProfileUpdatesName,
1589 flag_descriptions::kAutofillDisableSilentProfileUpdatesDescription,
1590 flags_ui::kOsIos,
1591 FEATURE_VALUE_TYPE(
1592 autofill::features::test::kAutofillDisableSilentProfileUpdates)},
1593 {"autofill-enable-admin-level-2",
1594 flag_descriptions::kAutofillEnableSupportForAdminLevel2Name,
1595 flag_descriptions::kAutofillEnableSupportForAdminLevel2Description,
1596 flags_ui::kOsIos,
1597 FEATURE_VALUE_TYPE(
1598 autofill::features::kAutofillEnableSupportForAdminLevel2)},
1599 {"autofill-enable-between-streets",
1600 flag_descriptions::kAutofillEnableSupportForBetweenStreetsName,
1601 flag_descriptions::kAutofillEnableSupportForBetweenStreetsDescription,
1602 flags_ui::kOsIos,
1603 FEATURE_VALUE_TYPE(
1604 autofill::features::kAutofillEnableSupportForBetweenStreets)},
1605 {"autofill-enable-landmark",
1606 flag_descriptions::kAutofillEnableSupportForLandmarkName,
1607 flag_descriptions::kAutofillEnableSupportForLandmarkDescription,
1608 flags_ui::kOsIos,
1609 FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableSupportForLandmark)},
Hira Mahmood6b0e5502023-06-12 21:51:431610 {"post-restore-default-browser-promo",
1611 flag_descriptions::kPostRestoreDefaultBrowserPromoName,
1612 flag_descriptions::kPostRestoreDefaultBrowserPromoDescription,
1613 flags_ui::kOsIos,
1614 FEATURE_WITH_PARAMS_VALUE_TYPE(
1615 kPostRestoreDefaultBrowserPromo,
1616 kPostRestoreDefaultBrowserPromoVariations,
1617 "PostRestoreDefaultBrowserPromoVariations")},
Ameur Hosnib40858a2023-06-12 17:27:311618 {"spotlight-open-tabs-source",
1619 flag_descriptions::kSpotlightOpenTabsSourceName,
1620 flag_descriptions::kSpotlightOpenTabsSourceDescription, flags_ui::kOsIos,
1621 FEATURE_VALUE_TYPE(kSpotlightOpenTabsSource)},
Marc Treib9bddebb2023-06-15 14:03:341622 {"replace-sync-promos-with-sign-in-promos",
1623 flag_descriptions::kReplaceSyncPromosWithSignInPromosName,
1624 flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription,
1625 flags_ui::kOsIos,
1626 MULTI_VALUE_TYPE(kReplaceSyncPromosWithSignInPromosChoices)}};
sdefresne14900ee2015-11-27 14:43:211627
Rohit Raobed794c2020-04-27 15:27:451628bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
1629 return false;
1630}
1631
1632flags_ui::FlagsState& GetGlobalFlagsState() {
1633 static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries,
1634 nullptr);
1635 return *flags_state;
1636}
David Jean5ca263c2021-08-18 09:19:301637// Creates the experimental test policies map, used by AsyncPolicyLoader and
1638// PolicyLoaderIOS to locally enable policies.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341639NSMutableDictionary* CreateExperimentalTestingPolicies() {
sdefresne14900ee2015-11-27 14:43:211640 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1641
Guillaume Jenkins25e9bd72020-08-27 17:39:061642 // Shared variables for all enterprise experimental flags.
Guillaume Jenkins57606d72020-08-13 17:32:551643 NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init];
Guillaume Jenkins25e9bd72020-08-27 17:39:061644 NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init];
Guillaume Jenkins57606d72020-08-13 17:32:551645
Guillaume Jenkins25e9bd72020-08-27 17:39:061646 // Set some sample policy values for testing if EnableSamplePolicies is set to
1647 // true.
Guillaume Jenkinseeb7007c2020-06-25 22:55:401648 if ([defaults boolForKey:@"EnableSamplePolicies"]) {
Guillaume Jenkins57606d72020-08-13 17:32:551649 [testing_policies addEntriesFromDictionary:@{
Tina Wang59d0b7e2020-08-11 04:41:011650 base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO,
1651
Guillaume Jenkinseeb7007c2020-06-25 22:55:401652 base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO,
1653
1654 // 2 = Disable all variations
1655 base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2,
1656
1657 // 2 = Do not allow any site to show popups
1658 base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2,
1659
Tina Wang5abee802020-07-29 23:09:521660 // Set default search engine.
1661 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) :
1662 @YES,
1663 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) :
1664 @"http://www.google.com/search?q={searchTerms}",
1665 base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) :
Tina Wang7cd0a062020-09-15 21:31:021666 @"TestEngine",
Tina Wang5abee802020-07-29 23:09:521667
Tina Wang89068c82020-10-29 15:51:501668 base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO,
1669
Gauthier Ambard21b23702021-04-16 16:11:271670 base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO,
1671
Tina Wang59d0b7e2020-08-11 04:41:011672 base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO,
Tina Wang54dddfc22020-08-20 22:34:531673
1674 // 2 = Enhanced safe browsing protection
1675 base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2,
1676
1677 base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES,
Hira Mahmooda53b8d632023-01-03 10:03:291678
1679 base::SysUTF8ToNSString(policy::key::kAppStoreRatingEnabled) : @NO,
Guillaume Jenkins57606d72020-08-13 17:32:551680 }];
1681 }
1682
Ewann227a3c02021-04-19 12:04:541683 if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) {
Guillaume Jenkinsfe46d3a2021-04-26 19:51:041684 NSString* sync_policy_key =
1685 base::SysUTF8ToNSString(policy::key::kSyncDisabled);
David Jean5ca263c2021-08-18 09:19:301686 [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}];
Ewann227a3c02021-04-19 12:04:541687 }
Ewann227a3c02021-04-19 12:04:541688
Ewann570a6302021-08-17 07:22:421689 // SyncTypesListDisabled policy.
1690 NSString* Sync_types_list_disabled_key =
1691 base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled);
1692 NSMutableArray* Sync_types_list_disabled_values =
1693 [[NSMutableArray alloc] init];
1694 if ([defaults boolForKey:@"SyncTypesListBookmarks"]) {
1695 [Sync_types_list_disabled_values addObject:@"bookmarks"];
1696 }
1697 if ([defaults boolForKey:@"SyncTypesListReadingList"]) {
1698 [Sync_types_list_disabled_values addObject:@"readingList"];
1699 }
1700 if ([defaults boolForKey:@"SyncTypesListPreferences"]) {
1701 [Sync_types_list_disabled_values addObject:@"preferences"];
1702 }
1703 if ([defaults boolForKey:@"SyncTypesListPasswords"]) {
1704 [Sync_types_list_disabled_values addObject:@"passwords"];
1705 }
1706 if ([defaults boolForKey:@"SyncTypesListAutofill"]) {
1707 [Sync_types_list_disabled_values addObject:@"autofill"];
1708 }
1709 if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) {
1710 [Sync_types_list_disabled_values addObject:@"typedUrls"];
1711 }
1712 if ([defaults boolForKey:@"SyncTypesListTabs"]) {
1713 [Sync_types_list_disabled_values addObject:@"tabs"];
1714 }
1715 if ([Sync_types_list_disabled_values count]) {
1716 [testing_policies addEntriesFromDictionary:@{
1717 Sync_types_list_disabled_key : Sync_types_list_disabled_values
1718 }];
Ewann570a6302021-08-17 07:22:421719 }
1720
Gauthier Ambard073eaa92021-11-22 15:24:131721 // If an incognito mode availability is set, set the value.
Tina Wangc6bcf572021-01-27 18:15:521722 NSString* incognito_policy_key =
1723 base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability);
1724 NSInteger incognito_mode_availability =
1725 [defaults integerForKey:incognito_policy_key];
1726 if (incognito_mode_availability) {
Tina Wangc6bcf572021-01-27 18:15:521727 [testing_policies addEntriesFromDictionary:@{
1728 incognito_policy_key : @(incognito_mode_availability),
1729 }];
1730 }
1731
Ewann40a8f8a2021-07-29 10:01:201732 NSString* restriction_pattern =
1733 [defaults stringForKey:@"RestrictAccountsToPatterns"];
1734 if ([restriction_pattern length] > 0) {
Ewannb3bee382021-08-16 09:12:291735 NSString* restrict_key =
1736 base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns);
Ewann40a8f8a2021-07-29 10:01:201737 [testing_policies addEntriesFromDictionary:@{
Ewannb3bee382021-08-16 09:12:291738 restrict_key : @[ restriction_pattern ]
Ewann40a8f8a2021-07-29 10:01:201739 }];
1740 }
1741
Vincent Boisselle19200bc2021-09-01 17:58:251742 // If the sign-in policy is set (not "None"), add the policy key to the list
1743 // of enabled experimental policies, and set the value.
1744 NSString* const kSigninPolicyKey = @"BrowserSignin";
1745 NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey];
1746 if (signin_policy_mode) {
1747 // Remove the mode offset that was used to represent the unset policy.
1748 --signin_policy_mode;
1749 DCHECK(signin_policy_mode >= 0);
1750
Vincent Boisselle19200bc2021-09-01 17:58:251751 [testing_policies addEntriesFromDictionary:@{
1752 kSigninPolicyKey : @(signin_policy_mode),
1753 }];
1754 }
1755
Veronique Nguyen9b1044f2022-01-11 14:41:131756 // If the New Tab Page URL is set (not empty) add the value to the list of
1757 // test policies.
1758 NSString* ntp_location = [defaults stringForKey:@"NTPLocation"];
1759 if ([ntp_location length] > 0) {
1760 NSString* ntp_location_key =
1761 base::SysUTF8ToNSString(policy::key::kNewTabPageLocation);
1762 [testing_policies
1763 addEntriesFromDictionary:@{ntp_location_key : ntp_location}];
Veronique Nguyen302d8702022-01-12 21:18:571764 [allowed_experimental_policies addObject:ntp_location_key];
Veronique Nguyen9b1044f2022-01-11 14:41:131765 }
1766
Ali Juma9ec36d2b2022-03-28 14:53:121767 if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) {
1768 NSString* allow_backups_key =
1769 base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups);
1770 [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}];
1771 [allowed_experimental_policies addObject:allow_backups_key];
1772 }
1773
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241774 if ([defaults boolForKey:@"DisablePasswordManagerPolicy"]) {
1775 NSString* password_manager_key =
1776 base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled);
1777 [testing_policies addEntriesFromDictionary:@{password_manager_key : @NO}];
1778 [allowed_experimental_policies addObject:password_manager_key];
1779 }
Arthur Milchiorbb44f5c82023-03-14 16:14:461780 if ([defaults boolForKey:@"AddManagedBookmarks"]) {
1781 NSString* managed_bookmarks_key =
1782 base::SysUTF8ToNSString(policy::key::kManagedBookmarks);
1783 NSString* managed_bookmarks_value =
Avi Drissmanaa245812023-04-27 20:20:571784 @"["
1785 // The following gets filtered out from
1786 // the JSON string when parsed.
1787 " {"
1788 " \"toplevel_name\": \"Managed Bookmarks\""
1789 " },"
1790 " {"
1791 " \"name\": \"Google\","
1792 " \"url\": \"google.com\""
1793 " },"
1794 " {"
1795 " \"name\": \"Empty Folder\","
1796 " \"children\": []"
1797 " },"
1798 " {"
1799 " \"name\": \"Big Folder\","
1800 " \"children\": ["
1801 " {"
1802 " \"name\": \"Youtube\","
1803 " \"url\": \"youtube.com\""
1804 " },"
1805 " {"
1806 " \"name\": \"Chromium\","
1807 " \"url\": \"chromium.org\""
1808 " },"
1809 " {"
1810 " \"name\": \"More Stuff\","
1811 " \"children\": ["
1812 " {"
1813 " \"name\": \"Bugs\","
1814 " \"url\": \"crbug.com\""
1815 " }"
1816 " ]"
1817 " }"
1818 " ]"
1819 " }"
1820 "]";
Arthur Milchiorbb44f5c82023-03-14 16:14:461821 [testing_policies addEntriesFromDictionary:@{
1822 managed_bookmarks_key : managed_bookmarks_value
1823 }];
1824 [allowed_experimental_policies addObject:managed_bookmarks_key];
1825 }
Victor Hugo Vianna Silva9e1a7302023-02-21 08:56:241826
Guillaume Jenkins25e9bd72020-08-27 17:39:061827 // If any experimental policy was allowed, set the EnableExperimentalPolicies
1828 // policy.
1829 if ([allowed_experimental_policies count] > 0) {
1830 [testing_policies setValue:allowed_experimental_policies
1831 forKey:base::SysUTF8ToNSString(
1832 policy::key::kEnableExperimentalPolicies)];
1833 }
1834
jlebel2eb40222022-05-06 11:15:421835 NSString* metrics_reporting_key = @"MetricsReportingEnabled";
1836 switch ([defaults integerForKey:metrics_reporting_key]) {
1837 case 1:
1838 // Metrics reporting forced.
Louis Romeroec603fd5f62023-01-20 14:07:131839 [testing_policies setValue:@YES forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421840 break;
1841 case 2:
1842 // Metrics reporting disabled.
Louis Romeroec603fd5f62023-01-20 14:07:131843 [testing_policies setValue:@NO forKey:metrics_reporting_key];
jlebel2eb40222022-05-06 11:15:421844 break;
1845 default:
1846 // Metrics reporting not managed.
1847 break;
1848 }
1849
David Jean6f85d44f2021-08-19 08:08:451850 // Warning: Add new flags to TestingPoliciesHash() below.
1851
David Jean5ca263c2021-08-18 09:19:301852 return testing_policies;
1853}
David Jean6f85d44f2021-08-19 08:08:451854
David Jean5ca263c2021-08-18 09:19:301855} // namespace
1856
Gauthier Ambard02dbf022022-08-23 08:28:471857// Add all switches from experimental flags to `command_line`.
David Jean5ca263c2021-08-18 09:19:301858void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
1859 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
1860
1861 // Set the UA flag if UseMobileSafariUA is enabled.
1862 if ([defaults boolForKey:@"UseMobileSafariUA"]) {
1863 // Safari uses "Vesion/", followed by the OS version excluding bugfix, where
1864 // Chrome puts its product token.
1865 int32_t major = 0;
1866 int32_t minor = 0;
1867 int32_t bugfix = 0;
1868 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
1869 std::string product = base::StringPrintf("Version/%d.%d", major, minor);
1870
1871 command_line->AppendSwitchASCII(switches::kUserAgent,
1872 web::BuildMobileUserAgent(product));
1873 }
1874
1875 // Shared variables for all enterprise experimental flags.
Vincent Boisselleed0e6f1a2021-11-09 06:47:341876 NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies();
David Jean5ca263c2021-08-18 09:19:301877
1878 // If a CBCM enrollment token is provided, force Chrome Browser Cloud
1879 // Management to enabled and add the token to the list of policies.
1880 NSString* token_key =
1881 base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken);
1882 NSString* token = [defaults stringForKey:token_key];
1883
1884 if ([token length] > 0) {
1885 command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement);
1886 [testing_policies setValue:token forKey:token_key];
1887 }
1888
Guillaume Jenkins57606d72020-08-13 17:32:551889 // If some policies were set, commit them to the app's registration defaults.
1890 if ([testing_policies count] > 0) {
Guillaume Jenkinseeb7007c2020-06-25 22:55:401891 NSDictionary* registration_defaults =
1892 @{kPolicyLoaderIOSConfigurationKey : testing_policies};
1893 [defaults registerDefaults:registration_defaults];
1894 }
1895
sdefresne14900ee2015-11-27 14:43:211896 // Freeform commandline flags. These are added last, so that any flags added
1897 // earlier in this function take precedence.
1898 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
1899 base::CommandLine::StringVector flags;
1900 // Append an empty "program" argument.
1901 flags.push_back("");
1902
1903 // The number of flags corresponds to the number of text fields in
1904 // Experimental.plist.
1905 const int kNumFreeformFlags = 5;
1906 for (int i = 1; i <= kNumFreeformFlags; ++i) {
1907 NSString* key =
1908 [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i];
1909 NSString* flag = [defaults stringForKey:key];
1910 if ([flag length]) {
Robbie Gibsonc91ce622019-05-20 14:44:331911 // iOS keyboard replaces -- with —, so undo that.
1912 flag = [flag stringByReplacingOccurrencesOfString:@"—"
1913 withString:@"--"
1914 options:0
1915 range:NSMakeRange(0, 1)];
1916 // To make things easier, allow flags with no dashes by prepending them
1917 // here. This also allows for flags that just have one dash if they
1918 // exist.
1919 if (![flag hasPrefix:@"-"]) {
1920 flag = [@"--" stringByAppendingString:flag];
1921 }
sdefresne14900ee2015-11-27 14:43:211922 flags.push_back(base::SysNSStringToUTF8(flag));
1923 }
1924 }
1925
1926 base::CommandLine temp_command_line(flags);
1927 command_line->AppendArguments(temp_command_line, false);
1928 }
msardafc76f662017-02-24 12:46:281929
justincohendacc85d2017-06-28 23:34:101930 // Populate command line flag for 3rd party keyboard omnibox workaround.
1931 NSString* enableThirdPartyKeyboardWorkaround =
1932 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"];
1933 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) {
1934 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround);
1935 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) {
1936 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround);
1937 }
1938
Sylvain Defresned3cd8d92022-01-18 13:35:081939 ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line);
sdefresne14900ee2015-11-27 14:43:211940}
1941
sdefresne14900ee2015-11-27 14:43:211942void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
1943 base::CommandLine* command_line) {
Sylvain Defresne8327a2f2019-01-17 14:19:181944 GetGlobalFlagsState().ConvertFlagsToSwitches(
sdefresnec9763902015-12-02 10:30:111945 flags_storage, command_line, flags_ui::kAddSentinels,
Gregory Chatzinofff6523722017-11-21 01:33:531946 switches::kEnableFeatures, switches::kDisableFeatures);
sdefresne14900ee2015-11-27 14:43:211947}
1948
jkrcalbf073372016-07-29 07:21:311949std::vector<std::string> RegisterAllFeatureVariationParameters(
1950 flags_ui::FlagsStorage* flags_storage,
1951 base::FeatureList* feature_list) {
Sylvain Defresne8327a2f2019-01-17 14:19:181952 return GetGlobalFlagsState().RegisterAllFeatureVariationParameters(
1953 flags_storage, feature_list);
jkrcalbf073372016-07-29 07:21:311954}
1955
sdefresne14900ee2015-11-27 14:43:211956void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
1957 flags_ui::FlagAccess access,
Matt Menke4d777572022-06-15 15:55:501958 base::Value::List& supported_entries,
1959 base::Value::List& unsupported_entries) {
Sylvain Defresne8327a2f2019-01-17 14:19:181960 GetGlobalFlagsState().GetFlagFeatureEntries(
sdefresne14900ee2015-11-27 14:43:211961 flags_storage, access, supported_entries, unsupported_entries,
Renjie Tang208c8192020-11-03 00:46:511962 base::BindRepeating(&SkipConditionalFeatureEntry));
sdefresne14900ee2015-11-27 14:43:211963}
1964
1965void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
1966 const std::string& internal_name,
1967 bool enable) {
Sylvain Defresne8327a2f2019-01-17 14:19:181968 GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name,
1969 enable);
sdefresne14900ee2015-11-27 14:43:211970}
1971
1972void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
Sylvain Defresne8327a2f2019-01-17 14:19:181973 GetGlobalFlagsState().ResetAllFlags(flags_storage);
sdefresne14900ee2015-11-27 14:43:211974}
1975
Nicolas MacBeth972e2592023-02-23 15:22:091976bool IsRestartNeededToCommitChanges() {
1977 return GetGlobalFlagsState().IsRestartNeededToCommitChanges();
1978}
1979
sdefresne14900ee2015-11-27 14:43:211980namespace testing {
1981
Elly Fong-Jones323ab1092021-08-23 22:36:311982base::span<const flags_ui::FeatureEntry> GetFeatureEntries() {
1983 return base::span<const flags_ui::FeatureEntry>(kFeatureEntries,
Daniel Cheng1f047a82022-02-26 10:04:531984 std::size(kFeatureEntries));
sdefresne14900ee2015-11-27 14:43:211985}
1986
1987} // namespace testing