Avi Drissman | ea1be23 | 2022-09-14 23:29:06 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Implementation of about_flags for iOS that sets flags based on experimental |
| 6 | // settings. |
| 7 | |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 8 | #import "ios/chrome/browser/flags/about_flags.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 9 | |
Nazerke | 9c25905 | 2019-06-26 15:30:10 | [diff] [blame] | 10 | #import <UIKit/UIKit.h> |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 11 | #import <stddef.h> |
| 12 | #import <stdint.h> |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 13 | |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 14 | #import "base/base_switches.h" |
| 15 | #import "base/bind.h" |
| 16 | #import "base/callback_helpers.h" |
| 17 | #import "base/check_op.h" |
Peter Boström | 3f79857 | 2022-07-26 23:44:36 | [diff] [blame] | 18 | #import "base/debug/debugging_buildflags.h" |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 19 | #import "base/mac/foundation_util.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 20 | #import "base/no_destructor.h" |
| 21 | #import "base/strings/stringprintf.h" |
| 22 | #import "base/strings/sys_string_conversions.h" |
| 23 | #import "base/system/sys_info.h" |
| 24 | #import "components/autofill/core/common/autofill_features.h" |
| 25 | #import "components/autofill/core/common/autofill_payments_features.h" |
| 26 | #import "components/autofill/core/common/autofill_switches.h" |
| 27 | #import "components/autofill/ios/browser/autofill_switches.h" |
| 28 | #import "components/breadcrumbs/core/features.h" |
| 29 | #import "components/commerce/core/commerce_feature_list.h" |
| 30 | #import "components/commerce/core/flag_descriptions.h" |
| 31 | #import "components/content_settings/core/common/features.h" |
| 32 | #import "components/dom_distiller/core/dom_distiller_switches.h" |
| 33 | #import "components/enterprise/browser/enterprise_switches.h" |
| 34 | #import "components/feature_engagement/public/feature_constants.h" |
| 35 | #import "components/feature_engagement/public/feature_list.h" |
| 36 | #import "components/feed/feed_feature_list.h" |
| 37 | #import "components/flags_ui/feature_entry.h" |
| 38 | #import "components/flags_ui/feature_entry_macros.h" |
| 39 | #import "components/flags_ui/flags_storage.h" |
| 40 | #import "components/flags_ui/flags_ui_switches.h" |
| 41 | #import "components/invalidation/impl/invalidation_switches.h" |
| 42 | #import "components/ntp_tiles/switches.h" |
| 43 | #import "components/omnibox/browser/omnibox_field_trial.h" |
| 44 | #import "components/omnibox/common/omnibox_features.h" |
| 45 | #import "components/optimization_guide/core/optimization_guide_features.h" |
Raj T | a921ffc | 2022-08-25 19:00:20 | [diff] [blame] | 46 | #import "components/optimization_guide/core/optimization_guide_switches.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 47 | #import "components/password_manager/core/common/password_manager_features.h" |
| 48 | #import "components/payments/core/features.h" |
| 49 | #import "components/policy/core/common/features.h" |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 50 | #import "components/policy/core/common/policy_loader_ios_constants.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 51 | #import "components/policy/policy_constants.h" |
| 52 | #import "components/safe_browsing/core/common/features.h" |
Victor Hugo Vianna Silva | 0399402f | 2021-09-07 21:41:25 | [diff] [blame] | 53 | #import "components/send_tab_to_self/features.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 54 | #import "components/shared_highlighting/core/common/shared_highlighting_features.h" |
| 55 | #import "components/signin/core/browser/account_reconcilor.h" |
| 56 | #import "components/signin/ios/browser/features.h" |
| 57 | #import "components/signin/public/base/signin_switches.h" |
| 58 | #import "components/strings/grit/components_strings.h" |
| 59 | #import "components/sync/base/command_line_switches.h" |
| 60 | #import "components/sync/base/features.h" |
| 61 | #import "components/sync/base/pref_names.h" |
| 62 | #import "components/translate/core/browser/translate_prefs.h" |
| 63 | #import "components/translate/core/common/translate_util.h" |
Ed Chin | 91e4499 | 2022-07-27 13:42:34 | [diff] [blame] | 64 | #import "ios/chrome/app/background_mode_buildflags.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 65 | #import "ios/chrome/browser/browsing_data/browsing_data_features.h" |
| 66 | #import "ios/chrome/browser/crash_report/features.h" |
Gauthier Ambard | 9260513 | 2022-08-26 13:25:17 | [diff] [blame] | 67 | #import "ios/chrome/browser/flags/chrome_switches.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 68 | #import "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h" |
Gauthier Ambard | 9260513 | 2022-08-26 13:25:17 | [diff] [blame] | 69 | #import "ios/chrome/browser/flags/system_flags.h" |
Ed Chin | 100660bf | 2022-04-26 16:59:13 | [diff] [blame] | 70 | #import "ios/chrome/browser/ntp/features.h" |
Vincent Boisselle | 88fef22 | 2022-09-23 18:54:50 | [diff] [blame] | 71 | #import "ios/chrome/browser/policy/cloud/user_policy_constants.h" |
Vincent Boisselle | ad6cbe2 | 2022-07-04 19:32:39 | [diff] [blame] | 72 | #import "ios/chrome/browser/policy/cloud/user_policy_switch.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 73 | #import "ios/chrome/browser/policy/policy_util.h" |
Benjamin Williams | 14233d7 | 2022-07-26 18:32:20 | [diff] [blame] | 74 | #import "ios/chrome/browser/promos_manager/features.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 75 | #import "ios/chrome/browser/screen_time/screen_time_buildflags.h" |
Olivier Robin | 3a957df | 2021-12-21 18:04:34 | [diff] [blame] | 76 | #import "ios/chrome/browser/sessions/session_features.h" |
Zhixiang Teoh | 40027a2 | 2022-07-28 03:24:34 | [diff] [blame] | 77 | #import "ios/chrome/browser/text_selection/text_selection_util.h" |
Hira Mahmood | b0e5f41 | 2022-09-01 19:41:05 | [diff] [blame] | 78 | #import "ios/chrome/browser/ui/app_store_rating/features.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 79 | #import "ios/chrome/browser/ui/autofill/features.h" |
| 80 | #import "ios/chrome/browser/ui/bubble/bubble_features.h" |
adamta | 22a4d50 | 2020-05-21 03:12:21 | [diff] [blame] | 81 | #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" |
Javier Ernesto Flores Robles | 209b282 | 2021-03-25 19:16:50 | [diff] [blame] | 82 | #import "ios/chrome/browser/ui/default_promo/default_browser_utils.h" |
Ewann | 1a9d33d | 2021-06-14 11:12:24 | [diff] [blame] | 83 | #import "ios/chrome/browser/ui/download/features.h" |
Rohit Rao | 5aa791a | 2022-08-19 17:34:53 | [diff] [blame] | 84 | #import "ios/chrome/browser/ui/first_run/field_trial_constants.h" |
Chris Lu | 438e1c05 | 2022-08-17 02:57:00 | [diff] [blame] | 85 | #import "ios/chrome/browser/ui/first_run/trending_queries_field_trial.h" |
Kurt Horimoto | 4da682b02 | 2018-04-12 07:43:35 | [diff] [blame] | 86 | #import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h" |
adamta | 27356847 | 2020-12-04 23:53:57 | [diff] [blame] | 87 | #import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h" |
Christian Xu | b8c06cd | 2022-04-29 20:55:01 | [diff] [blame] | 88 | #import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h" |
Aliona DANGLA | a5257ccc | 2022-08-29 14:01:49 | [diff] [blame] | 89 | #import "ios/chrome/browser/ui/open_in/features.h" |
Robbie Gibson | 686c5673 | 2021-10-04 17:11:45 | [diff] [blame] | 90 | #import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h" |
Gauthier Ambard | 30ad9ca | 2022-06-09 14:15:26 | [diff] [blame] | 91 | #import "ios/chrome/browser/ui/popup_menu/public/features.h" |
Benjamin Williams | 3d3a2ec | 2022-09-13 20:01:26 | [diff] [blame] | 92 | #import "ios/chrome/browser/ui/post_restore_signin/features.h" |
gogerald | 0ff29e5 | 2021-02-03 18:56:19 | [diff] [blame] | 93 | #import "ios/chrome/browser/ui/start_surface/start_surface_features.h" |
Kurt Horimoto | 79d590b | 2018-09-12 19:09:28 | [diff] [blame] | 94 | #import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 95 | #import "ios/chrome/browser/ui/ui_feature_flags.h" |
Cheick Cisse | 87a51cb | 2022-09-08 21:29:17 | [diff] [blame] | 96 | #import "ios/chrome/browser/ui/whats_new/feature_flags.h" |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 97 | #import "ios/chrome/browser/web/features.h" |
| 98 | #import "ios/chrome/grit/ios_strings.h" |
| 99 | #import "ios/components/security_interstitials/https_only_mode/feature.h" |
| 100 | #import "ios/public/provider/chrome/browser/app_utils/app_utils_api.h" |
| 101 | #import "ios/web/common/features.h" |
| 102 | #import "ios/web/common/user_agent.h" |
| 103 | #import "ios/web/common/web_view_creation_util.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 104 | |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 105 | #if BUILDFLAG(IOS_SCREEN_TIME_ENABLED) |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 106 | #import "ios/chrome/browser/screen_time/features.h" |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 107 | #endif |
| 108 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 109 | #if !defined(OFFICIAL_BUILD) |
Gauthier Ambard | 999088c | 2022-09-13 08:36:57 | [diff] [blame] | 110 | #import "components/variations/variations_switches.h" |
vitaliii | 489217aa | 2017-01-30 14:50:22 | [diff] [blame] | 111 | #endif |
stkhapugin | c1be179 | 2016-12-13 14:30:53 | [diff] [blame] | 112 | |
| 113 | #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 114 | #error "This file requires ARC support." |
| 115 | #endif |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 116 | |
elawrence | 816f6790e | 2017-06-16 18:19:28 | [diff] [blame] | 117 | using flags_ui::FeatureEntry; |
| 118 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 119 | namespace { |
Emily Stark | bafa906 | 2017-12-27 15:22:46 | [diff] [blame] | 120 | |
Olivier Robin | 3d6041162 | 2018-02-23 10:03:22 | [diff] [blame] | 121 | const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = { |
| 122 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 123 | {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"}, |
| 124 | {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"}, |
| 125 | {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"}, |
| 126 | {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"}, |
| 127 | {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"}, |
| 128 | {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"}, |
| 129 | {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"}, |
| 130 | {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"}, |
| 131 | }; |
| 132 | |
Nohemi Fernandez | 222d6d4 | 2020-09-30 20:35:57 | [diff] [blame] | 133 | const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = { |
| 134 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 135 | {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"}, |
| 136 | {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"}, |
| 137 | {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"}, |
| 138 | }; |
| 139 | |
Nohemi Fernandez | c00842a | 2021-07-26 11:47:34 | [diff] [blame] | 140 | const FeatureEntry::Choice |
| 141 | kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = { |
| 142 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 143 | {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"}, |
| 144 | {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"}, |
| 145 | {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"}, |
| 146 | }; |
| 147 | |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 148 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = { |
| 149 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}}; |
| 150 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = { |
| 151 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}}; |
| 152 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = { |
| 153 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}}; |
| 154 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = { |
| 155 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}}; |
| 156 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = { |
| 157 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}}; |
| 158 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = { |
| 159 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}}; |
| 160 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = { |
| 161 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}}; |
| 162 | |
| 163 | const FeatureEntry::FeatureVariation |
| 164 | kOmniboxUIMaxAutocompleteMatchesVariations[] = { |
| 165 | {"3 matches", kOmniboxUIMaxAutocompleteMatches3, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 166 | std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 167 | {"4 matches", kOmniboxUIMaxAutocompleteMatches4, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 168 | std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 169 | {"5 matches", kOmniboxUIMaxAutocompleteMatches5, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 170 | std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 171 | {"6 matches", kOmniboxUIMaxAutocompleteMatches6, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 172 | std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 173 | {"8 matches", kOmniboxUIMaxAutocompleteMatches8, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 174 | std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 175 | {"10 matches", kOmniboxUIMaxAutocompleteMatches10, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 176 | std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 177 | {"12 matches", kOmniboxUIMaxAutocompleteMatches12, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 178 | std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}}; |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 179 | |
Stepan Khapugin | bac467e | 2022-05-06 21:11:54 | [diff] [blame] | 180 | const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches6[] = { |
| 181 | {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "6"}}; |
| 182 | const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches15[] = { |
| 183 | {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "15"}}; |
| 184 | const FeatureEntry::FeatureParam kOmniboxMaxZPSMatches20[] = { |
| 185 | {OmniboxFieldTrial::kMaxZeroSuggestMatchesParam, "20"}}; |
| 186 | |
| 187 | const FeatureEntry::FeatureVariation kOmniboxMaxZPSMatchesVariations[] = { |
| 188 | {"6 matches", kOmniboxMaxZPSMatches6, std::size(kOmniboxMaxZPSMatches6), |
| 189 | nullptr}, |
| 190 | {"15 matches", kOmniboxMaxZPSMatches15, std::size(kOmniboxMaxZPSMatches15), |
| 191 | nullptr}, |
| 192 | {"20 matches", kOmniboxMaxZPSMatches20, std::size(kOmniboxMaxZPSMatches20), |
| 193 | nullptr}, |
| 194 | }; |
| 195 | |
Christian Xu | cf26d56 | 2022-07-06 09:28:36 | [diff] [blame] | 196 | const FeatureEntry::FeatureParam kOmniboxMaxURLMatches5[] = { |
| 197 | {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "5"}}; |
| 198 | const FeatureEntry::FeatureParam kOmniboxMaxURLMatches6[] = { |
| 199 | {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "6"}}; |
| 200 | const FeatureEntry::FeatureParam kOmniboxMaxURLMatches7[] = { |
| 201 | {OmniboxFieldTrial::kOmniboxMaxURLMatchesParam, "7"}}; |
| 202 | |
| 203 | const FeatureEntry::FeatureVariation kOmniboxMaxURLMatchesVariations[] = { |
| 204 | {"5 matches", kOmniboxMaxURLMatches5, std::size(kOmniboxMaxURLMatches5), |
| 205 | nullptr}, |
| 206 | {"6 matches", kOmniboxMaxURLMatches6, std::size(kOmniboxMaxURLMatches6), |
| 207 | nullptr}, |
| 208 | {"7 matches", kOmniboxMaxURLMatches7, std::size(kOmniboxMaxURLMatches7), |
| 209 | nullptr}, |
| 210 | }; |
| 211 | |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 212 | const FeatureEntry::FeatureParam |
| 213 | kAutofillUseMobileLabelDisambiguationShowAll[] = { |
| 214 | {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName, |
| 215 | autofill::features:: |
| 216 | kAutofillUseMobileLabelDisambiguationParameterShowAll}}; |
| 217 | const FeatureEntry::FeatureParam |
| 218 | kAutofillUseMobileLabelDisambiguationShowOne[] = { |
| 219 | {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName, |
| 220 | autofill::features:: |
| 221 | kAutofillUseMobileLabelDisambiguationParameterShowOne}}; |
| 222 | |
| 223 | const FeatureEntry::FeatureVariation |
| 224 | kAutofillUseMobileLabelDisambiguationVariations[] = { |
| 225 | {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 226 | std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr}, |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 227 | {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 228 | std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}}; |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 229 | |
Javier Ernesto Flores Robles | e85f4a1 | 2021-02-23 18:10:10 | [diff] [blame] | 230 | const FeatureEntry::FeatureParam |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 231 | kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = { |
| 232 | {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}}; |
| 233 | const FeatureEntry::FeatureVariation |
| 234 | kDefaultBrowserFullscreenPromoExperimentVariations[] = { |
| 235 | {"Remind me later", |
| 236 | kDefaultBrowserFullscreenPromoExperimentRemindMeLater, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 237 | std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater), |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 238 | nullptr}}; |
| 239 | |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 240 | const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = { |
| 241 | {kDiscoverFeedIsNativeUIEnabled, "true"}}; |
| 242 | const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = { |
| 243 | {"Native UI", kDiscoverFeedInNtpEnableNativeUI, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 244 | std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}}; |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 245 | |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 246 | const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = { |
| 247 | {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}}; |
| 248 | const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = { |
| 249 | {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}}; |
| 250 | const FeatureEntry::FeatureVariation |
| 251 | kEnableDiscoverFeedStaticResourceServingVariations[] = { |
| 252 | {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 253 | std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 254 | {"Preload Templates", kDiscoverFeedSRSPreloadTemplates, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 255 | std::size(kDiscoverFeedSRSPreloadTemplates), nullptr}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 256 | }; |
| 257 | |
Mohammad Refaat | ab6bee6 | 2022-05-16 16:31:15 | [diff] [blame] | 258 | const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoFullWithTitle[] = { |
adamta | db0bfc6 | 2022-08-01 17:37:47 | [diff] [blame] | 259 | {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "true"}, |
| 260 | {kDiscoverFeedTopSyncPromoStyleCompact, "false"}}; |
Mohammad Refaat | ab6bee6 | 2022-05-16 16:31:15 | [diff] [blame] | 261 | const FeatureEntry::FeatureParam kDiscoverFeedTopSyncPromoCompact[] = { |
adamta | db0bfc6 | 2022-08-01 17:37:47 | [diff] [blame] | 262 | {kDiscoverFeedTopSyncPromoStyleFullWithTitle, "false"}, |
| 263 | {kDiscoverFeedTopSyncPromoStyleCompact, "true"}}; |
| 264 | |
Mohammad Refaat | ab6bee6 | 2022-05-16 16:31:15 | [diff] [blame] | 265 | const FeatureEntry::FeatureVariation kDiscoverFeedTopSyncPromoVariations[] = { |
| 266 | {"Full with title", kDiscoverFeedTopSyncPromoFullWithTitle, |
| 267 | std::size(kDiscoverFeedTopSyncPromoFullWithTitle), nullptr}, |
| 268 | {"Compact", kDiscoverFeedTopSyncPromoCompact, |
| 269 | std::size(kDiscoverFeedTopSyncPromoCompact), nullptr}}; |
| 270 | |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 271 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = { |
| 272 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 273 | kIOSOmniboxUpdatedPopupUIVariation1}}; |
| 274 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = { |
| 275 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 276 | kIOSOmniboxUpdatedPopupUIVariation2}}; |
Stepan Khapugin | 0fd1869a | 2022-08-09 10:23:47 | [diff] [blame] | 277 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion3[] = { |
| 278 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 279 | kIOSOmniboxUpdatedPopupUIVariation1UIKit}}; |
| 280 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion4[] = { |
| 281 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 282 | kIOSOmniboxUpdatedPopupUIVariation2UIKit}}; |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 283 | const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = { |
Stepan Khapugin | 0fd1869a | 2022-08-09 10:23:47 | [diff] [blame] | 284 | {"Version 1 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion1, |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 285 | std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr}, |
Stepan Khapugin | 0fd1869a | 2022-08-09 10:23:47 | [diff] [blame] | 286 | {"Version 2 - SwiftUI", kiOSOmniboxUpdatedPopupUIVersion2, |
| 287 | std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}, |
| 288 | {"Version 1 - UIKit", kiOSOmniboxUpdatedPopupUIVersion3, |
| 289 | std::size(kiOSOmniboxUpdatedPopupUIVersion3), nullptr}, |
| 290 | {"Version 2 - UIKit", kiOSOmniboxUpdatedPopupUIVersion4, |
| 291 | std::size(kiOSOmniboxUpdatedPopupUIVersion4), nullptr}}; |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 292 | |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 293 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 294 | {kStartSurfaceShrinkLogoParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 295 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 296 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 297 | {kStartSurfaceHideShortcutsParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 298 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 299 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 300 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 301 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 302 | const FeatureEntry::FeatureParam |
| 303 | kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = { |
| 304 | {kStartSurfaceShrinkLogoParam, "true"}, |
| 305 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 306 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 307 | const FeatureEntry::FeatureParam |
| 308 | kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = { |
| 309 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 310 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 311 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 312 | const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 313 | {kStartSurfaceShrinkLogoParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 314 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 315 | const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = { |
| 316 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 317 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 318 | const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 319 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 320 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 321 | const FeatureEntry::FeatureParam |
| 322 | kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = { |
| 323 | {kStartSurfaceShrinkLogoParam, "true"}, |
| 324 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 325 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 326 | const FeatureEntry::FeatureParam |
| 327 | kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = { |
| 328 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 329 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 330 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 331 | |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 332 | const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = { |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 333 | {"10s:Show Return to Recent Tab tile", |
| 334 | kStartSurfaceTenSecondsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 335 | std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 336 | {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 337 | std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 338 | {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 339 | std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 340 | {"10s:Shrink Logo and show Return to Recent Tab tile", |
| 341 | kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 342 | std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 343 | {"10s:Hide Shortcuts and show Return to Recent Tab tile", |
| 344 | kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 345 | std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 346 | {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 347 | std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 348 | {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 349 | std::size(kStartSurfaceOneHourShrinkLogo), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 350 | {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 351 | std::size(kStartSurfaceOneHourHideShortcuts), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 352 | {"1h:Shrink Logo and show Return to Recent Tab tile", |
| 353 | kStartSurfaceOneHourShrinkLogoReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 354 | std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 355 | {"1h:Hide Shortcuts and show Return to Recent Tab tile", |
| 356 | kStartSurfaceOneHourHideShortcutsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 357 | std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr}, |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 358 | }; |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 359 | |
Chris Lu | 8e308dc | 2022-09-06 16:59:40 | [diff] [blame] | 360 | const FeatureEntry::FeatureParam kModuleRefreshMinimizeSpacing[] = { |
| 361 | {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}}; |
| 362 | const FeatureEntry::FeatureParam kModuleRefreshNoHeaders[] = { |
Chris Lu | 264e237 | 2022-09-08 13:12:57 | [diff] [blame] | 363 | {kContentSuggestionsUIModuleRefreshMinimizeSpacingParam, "true"}, |
Chris Lu | 8e308dc | 2022-09-06 16:59:40 | [diff] [blame] | 364 | {kContentSuggestionsUIModuleRefreshRemoveHeadersParam, "true"}}; |
| 365 | |
| 366 | const FeatureEntry::FeatureVariation kModuleRefreshVariations[] = { |
| 367 | {"Enabled with minimized spacing", kModuleRefreshMinimizeSpacing, |
| 368 | std::size(kModuleRefreshMinimizeSpacing), nullptr}, |
Chris Lu | 264e237 | 2022-09-08 13:12:57 | [diff] [blame] | 369 | {"Enabled with no headers and minimized spacing", kModuleRefreshNoHeaders, |
Chris Lu | 8e308dc | 2022-09-06 16:59:40 | [diff] [blame] | 370 | std::size(kModuleRefreshNoHeaders), nullptr}, |
| 371 | }; |
| 372 | |
Ed Chin | 91e4499 | 2022-07-27 13:42:34 | [diff] [blame] | 373 | #if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED) |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 374 | // Feed Background Refresh Feature Params |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 375 | const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeOnce[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 376 | {kEnableServerDrivenBackgroundRefreshSchedule, "false"}, |
| 377 | {kEnableRecurringBackgroundRefreshSchedule, "false"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 378 | {kMaxCacheAgeInSeconds, /*60*60*/ "3600"}, |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 379 | {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}}; |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 380 | const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeOnce[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 381 | {kEnableServerDrivenBackgroundRefreshSchedule, "false"}, |
| 382 | {kEnableRecurringBackgroundRefreshSchedule, "false"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 383 | {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"}, |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 384 | {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}}; |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 385 | const FeatureEntry::FeatureParam kOneHourIntervalOneHourMaxAgeRecurring[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 386 | {kEnableServerDrivenBackgroundRefreshSchedule, "false"}, |
| 387 | {kEnableRecurringBackgroundRefreshSchedule, "true"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 388 | {kMaxCacheAgeInSeconds, /*60*60*/ "3600"}, |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 389 | {kBackgroundRefreshIntervalInSeconds, /* 60*60= */ "3600"}}; |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 390 | const FeatureEntry::FeatureParam kFourHourIntervalSixHourMaxAgeRecurring[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 391 | {kEnableServerDrivenBackgroundRefreshSchedule, "false"}, |
| 392 | {kEnableRecurringBackgroundRefreshSchedule, "true"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 393 | {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"}, |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 394 | {kBackgroundRefreshIntervalInSeconds, /* 4*60*60= */ "14400"}}; |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 395 | const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeOnce[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 396 | {kEnableServerDrivenBackgroundRefreshSchedule, "true"}, |
| 397 | {kEnableRecurringBackgroundRefreshSchedule, "false"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 398 | {kMaxCacheAgeInSeconds, /*60*60*/ "3600"}, |
| 399 | {kBackgroundRefreshIntervalInSeconds, "0"}}; |
| 400 | const FeatureEntry::FeatureParam kServerDrivenOneHourMaxAgeRecurring[] = { |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 401 | {kEnableServerDrivenBackgroundRefreshSchedule, "true"}, |
| 402 | {kEnableRecurringBackgroundRefreshSchedule, "true"}, |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 403 | {kMaxCacheAgeInSeconds, /*60*60*/ "3600"}, |
| 404 | {kBackgroundRefreshIntervalInSeconds, "0"}}; |
| 405 | const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeOnce[] = { |
| 406 | {kEnableServerDrivenBackgroundRefreshSchedule, "true"}, |
| 407 | {kEnableRecurringBackgroundRefreshSchedule, "false"}, |
| 408 | {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"}, |
| 409 | {kBackgroundRefreshIntervalInSeconds, "0"}}; |
| 410 | const FeatureEntry::FeatureParam kServerDrivenSixHourMaxAgeRecurring[] = { |
| 411 | {kEnableServerDrivenBackgroundRefreshSchedule, "true"}, |
| 412 | {kEnableRecurringBackgroundRefreshSchedule, "true"}, |
| 413 | {kMaxCacheAgeInSeconds, /*6*60*60*/ "21600"}, |
| 414 | {kBackgroundRefreshIntervalInSeconds, "0"}}; |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 415 | |
| 416 | // Feed Background Refresh Feature Variations |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 417 | const FeatureEntry::FeatureVariation kFeedBackgroundRefreshVariations[] = { |
Ed Chin | 321b8fe | 2022-08-16 07:02:01 | [diff] [blame] | 418 | {"1hr Interval 1hr Max Age Once", kOneHourIntervalOneHourMaxAgeOnce, |
| 419 | std::size(kOneHourIntervalOneHourMaxAgeOnce), nullptr}, |
| 420 | {"4hr Interval 6hr Max Age Once", kFourHourIntervalSixHourMaxAgeOnce, |
| 421 | std::size(kFourHourIntervalSixHourMaxAgeOnce), nullptr}, |
| 422 | {"1hr Interval 1hr Max Age Recurring", |
| 423 | kOneHourIntervalOneHourMaxAgeRecurring, |
| 424 | std::size(kOneHourIntervalOneHourMaxAgeRecurring), nullptr}, |
| 425 | {"4hr Interval 6hr Max Age Recurring", |
| 426 | kFourHourIntervalSixHourMaxAgeRecurring, |
| 427 | std::size(kFourHourIntervalSixHourMaxAgeRecurring), nullptr}, |
| 428 | {"Server Driven 1hr Max Age Once", kServerDrivenOneHourMaxAgeOnce, |
| 429 | std::size(kServerDrivenOneHourMaxAgeOnce), nullptr}, |
| 430 | {"Server Driven 1hr Max Age Recurring", kServerDrivenOneHourMaxAgeRecurring, |
| 431 | std::size(kServerDrivenOneHourMaxAgeRecurring), nullptr}, |
| 432 | {"Server Driven 6hr Max Age Once", kServerDrivenSixHourMaxAgeOnce, |
| 433 | std::size(kServerDrivenSixHourMaxAgeOnce), nullptr}, |
| 434 | {"Server Driven 6hr Max Age Recurring", kServerDrivenSixHourMaxAgeRecurring, |
| 435 | std::size(kServerDrivenSixHourMaxAgeRecurring), nullptr}, |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 436 | }; |
Ed Chin | 91e4499 | 2022-07-27 13:42:34 | [diff] [blame] | 437 | #endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED) |
Ed Chin | 59f617b | 2022-07-19 22:12:04 | [diff] [blame] | 438 | |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 439 | const FeatureEntry::FeatureParam kFREDefaultBrowserPromoDefaultDelay[] = { |
| 440 | {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoDefaultDelayParam}}; |
| 441 | const FeatureEntry::FeatureParam kFREDefaultBrowserPromoFirstRunOnly[] = { |
| 442 | {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoFirstRunOnlyParam}}; |
| 443 | const FeatureEntry::FeatureParam kFREDefaultBrowserPromoShortDelay[] = { |
| 444 | {kFREDefaultBrowserPromoParam, kFREDefaultBrowserPromoShortDelayParam}}; |
| 445 | const FeatureEntry::FeatureVariation kFREDefaultBrowserPromoVariations[] = { |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 446 | {"Wait 14 days after FRE default browser promo", |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 447 | kFREDefaultBrowserPromoDefaultDelay, |
| 448 | std::size(kFREDefaultBrowserPromoDefaultDelay), nullptr}, |
| 449 | {"FRE default browser promo only", kFREDefaultBrowserPromoFirstRunOnly, |
| 450 | std::size(kFREDefaultBrowserPromoFirstRunOnly), nullptr}, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 451 | {"Wait 3 days after FRE default browser promo", |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 452 | kFREDefaultBrowserPromoShortDelay, |
| 453 | std::size(kFREDefaultBrowserPromoShortDelay), nullptr}, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 454 | }; |
| 455 | |
Chris Lu | c9a5cb1 | 2022-07-20 16:11:39 | [diff] [blame] | 456 | const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsers[] = { |
Chris Lu | 85e8cc64 | 2022-09-23 20:27:58 | [diff] [blame^] | 457 | {kTrendingQueriesHideShortcutsParam, "false"}}; |
Chris Lu | c9a5cb1 | 2022-07-20 16:11:39 | [diff] [blame] | 458 | const FeatureEntry::FeatureParam kTrendingQueriesEnableAllUsersHideShortcuts[] = |
Chris Lu | 85e8cc64 | 2022-09-23 20:27:58 | [diff] [blame^] | 459 | {{kTrendingQueriesHideShortcutsParam, "true"}}; |
Chris Lu | c9a5cb1 | 2022-07-20 16:11:39 | [diff] [blame] | 460 | const FeatureEntry::FeatureParam kTrendingQueriesEnableFeedDisabled[] = { |
| 461 | {kTrendingQueriesHideShortcutsParam, "false"}, |
| 462 | {kTrendingQueriesDisabledFeedParam, "true"}, |
Chris Lu | 85e8cc64 | 2022-09-23 20:27:58 | [diff] [blame^] | 463 | }; |
Chris Lu | c9a5cb1 | 2022-07-20 16:11:39 | [diff] [blame] | 464 | |
| 465 | const FeatureEntry::FeatureVariation kTrendingQueriesModuleVariations[] = { |
| 466 | {"Enabled All Users", kTrendingQueriesEnableAllUsers, |
| 467 | std::size(kTrendingQueriesEnableAllUsers), nullptr}, |
| 468 | {"Enabled All Users Hide Shortcuts", |
| 469 | kTrendingQueriesEnableAllUsersHideShortcuts, |
| 470 | std::size(kTrendingQueriesEnableAllUsersHideShortcuts), nullptr}, |
| 471 | {"Enabled Disabled Feed", kTrendingQueriesEnableFeedDisabled, |
| 472 | std::size(kTrendingQueriesEnableFeedDisabled), nullptr}, |
Chris Lu | c9a5cb1 | 2022-07-20 16:11:39 | [diff] [blame] | 473 | }; |
| 474 | |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 475 | const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = { |
| 476 | {kNewMobileIdentityConsistencyFREParam, |
| 477 | kNewMobileIdentityConsistencyFREParamUMADialog}}; |
Jérôme Lebel | 95010c2f | 2022-09-21 11:19:56 | [diff] [blame] | 478 | const FeatureEntry::FeatureParam kNewMICEFREWithTangibleSync[] = { |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 479 | {kNewMobileIdentityConsistencyFREParam, |
Jérôme Lebel | 95010c2f | 2022-09-21 11:19:56 | [diff] [blame] | 480 | kNewMobileIdentityConsistencyFREParamTangibleSync}}; |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 481 | const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = { |
| 482 | {kNewMobileIdentityConsistencyFREParam, |
| 483 | kNewMobileIdentityConsistencyFREParamTwoSteps}}; |
| 484 | const FeatureEntry::FeatureVariation |
| 485 | kNewMobileIdentityConsistencyFREVariations[] = { |
| 486 | {"New FRE with UMA dialog", kNewMICEFREWithUMADialog, |
| 487 | std::size(kNewMICEFREWithUMADialog), nullptr}, |
Jérôme Lebel | 95010c2f | 2022-09-21 11:19:56 | [diff] [blame] | 488 | {"new FRE with tangible sync", kNewMICEFREWithTangibleSync, |
| 489 | std::size(kNewMICEFREWithTangibleSync), nullptr}, |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 490 | {"new FRE with 2 steps", kNewMICEFREWithTwoSteps, |
| 491 | std::size(kNewMICEFREWithTwoSteps), nullptr}}; |
| 492 | |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 493 | const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = { |
| 494 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}}; |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 495 | const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = { |
| 496 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}}; |
| 497 | const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = { |
| 498 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}}; |
| 499 | const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = { |
| 500 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}}; |
| 501 | const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = { |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 502 | {"Target Highlight", kBubbleRichIPHTargetHighlight, |
| 503 | std::size(kBubbleRichIPHTargetHighlight), nullptr}, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 504 | {"Explicit dismissal", kBubbleRichIPHExplicitDismissal, |
| 505 | std::size(kBubbleRichIPHExplicitDismissal), nullptr}, |
| 506 | {"Dismissal and rich content", kBubbleRichIPHRich, |
| 507 | std::size(kBubbleRichIPHRich), nullptr}, |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 508 | {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 509 | std::size(kBubbleRichIPHRichWithSnooze), nullptr}, |
| 510 | }; |
| 511 | |
Christian Xu | bdedabec | 2022-07-04 10:00:13 | [diff] [blame] | 512 | const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueIconCapsule[] = { |
| 513 | {kOmniboxPasteButtonParameterName, |
| 514 | kOmniboxPasteButtonParameterBlueIconCapsule}}; |
| 515 | const FeatureEntry::FeatureParam kOmniboxPasteButtonBlueFullCapsule[] = { |
| 516 | {kOmniboxPasteButtonParameterName, |
| 517 | kOmniboxPasteButtonParameterBlueFullCapsule}}; |
| 518 | const FeatureEntry::FeatureVariation kOmniboxPasteButtonVariations[] = { |
| 519 | {"Icon only", kOmniboxPasteButtonBlueIconCapsule, |
| 520 | std::size(kOmniboxPasteButtonBlueIconCapsule), nullptr}, |
| 521 | {"Icon and text", kOmniboxPasteButtonBlueFullCapsule, |
| 522 | std::size(kOmniboxPasteButtonBlueFullCapsule), nullptr}, |
| 523 | }; |
| 524 | |
Gauthier Ambard | 30ad9ca | 2022-06-09 14:15:26 | [diff] [blame] | 525 | const FeatureEntry::FeatureParam kPopupMenuBookmarkStringAddABookmark[] = { |
| 526 | {kPopupMenuBookmarkStringParamName, |
| 527 | kPopupMenuBookmarkStringParamAddABookmark}}; |
| 528 | const FeatureEntry::FeatureParam kPopupMenuBookmarkStringAddToBookmarks[] = { |
| 529 | {kPopupMenuBookmarkStringParamName, |
| 530 | kPopupMenuBookmarkStringParamAddToBookmarks}}; |
| 531 | const FeatureEntry::FeatureParam kPopupMenuBookmarkStringBookmarkThisPage[] = { |
| 532 | {kPopupMenuBookmarkStringParamName, |
| 533 | kPopupMenuBookmarkStringParamBookmarkThisPage}}; |
| 534 | |
| 535 | const FeatureEntry::FeatureVariation kPopupMenuBookmarkStringVarations[] = { |
| 536 | {"(Add A Bookmark)", kPopupMenuBookmarkStringAddABookmark, |
| 537 | std::size(kPopupMenuBookmarkStringAddABookmark), nullptr}, |
| 538 | {"(Add To Bookmarks)", kPopupMenuBookmarkStringAddToBookmarks, |
| 539 | std::size(kPopupMenuBookmarkStringAddToBookmarks), nullptr}, |
| 540 | {"(Bookmark This Page)", kPopupMenuBookmarkStringBookmarkThisPage, |
| 541 | std::size(kPopupMenuBookmarkStringBookmarkThisPage), nullptr}}; |
| 542 | |
Igor Ruvinov | 44fed9f | 2022-06-10 22:51:42 | [diff] [blame] | 543 | const FeatureEntry::FeatureParam kDmTokenDeletionParam[] = {{"forced", "true"}}; |
| 544 | const FeatureEntry::FeatureVariation kDmTokenDeletionVariation[] = { |
| 545 | {"(Forced)", kDmTokenDeletionParam, std::size(kDmTokenDeletionParam), |
| 546 | nullptr}}; |
| 547 | |
Aliona DANGLA | a5257ccc | 2022-08-29 14:01:49 | [diff] [blame] | 548 | const FeatureEntry::FeatureParam kOpenInDownloadWithWKDownload[] = { |
| 549 | {kOpenInDownloadWithWKDownloadParam, "true"}}; |
| 550 | const FeatureEntry::FeatureParam kOpenInDownloadWithV2[] = { |
| 551 | {kOpenInDownloadWithV2Param, "true"}}; |
| 552 | const FeatureEntry::FeatureVariation kOpenInDownloadVariations[] = { |
| 553 | {"With WKDownload", kOpenInDownloadWithWKDownload, |
| 554 | std::size(kOpenInDownloadWithWKDownload), nullptr}, |
| 555 | {"With V2", kOpenInDownloadWithV2, std::size(kOpenInDownloadWithV2), |
| 556 | nullptr}, |
| 557 | }; |
| 558 | |
ginnnnnnny | 591a497 | 2022-09-01 16:10:27 | [diff] [blame] | 559 | const FeatureEntry::FeatureParam kAutofillBrandingIOSMonotone[] = { |
| 560 | {autofill::features::kAutofillBrandingIOSParam, "true"}}; |
| 561 | const FeatureEntry::FeatureVariation kAutofillBrandingIOSVariations[] = { |
| 562 | {"(Monotone)", kAutofillBrandingIOSMonotone, |
| 563 | std::size(kAutofillBrandingIOSMonotone), nullptr}}; |
| 564 | |
Scott Yoder | cb2fe63 | 2022-09-12 15:28:35 | [diff] [blame] | 565 | const FeatureEntry::FeatureParam kIOSNewPostRestoreExperienceMinimal[] = { |
Benjamin Williams | 3d3a2ec | 2022-09-13 20:01:26 | [diff] [blame] | 566 | {post_restore_signin::features::kIOSNewPostRestoreExperienceParam, "true"}}; |
Scott Yoder | cb2fe63 | 2022-09-12 15:28:35 | [diff] [blame] | 567 | const FeatureEntry::FeatureVariation kIOSNewPostRestoreExperienceVariations[] = |
| 568 | {{"minimal", kIOSNewPostRestoreExperienceMinimal, |
| 569 | std::size(kIOSNewPostRestoreExperienceMinimal), nullptr}}; |
| 570 | |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 571 | // To add a new entry, add to the end of kFeatureEntries. There are four |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 572 | // distinct types of entries: |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 573 | // . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the |
| 574 | // default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 575 | // macro for this type supplying the command line to the macro. |
| 576 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 577 | // deactivated state for this lab (i.e. no command line option). To specify |
| 578 | // this type of entry use the macro MULTI_VALUE_TYPE supplying it the |
| 579 | // array of choices. |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 580 | // . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is |
| 581 | // either enabled, disabled, or uses the default value of the associated |
| 582 | // base::Feature instance. To specify this type of entry use the macro |
| 583 | // FEATURE_VALUE_TYPE supplying it the base::Feature instance. |
| 584 | // . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a |
| 585 | // base::Feature instance. Choices corresponding to the default state, a |
| 586 | // universally enabled state, and a universally disabled state are |
| 587 | // automatically included. To specify this type of entry use the macro |
| 588 | // FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and |
| 589 | // the array of choices. |
| 590 | // |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 591 | // See the documentation of FeatureEntry for details on the fields. |
| 592 | // |
| 593 | // When adding a new choice, add it to the end of the list. |
| 594 | const flags_ui::FeatureEntry kFeatureEntries[] = { |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 595 | {"in-product-help-demo-mode-choice", |
| 596 | flag_descriptions::kInProductHelpDemoModeName, |
| 597 | flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos, |
| 598 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
Tommy Nyquist | c1d6dea1 | 2017-07-26 20:37:23 | [diff] [blame] | 599 | feature_engagement::kIPHDemoMode, |
| 600 | feature_engagement::kIPHDemoModeChoiceVariations, |
Marc Treib | 2752e8b | 2017-08-04 14:12:09 | [diff] [blame] | 601 | "IPH_DemoMode")}, |
Moe Ahmadi | c3fd7cd | 2018-05-11 21:40:22 | [diff] [blame] | 602 | {"enable-autofill-credit-card-upload", |
| 603 | flag_descriptions::kAutofillCreditCardUploadName, |
| 604 | flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos, |
Anne Lim | 579b573 | 2018-08-30 18:24:24 | [diff] [blame] | 605 | FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)}, |
Tina Wang | 41d431c | 2021-06-21 21:04:13 | [diff] [blame] | 606 | {"enable-discover-feed-preview", |
| 607 | flag_descriptions::kEnableDiscoverFeedPreviewName, |
| 608 | flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos, |
| 609 | FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)}, |
Moe Ahmadi | d6d5d17 | 2018-06-20 17:20:23 | [diff] [blame] | 610 | {"use-sync-sandbox", flag_descriptions::kSyncSandboxName, |
| 611 | flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos, |
| 612 | SINGLE_VALUE_TYPE_AND_VALUE( |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 613 | syncer::kSyncServiceURL, |
Moe Ahmadi | d6d5d17 | 2018-06-20 17:20:23 | [diff] [blame] | 614 | "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")}, |
| 615 | {"wallet-service-use-sandbox", |
| 616 | flag_descriptions::kWalletServiceUseSandboxName, |
| 617 | flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos, |
| 618 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 619 | autofill::switches::kWalletServiceUseSandbox, |
| 620 | "1", |
| 621 | autofill::switches::kWalletServiceUseSandbox, |
| 622 | "0")}, |
Mohamad Ahmadi | c4df81f | 2017-12-20 04:41:59 | [diff] [blame] | 623 | {"show-autofill-type-predictions", |
| 624 | flag_descriptions::kShowAutofillTypePredictionsName, |
| 625 | flag_descriptions::kShowAutofillTypePredictionsDescription, |
| 626 | flags_ui::kOsIos, |
Gauthier Ambard | cfd8518 | 2018-01-05 10:37:46 | [diff] [blame] | 627 | FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)}, |
Olivier Robin | 3d6041162 | 2018-02-23 10:03:22 | [diff] [blame] | 628 | {"autofill-ios-delay-between-fields", |
| 629 | flag_descriptions::kAutofillIOSDelayBetweenFieldsName, |
| 630 | flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription, |
| 631 | flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)}, |
Benjamin Williams | 14233d7 | 2022-07-26 18:32:20 | [diff] [blame] | 632 | {"fullscreen-promos-manager", |
| 633 | flag_descriptions::kFullscreenPromosManagerName, |
| 634 | flag_descriptions::kFullscreenPromosManagerDescription, flags_ui::kOsIos, |
| 635 | FEATURE_VALUE_TYPE(kFullscreenPromosManager)}, |
Kurt Horimoto | dc33af3 | 2018-05-01 01:39:14 | [diff] [blame] | 636 | {"fullscreen-viewport-adjustment-experiment", |
Chris Lu | 481a932 | 2019-09-25 22:16:53 | [diff] [blame] | 637 | flag_descriptions::kFullscreenSmoothScrollingName, |
| 638 | flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos, |
| 639 | FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)}, |
Robbie Gibson | 1f37a5e | 2020-08-06 17:03:06 | [diff] [blame] | 640 | {"webpage-default-zoom-from-dynamic-type", |
| 641 | flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName, |
| 642 | flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription, |
| 643 | flags_ui::kOsIos, |
| 644 | FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)}, |
Robbie Gibson | 88f2396 | 2020-09-28 14:35:56 | [diff] [blame] | 645 | {"webpage-alternative-text-zoom", |
| 646 | flag_descriptions::kWebPageAlternativeTextZoomName, |
| 647 | flag_descriptions::kWebPageAlternativeTextZoomDescription, |
| 648 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)}, |
Robbie Gibson | 1095b72c | 2022-06-06 17:03:34 | [diff] [blame] | 649 | {"webpage-text-zoom-ipad", flag_descriptions::kWebPageTextZoomIPadName, |
| 650 | flag_descriptions::kWebPageTextZoomIPadDescription, flags_ui::kOsIos, |
| 651 | FEATURE_VALUE_TYPE(web::kWebPageTextZoomIPad)}, |
Kurt Horimoto | 79d590b | 2018-09-12 19:09:28 | [diff] [blame] | 652 | {"toolbar-container", flag_descriptions::kToolbarContainerName, |
| 653 | flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos, |
| 654 | FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 655 | {"omnibox-ui-max-autocomplete-matches", |
| 656 | flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName, |
| 657 | flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription, |
| 658 | flags_ui::kOsIos, |
| 659 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 660 | omnibox::kUIExperimentMaxAutocompleteMatches, |
| 661 | kOmniboxUIMaxAutocompleteMatchesVariations, |
| 662 | "OmniboxUIMaxAutocompleteVariations")}, |
Moe Ahmadi | 01028f2 | 2022-08-06 17:57:35 | [diff] [blame] | 663 | {"omnibox-local-history-zero-suggest-beyond-ntp", |
| 664 | flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPName, |
| 665 | flag_descriptions::kOmniboxLocalHistoryZeroSuggestBeyondNTPDescription, |
| 666 | flags_ui::kOsIos, |
| 667 | FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggestBeyondNTP)}, |
Stepan Khapugin | bac467e | 2022-05-06 21:11:54 | [diff] [blame] | 668 | {"omnibox-max-zps-matches", flag_descriptions::kOmniboxMaxZPSMatchesName, |
| 669 | flag_descriptions::kOmniboxMaxZPSMatchesDescription, flags_ui::kOsIos, |
| 670 | FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kMaxZeroSuggestMatches, |
| 671 | kOmniboxMaxZPSMatchesVariations, |
| 672 | "OmniboxMaxZPSVariations")}, |
Peter Boström | 3f79857 | 2022-07-26 23:44:36 | [diff] [blame] | 673 | #if BUILDFLAG(DCHECK_IS_CONFIGURABLE) |
Justin Cohen | 20b6f07 | 2019-01-16 01:38:50 | [diff] [blame] | 674 | {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName, |
| 675 | flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos, |
| 676 | FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)}, |
Peter Boström | 3f79857 | 2022-07-26 23:44:36 | [diff] [blame] | 677 | #endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE) |
Caitlin Fischer | 43edd90a | 2019-05-01 13:24:30 | [diff] [blame] | 678 | {"autofill-use-mobile-label-disambiguation", |
| 679 | flag_descriptions::kAutofillUseMobileLabelDisambiguationName, |
| 680 | flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription, |
| 681 | flags_ui::kOsIos, |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 682 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 683 | autofill::features::kAutofillUseMobileLabelDisambiguation, |
| 684 | kAutofillUseMobileLabelDisambiguationVariations, |
| 685 | "AutofillUseMobileLabelDisambiguation")}, |
Olivier Robin | 43814bb | 2021-06-22 15:25:45 | [diff] [blame] | 686 | {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName, |
| 687 | flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos, |
| 688 | FEATURE_VALUE_TYPE(kMetrickitCrashReport)}, |
Mike Dougherty | b6c770d | 2019-09-13 22:56:46 | [diff] [blame] | 689 | {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName, |
| 690 | flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos, |
Jesse McKenna | 85c1a59f | 2021-05-05 19:08:30 | [diff] [blame] | 691 | FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)}, |
Eugene But | 2823dc7e | 2020-07-21 18:10:37 | [diff] [blame] | 692 | {"ios-synthetic-crash-reports", |
| 693 | flag_descriptions::kSyntheticCrashReportsForUteName, |
| 694 | flag_descriptions::kSyntheticCrashReportsForUteDescription, |
| 695 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)}, |
Jérôme Lebel | c374fdd | 2019-09-27 10:36:48 | [diff] [blame] | 696 | {"force-startup-signin-promo", |
| 697 | flag_descriptions::kForceStartupSigninPromoName, |
| 698 | flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos, |
Alice Wang | 345e0944 | 2021-07-05 09:03:29 | [diff] [blame] | 699 | FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)}, |
Yoichi Osato | 7ae1175 | 2021-03-16 03:27:22 | [diff] [blame] | 700 | {"restore-session-from-cache", |
| 701 | flag_descriptions::kRestoreSessionFromCacheName, |
| 702 | flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos, |
Justin Cohen | 3ec2522c | 2021-04-23 18:23:49 | [diff] [blame] | 703 | FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)}, |
sczs | 4622e6e | 2019-11-06 01:17:59 | [diff] [blame] | 704 | {"autofill-save-card-dismiss-on-navigation", |
| 705 | flag_descriptions::kAutofillSaveCardDismissOnNavigationName, |
| 706 | flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription, |
| 707 | flags_ui::kOsIos, |
| 708 | FEATURE_VALUE_TYPE( |
| 709 | autofill::features::kAutofillSaveCardDismissOnNavigation)}, |
sczs | 37d9c13 | 2020-07-18 06:06:33 | [diff] [blame] | 710 | {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName, |
adamta | 22a4d50 | 2020-05-21 03:12:21 | [diff] [blame] | 711 | flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos, |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 712 | FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp, |
| 713 | kDiscoverFeedInNtpVariations, |
| 714 | "IOSDiscoverFeed")}, |
Roberto Moura | b87b972 | 2020-06-17 17:12:09 | [diff] [blame] | 715 | {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName, |
| 716 | flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos, |
| 717 | FEATURE_VALUE_TYPE(kExpandedTabStrip)}, |
Tommy Martino | 6b4eb7e | 2020-06-25 18:25:41 | [diff] [blame] | 718 | {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName, |
| 719 | flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos, |
| 720 | FEATURE_VALUE_TYPE(kSharedHighlightingIOS)}, |
Veronique Nguyen | 6593c76 | 2021-11-30 17:28:56 | [diff] [blame] | 721 | {"enable-fre-ui-module-ios-with-options", |
| 722 | flag_descriptions::kEnableFREUIModuleIOSName, |
Tina Wang | a252ca4 | 2021-04-01 17:14:23 | [diff] [blame] | 723 | flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos, |
ginnnnnnny | 429b552 | 2022-05-05 03:50:06 | [diff] [blame] | 724 | FEATURE_VALUE_TYPE(kEnableFREUIModuleIOS)}, |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 725 | {"new-mobile-identity-consistency-fre", |
| 726 | flag_descriptions::kNewMobileIdentityConsistencyFREName, |
| 727 | flag_descriptions::kNewMobileIdentityConsistencyFREDescription, |
| 728 | flags_ui::kOsIos, |
| 729 | FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE, |
| 730 | kNewMobileIdentityConsistencyFREVariations, |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 731 | kIOSMICeAndDefaultBrowserTrialName)}, |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 732 | #if BUILDFLAG(IOS_SCREEN_TIME_ENABLED) |
edchin | 81467b8 | 2020-09-03 19:31:45 | [diff] [blame] | 733 | {"screen-time-integration-ios", |
| 734 | flag_descriptions::kScreenTimeIntegrationName, |
| 735 | flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos, |
| 736 | FEATURE_VALUE_TYPE(kScreenTimeIntegration)}, |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 737 | #endif |
Nazerke | 3e993f7 | 2020-09-21 13:00:06 | [diff] [blame] | 738 | {"modern-tab-strip", flag_descriptions::kModernTabStripName, |
| 739 | flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos, |
| 740 | FEATURE_VALUE_TYPE(kModernTabStrip)}, |
Nohemi Fernandez | 222d6d4 | 2020-09-30 20:35:57 | [diff] [blame] | 741 | {"minutes-delay-to-restore-gaia-cookies-if-deleted", |
| 742 | flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName, |
| 743 | flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription, |
| 744 | flags_ui::kOsIos, |
| 745 | MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)}, |
Eugene But | f869bff | 2020-12-10 01:16:55 | [diff] [blame] | 746 | {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName, |
| 747 | flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos, |
| 748 | FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)}, |
Chris Lu | b17195f | 2020-12-10 20:49:14 | [diff] [blame] | 749 | {"default-browser-fullscreen-promo-experiment", |
| 750 | flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName, |
| 751 | flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription, |
| 752 | flags_ui::kOsIos, |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 753 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 754 | kDefaultBrowserFullscreenPromoExperiment, |
| 755 | kDefaultBrowserFullscreenPromoExperimentVariations, |
| 756 | "IOSDefaultBrowserFullscreenPromoExperiment")}, |
Cheick Cisse | 76ade3d | 2020-12-16 00:15:11 | [diff] [blame] | 757 | {"ios-shared-highlighting-color-change", |
| 758 | flag_descriptions::kIOSSharedHighlightingColorChangeName, |
| 759 | flag_descriptions::kIOSSharedHighlightingColorChangeDescription, |
Cheick Cisse | d0b5bfe | 2021-02-11 14:23:07 | [diff] [blame] | 760 | flags_ui::kOsIos, |
| 761 | FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)}, |
Cheick Cisse | fe99486 | 2021-12-15 16:01:34 | [diff] [blame] | 762 | {"ios-shared-highlighting-v2", |
| 763 | flag_descriptions::kIOSSharedHighlightingV2Name, |
| 764 | flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos, |
| 765 | FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)}, |
Stepan Khapugin | 0434120 | 2021-01-07 12:22:45 | [diff] [blame] | 766 | {"omnibox-new-textfield-implementation", |
| 767 | flag_descriptions::kOmniboxNewImplementationName, |
| 768 | flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos, |
| 769 | FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)}, |
Stepan Khapugin | 0be8f6d | 2022-09-21 20:22:26 | [diff] [blame] | 770 | {"omnibox-on-focus-suggestions-contextual-web", |
| 771 | flag_descriptions::kOmniboxFocusTriggersContextualWebZeroSuggestName, |
| 772 | flag_descriptions:: |
| 773 | kOmniboxFocusTriggersContextualWebZeroSuggestDescription, |
| 774 | flags_ui::kOsIos, |
| 775 | FEATURE_VALUE_TYPE(omnibox::kFocusTriggersContextualWebZeroSuggest)}, |
| 776 | {"omnibox-on-focus-suggestions-srp", |
| 777 | flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestName, |
| 778 | flag_descriptions::kOmniboxFocusTriggersSRPZeroSuggestDescription, |
| 779 | flags_ui::kOsIos, |
| 780 | FEATURE_VALUE_TYPE(omnibox::kFocusTriggersSRPZeroSuggest)}, |
Stepan Khapugin | ecf128a9 | 2022-08-30 11:23:15 | [diff] [blame] | 781 | {"omnibox-fuzzy-url-suggestions", |
| 782 | flag_descriptions::kOmniboxFuzzyUrlSuggestionsName, |
| 783 | flag_descriptions::kOmniboxFuzzyUrlSuggestionsDescription, |
| 784 | flags_ui::kOsIos, |
| 785 | FEATURE_VALUE_TYPE(omnibox::kOmniboxFuzzyUrlSuggestions)}, |
Stepan Khapugin | 422f08d | 2022-02-18 16:19:44 | [diff] [blame] | 786 | {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName, |
| 787 | flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos, |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 788 | FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI, |
| 789 | kiOSOmniboxUpdatedPopupUIVariations, |
Stepan Khapugin | a45baed | 2022-05-13 19:15:43 | [diff] [blame] | 790 | "IOSOmniboxUpdatedPopupUI")}, |
gogerald | 0ff29e5 | 2021-02-03 18:56:19 | [diff] [blame] | 791 | {"start-surface", flag_descriptions::kStartSurfaceName, |
| 792 | flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos, |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 793 | FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface, |
| 794 | kStartSurfaceVariations, |
| 795 | "StartSurface")}, |
Justin Cohen | 13ac7a20 | 2021-02-04 18:27:28 | [diff] [blame] | 796 | {"ios-crashpad", flag_descriptions::kCrashpadIOSName, |
| 797 | flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos, |
| 798 | FEATURE_VALUE_TYPE(kCrashpadIOS)}, |
Vidhan Jain | 451b475 | 2021-07-15 10:16:42 | [diff] [blame] | 799 | {"autofill-address-verification-in-save-prompt", |
| 800 | flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName, |
| 801 | flag_descriptions:: |
| 802 | kEnableAutofillAddressSavePromptAddressVerificationDescription, |
| 803 | flags_ui::kOsIos, |
| 804 | FEATURE_VALUE_TYPE( |
| 805 | autofill::features:: |
| 806 | kAutofillAddressProfileSavePromptAddressVerificationSupport)}, |
Vidhan Jain | a6574155 | 2021-03-09 17:18:27 | [diff] [blame] | 807 | {"autofill-address-save-prompt", |
| 808 | flag_descriptions::kEnableAutofillAddressSavePromptName, |
| 809 | flag_descriptions::kEnableAutofillAddressSavePromptDescription, |
| 810 | flags_ui::kOsIos, |
| 811 | FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)}, |
Viktor Semeniuk | 68e794a | 2021-03-24 10:23:25 | [diff] [blame] | 812 | {"filling-across-affiliated-websites", |
| 813 | flag_descriptions::kFillingAcrossAffiliatedWebsitesName, |
| 814 | flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription, |
| 815 | flags_ui::kOsIos, |
| 816 | FEATURE_VALUE_TYPE( |
| 817 | password_manager::features::kFillingAcrossAffiliatedWebsites)}, |
Jared Saul | d47c2b7 | 2021-03-25 22:47:31 | [diff] [blame] | 818 | {"autofill-parse-merchant-promo-code-fields", |
| 819 | flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName, |
| 820 | flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription, |
| 821 | flags_ui::kOsIos, |
| 822 | FEATURE_VALUE_TYPE( |
| 823 | autofill::features::kAutofillParseMerchantPromoCodeFields)}, |
edchin | 257cea2f | 2021-04-07 13:07:13 | [diff] [blame] | 824 | {"interest-feed-v2-clicks-and-views-cond-upload", |
| 825 | flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName, |
| 826 | flag_descriptions:: |
| 827 | kInterestFeedV2ClickAndViewActionsConditionalUploadDescription, |
| 828 | flags_ui::kOsIos, |
| 829 | FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)}, |
Side Yilmaz | 6c53f710 | 2021-09-07 13:26:19 | [diff] [blame] | 830 | {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName, |
| 831 | flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos, |
| 832 | FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)}, |
Side YILMAZ | 4b40a308 | 2022-04-11 10:13:33 | [diff] [blame] | 833 | {"update-history-entry-points-in-incognito", |
| 834 | flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName, |
| 835 | flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription, |
| 836 | flags_ui::kOsIos, |
| 837 | FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)}, |
jlebel | d95434d65 | 2021-06-22 10:32:48 | [diff] [blame] | 838 | {"sync-trusted-vault-passphrase-ios-rpc", |
| 839 | flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName, |
| 840 | flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription, |
| 841 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 842 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)}, |
Mikel Astiz | 850b0fe | 2021-06-16 09:47:27 | [diff] [blame] | 843 | {"sync-trusted-vault-passphrase-promo", |
| 844 | flag_descriptions::kSyncTrustedVaultPassphrasePromoName, |
| 845 | flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription, |
| 846 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 847 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)}, |
Mikel Astiz | 850b0fe | 2021-06-16 09:47:27 | [diff] [blame] | 848 | {"sync-trusted-vault-passphrase-recovery", |
| 849 | flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName, |
| 850 | flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription, |
| 851 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 852 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)}, |
Nohemi Fernandez | c00842a | 2021-07-26 11:47:34 | [diff] [blame] | 853 | {"wait-threshold-seconds-for-capabilities-api", |
| 854 | flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName, |
| 855 | flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription, |
| 856 | flags_ui::kOsIos, |
| 857 | MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)}, |
Jared Saul | 2188f76 | 2021-08-02 21:22:23 | [diff] [blame] | 858 | {"autofill-fill-merchant-promo-code-fields", |
| 859 | flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName, |
| 860 | flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription, |
| 861 | flags_ui::kOsIos, |
| 862 | FEATURE_VALUE_TYPE( |
| 863 | autofill::features::kAutofillFillMerchantPromoCodeFields)}, |
Sylvain Defresne | dff67e4 | 2021-09-24 09:43:03 | [diff] [blame] | 864 | {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName, |
| 865 | flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos, |
| 866 | FEATURE_VALUE_TYPE(kNewOverflowMenu)}, |
Robbie Gibson | df097a7 | 2022-09-05 08:17:18 | [diff] [blame] | 867 | {"new-overflow-menu-alternate-iph", |
| 868 | flag_descriptions::kNewOverflowMenuAlternateIPHName, |
| 869 | flag_descriptions::kNewOverflowMenuAlternateIPHDescription, |
| 870 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuAlternateIPH)}, |
Robbie Gibson | fe748e5 | 2022-05-09 18:20:46 | [diff] [blame] | 871 | {"new-overflow-menu-settings-action", |
| 872 | flag_descriptions::kNewOverflowMenuSettingsActionName, |
Robbie Gibson | e2ad563 | 2022-05-16 20:46:10 | [diff] [blame] | 873 | flag_descriptions::kNewOverflowMenuSettingsActionDescription, |
| 874 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuSettingsAction)}, |
| 875 | {"new-overflow-menu-simple-destination-icons", |
| 876 | flag_descriptions::kNewOverflowMenuSimpleDestinationIconsName, |
| 877 | flag_descriptions::kNewOverflowMenuSimpleDestinationIconsDescription, |
| 878 | flags_ui::kOsIos, |
| 879 | FEATURE_VALUE_TYPE(kNewOverflowMenuSimpleDestinationIcons)}, |
Robbie Gibson | 640bccb3 | 2022-05-10 18:43:35 | [diff] [blame] | 880 | {"new-overflow-menu-cbd-action", |
| 881 | flag_descriptions::kNewOverflowMenuCBDActionName, |
| 882 | flag_descriptions::kNewOverflowMenuCBDActionDescription, flags_ui::kOsIos, |
| 883 | FEATURE_VALUE_TYPE(kNewOverflowMenuCBDAction)}, |
Evan Bernstein | 0a85f33 | 2021-09-29 19:07:24 | [diff] [blame] | 884 | {"use-lens-to-search-for-image", |
| 885 | flag_descriptions::kUseLensToSearchForImageName, |
| 886 | flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos, |
Ali Juma | 02a9b7b | 2021-10-01 13:44:44 | [diff] [blame] | 887 | FEATURE_VALUE_TYPE(kUseLensToSearchForImage)}, |
Jason Hu | 3830a07 | 2022-08-19 20:56:22 | [diff] [blame] | 888 | {"enable-lens-in-home-screen-widget", |
| 889 | flag_descriptions::kEnableLensInHomeScreenWidgetName, |
| 890 | flag_descriptions::kEnableLensInHomeScreenWidgetDescription, |
| 891 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableLensInHomeScreenWidget)}, |
| 892 | {"enable-lens-in-keyboard", flag_descriptions::kEnableLensInKeyboardName, |
| 893 | flag_descriptions::kEnableLensInKeyboardDescription, flags_ui::kOsIos, |
| 894 | FEATURE_VALUE_TYPE(kEnableLensInKeyboard)}, |
| 895 | {"enable-lens-in-ntp", flag_descriptions::kEnableLensInNTPName, |
| 896 | flag_descriptions::kEnableLensInNTPDescription, flags_ui::kOsIos, |
| 897 | FEATURE_VALUE_TYPE(kEnableLensInNTP)}, |
Benjamin Williams | bee6ab6 | 2022-02-28 18:09:40 | [diff] [blame] | 898 | {"use-load-simulated-request-for-error-page-navigation", |
Gauthier Ambard | 33cceaf | 2022-05-05 14:00:23 | [diff] [blame] | 899 | flag_descriptions::kUseLoadSimulatedRequestForOfflinePageName, |
| 900 | flag_descriptions::kUseLoadSimulatedRequestForOfflinePageDescription, |
Benjamin Williams | bee6ab6 | 2022-02-28 18:09:40 | [diff] [blame] | 901 | flags_ui::kOsIos, |
Gauthier Ambard | 33cceaf | 2022-05-05 14:00:23 | [diff] [blame] | 902 | FEATURE_VALUE_TYPE(web::features::kUseLoadSimulatedRequestForOfflinePage)}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 903 | {"enable-discover-feed-static-resource-serving", |
| 904 | flag_descriptions::kEnableDiscoverFeedStaticResourceServingName, |
| 905 | flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription, |
| 906 | flags_ui::kOsIos, |
| 907 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 908 | kEnableDiscoverFeedStaticResourceServing, |
| 909 | kEnableDiscoverFeedStaticResourceServingVariations, |
| 910 | "IOSDiscoverFeedStaticResourceServing")}, |
| 911 | {"enable-disco-feed-endpoint", |
| 912 | flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName, |
| 913 | flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription, |
| 914 | flags_ui::kOsIos, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 915 | FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)}, |
Mohammad Refaat | ab6bee6 | 2022-05-16 16:31:15 | [diff] [blame] | 916 | {"enable-discover-feed-top-sync-promo", |
| 917 | flag_descriptions::kEnableDiscoverFeedTopSyncPromoName, |
| 918 | flag_descriptions::kEnableDiscoverFeedTopSyncPromoDescription, |
| 919 | flags_ui::kOsIos, |
| 920 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo, |
| 921 | kDiscoverFeedTopSyncPromoVariations, |
| 922 | "EnableDiscoverFeedTopSyncPromo")}, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 923 | {"enable-fre-default-browser-screen-testing", |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 924 | flag_descriptions::kEnableFREDefaultBrowserPromoScreenName, |
| 925 | flag_descriptions::kEnableFREDefaultBrowserPromoScreenDescription, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 926 | flags_ui::kOsIos, |
ginnnnnnny | 4643513 | 2022-06-01 16:06:04 | [diff] [blame] | 927 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserPromoScreen, |
| 928 | kFREDefaultBrowserPromoVariations, |
| 929 | kIOSMICeAndDefaultBrowserTrialName)}, |
Tommy Martino | 7393d76 | 2021-10-12 17:59:28 | [diff] [blame] | 930 | {"shared-highlighting-amp", |
| 931 | flag_descriptions::kIOSSharedHighlightingAmpName, |
| 932 | flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos, |
| 933 | FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)}, |
David Maunder | f4a5e1e | 2021-10-18 17:24:28 | [diff] [blame] | 934 | {"enable-commerce-price-tracking", |
Matt Jones | 125dfb4 | 2022-02-11 17:23:42 | [diff] [blame] | 935 | commerce::flag_descriptions::kCommercePriceTrackingName, |
| 936 | commerce::flag_descriptions::kCommercePriceTrackingDescription, |
| 937 | flags_ui::kOsIos, |
| 938 | FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking, |
| 939 | commerce::kCommercePriceTrackingVariations, |
adamta | 67b6c581 | 2021-10-19 17:02:15 | [diff] [blame] | 940 | "CommercePriceTracking")}, |
Tina Wang | 8058d5f | 2021-11-04 20:06:06 | [diff] [blame] | 941 | {"web-feed-ios", flag_descriptions::kEnableWebChannelsName, |
| 942 | flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos, |
| 943 | FEATURE_VALUE_TYPE(kEnableWebChannels)}, |
adamta | 3933159 | 2021-11-01 20:18:54 | [diff] [blame] | 944 | {"ntp-view-hierarchy-repair", |
| 945 | flag_descriptions::kNTPViewHierarchyRepairName, |
| 946 | flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos, |
| 947 | FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)}, |
Justin Cohen | 69cec68 | 2021-11-04 20:10:26 | [diff] [blame] | 948 | {"synthesized-restore-session", |
| 949 | flag_descriptions::kSynthesizedRestoreSessionName, |
| 950 | flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos, |
| 951 | FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)}, |
Benjamin Williams | 0e7e2fb | 2021-11-17 03:03:41 | [diff] [blame] | 952 | {"enable-password-manager-branding-update", |
| 953 | flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName, |
| 954 | flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription, |
| 955 | flags_ui::kOsIos, |
Aliona DANGLA | e5b0b6e5 | 2021-11-30 11:58:19 | [diff] [blame] | 956 | FEATURE_VALUE_TYPE( |
| 957 | password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)}, |
ginnnnnnny | ee3036e | 2022-08-12 18:01:18 | [diff] [blame] | 958 | {"ios-media-permissions-control", |
| 959 | flag_descriptions::kMediaPermissionsControlName, |
| 960 | flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos, |
| 961 | FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)}, |
Olivier Robin | 3a957df | 2021-12-21 18:04:34 | [diff] [blame] | 962 | {"enable-save-session-tabs-in-separate-files", |
| 963 | flag_descriptions::kSaveSessionTabsToSeparateFilesName, |
| 964 | flag_descriptions::kSaveSessionTabsToSeparateFilesDescription, |
| 965 | flags_ui::kOsIos, |
| 966 | FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)}, |
Ewann | 8c7aadc | 2022-05-19 15:41:05 | [diff] [blame] | 967 | {"use-sf-symbols", flag_descriptions::kUseSFSymbolsName, |
| 968 | flag_descriptions::kUseSFSymbolsDescription, flags_ui::kOsIos, |
| 969 | FEATURE_VALUE_TYPE(kUseSFSymbols)}, |
Nohemi Fernandez | 76f5480 | 2022-01-10 18:23:32 | [diff] [blame] | 970 | {"enable-unicorn-account-support", |
| 971 | flag_descriptions::kEnableUnicornAccountSupportName, |
| 972 | flag_descriptions::kEnableUnicornAccountSupportDescription, |
| 973 | flags_ui::kOsIos, |
| 974 | FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)}, |
David Jean | c2b88ab60 | 2022-08-08 14:52:51 | [diff] [blame] | 975 | {"ios-webpage-intent-annotations", |
| 976 | flag_descriptions::kEnableWebPageAnnotationsName, |
| 977 | flag_descriptions::kEnableWebPageAnnotationsDescription, flags_ui::kOsIos, |
| 978 | FEATURE_VALUE_TYPE(web::features::kEnableWebPageAnnotations)}, |
Veronique Nguyen | 00ba26ea | 2022-02-25 14:57:17 | [diff] [blame] | 979 | {"enable-favicon-passwords", |
| 980 | flag_descriptions::kEnableFaviconForPasswordsName, |
| 981 | flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos, |
| 982 | FEATURE_VALUE_TYPE( |
| 983 | password_manager::features::kEnableFaviconForPasswords)}, |
Veronique Nguyen | 11f8c9f | 2022-09-12 16:51:26 | [diff] [blame] | 984 | {"enable-password-grouping", flag_descriptions::kPasswordsGroupingName, |
| 985 | flag_descriptions::kPasswordsGroupingDescription, flags_ui::kOsIos, |
| 986 | FEATURE_VALUE_TYPE(password_manager::features::kPasswordsGrouping)}, |
Shivani Chauhan | bf97b0d | 2022-02-08 22:21:28 | [diff] [blame] | 987 | {"autofill-enable-sending-bcn-in-get-upload-details", |
| 988 | flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName, |
| 989 | flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription, |
| 990 | flags_ui::kOsIos, |
| 991 | FEATURE_VALUE_TYPE( |
| 992 | autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)}, |
Ali Juma | 1429cf8a | 2022-02-09 15:31:01 | [diff] [blame] | 993 | {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName, |
| 994 | flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos, |
| 995 | FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)}, |
Joemer Ramos | 3417573 | 2022-02-14 18:59:16 | [diff] [blame] | 996 | {"enable-enhanced-safe-browsing", |
| 997 | flag_descriptions::kEnhancedProtectionName, |
| 998 | flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos, |
| 999 | FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)}, |
Joemer Ramos | 26e2b51 | 2022-05-24 17:26:41 | [diff] [blame] | 1000 | {"enable-enhanced-safe-browsing-phase-2", |
| 1001 | flag_descriptions::kEnhancedProtectionPhase2Name, |
| 1002 | flag_descriptions::kEnhancedProtectionPhase2Description, flags_ui::kOsIos, |
| 1003 | FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtectionPhase2IOS)}, |
Joemer Ramos | c34a30a0 | 2022-09-22 15:18:43 | [diff] [blame] | 1004 | {"enable-tailored-security-integration", |
| 1005 | flag_descriptions::kTailoredSecurityIntegrationName, |
| 1006 | flag_descriptions::kTailoredSecurityIntegrationDescription, |
| 1007 | flags_ui::kOsIos, |
| 1008 | FEATURE_VALUE_TYPE(safe_browsing::kTailoredSecurityIntegration)}, |
Shivani Chauhan | af1eb74d | 2022-02-11 21:13:19 | [diff] [blame] | 1009 | {"autofill-enable-unmask-card-request-set-instrument-id", |
| 1010 | flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName, |
| 1011 | flag_descriptions:: |
| 1012 | kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription, |
| 1013 | flags_ui::kOsIos, |
| 1014 | FEATURE_VALUE_TYPE( |
| 1015 | autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)}, |
Vishwas Uppoor | 89303a9 | 2022-08-03 00:56:26 | [diff] [blame] | 1016 | {"autofill-enable-card-product-name", |
| 1017 | flag_descriptions::kAutofillEnableCardProductNameName, |
| 1018 | flag_descriptions::kAutofillEnableCardProductNameDescription, |
| 1019 | flags_ui::kOsIos, |
| 1020 | FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardProductName)}, |
Victor Hugo Vianna Silva | f0a4400 | 2022-02-16 10:38:00 | [diff] [blame] | 1021 | {"send-tab-to-self-signin-promo", |
| 1022 | flag_descriptions::kSendTabToSelfSigninPromoName, |
| 1023 | flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos, |
| 1024 | FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)}, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 1025 | {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName, |
| 1026 | flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos, |
| 1027 | FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH, |
| 1028 | kBubbleRichIPHVariations, |
| 1029 | "BubbleRichIPH")}, |
Siyu An | ff02e74 | 2022-04-07 19:08:22 | [diff] [blame] | 1030 | {"autofill-enforce-delays-in-strike-database", |
| 1031 | flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName, |
| 1032 | flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription, |
| 1033 | flags_ui::kOsIos, |
| 1034 | FEATURE_VALUE_TYPE( |
| 1035 | autofill::features::kAutofillEnforceDelaysInStrikeDatabase)}, |
Jared Saul | b0473bd | 2022-04-20 00:03:41 | [diff] [blame] | 1036 | {"autofill-upstream-allow-additional-email-domains", |
| 1037 | flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName, |
| 1038 | flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription, |
| 1039 | flags_ui::kOsIos, |
| 1040 | FEATURE_VALUE_TYPE( |
| 1041 | autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)}, |
| 1042 | {"autofill-upstream-allow-all-email-domains", |
| 1043 | flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName, |
| 1044 | flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription, |
| 1045 | flags_ui::kOsIos, |
| 1046 | FEATURE_VALUE_TYPE( |
| 1047 | autofill::features::kAutofillUpstreamAllowAllEmailDomains)}, |
Olivier Robin | ffe767c | 2022-04-21 13:13:23 | [diff] [blame] | 1048 | {"enable-tflite-language-detection", |
| 1049 | flag_descriptions::kTFLiteLanguageDetectionName, |
| 1050 | flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos, |
| 1051 | FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)}, |
Raj T | a921ffc | 2022-08-25 19:00:20 | [diff] [blame] | 1052 | {"optimization-guide-debug-logs", |
| 1053 | flag_descriptions::kOptimizationGuideDebugLogsName, |
| 1054 | flag_descriptions::kOptimizationGuideDebugLogsDescription, |
| 1055 | flags_ui::kOsIos, |
| 1056 | SINGLE_VALUE_TYPE(optimization_guide::switches::kDebugLoggingEnabled)}, |
Olivier Robin | ffe767c | 2022-04-21 13:13:23 | [diff] [blame] | 1057 | {"optimization-guide-model-downloading", |
| 1058 | flag_descriptions::kOptimizationGuideModelDownloadingName, |
| 1059 | flag_descriptions::kOptimizationGuideModelDownloadingDescription, |
| 1060 | flags_ui::kOsIos, |
| 1061 | FEATURE_VALUE_TYPE( |
| 1062 | optimization_guide::features::kOptimizationGuideModelDownloading)}, |
| 1063 | {"optimization-target-prediction", |
| 1064 | flag_descriptions::kOptimizationTargetPredictionName, |
| 1065 | flag_descriptions::kOptimizationTargetPredictionDescription, |
| 1066 | flags_ui::kOsIos, |
| 1067 | FEATURE_VALUE_TYPE( |
| 1068 | optimization_guide::features::kOptimizationTargetPrediction)}, |
Rushan Suleymanov | 72730960 | 2022-04-28 20:08:54 | [diff] [blame] | 1069 | {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName, |
| 1070 | flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos, |
| 1071 | FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)}, |
| 1072 | {"sync-standalone-invalidations-wallet-and-offer", |
| 1073 | flag_descriptions::kSyncInvalidationsWalletAndOfferName, |
| 1074 | flag_descriptions::kSyncInvalidationsWalletAndOfferDescription, |
| 1075 | flags_ui::kOsIos, |
| 1076 | FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)}, |
Christian Xu | b8c06cd | 2022-04-29 20:55:01 | [diff] [blame] | 1077 | {"suggestions-scrolling-ipad", |
| 1078 | flag_descriptions::kEnableSuggestionsScrollingOnIPadName, |
| 1079 | flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription, |
| 1080 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)}, |
David Jean | 7a8fa70 | 2022-05-02 15:21:22 | [diff] [blame] | 1081 | {"experience-kit-calendar", flag_descriptions::kCalendarExperienceKitName, |
| 1082 | flag_descriptions::kCalendarExperienceKitDescription, flags_ui::kOsIos, |
| 1083 | FEATURE_VALUE_TYPE(kCalendarExperienceKit)}, |
Zhixiang Teoh | 82d17bb | 2022-06-16 21:00:39 | [diff] [blame] | 1084 | {"enable-expkit-calendar-text-classifier", |
| 1085 | flag_descriptions::kEnableExpKitCalendarTextClassifierName, |
| 1086 | flag_descriptions::kEnableExpKitCalendarTextClassifierDescription, |
| 1087 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableExpKitCalendarTextClassifier)}, |
Elmehdi Rahmaoui | 9d4ce40c6 | 2022-08-05 15:31:18 | [diff] [blame] | 1088 | {"experience-kit-maps", flag_descriptions::kMapsExperienceKitName, |
| 1089 | flag_descriptions::kMapsExperienceKitDescription, flags_ui::kOsIos, |
| 1090 | FEATURE_VALUE_TYPE(kMapsExperienceKit)}, |
Mustafa Emre Acer | 4de8863a | 2022-05-03 22:17:01 | [diff] [blame] | 1091 | {"https-only-mode", flag_descriptions::kHttpsOnlyModeName, |
| 1092 | flag_descriptions::kHttpsOnlyModeDescription, flags_ui::kOsIos, |
| 1093 | FEATURE_VALUE_TYPE(security_interstitials::features::kHttpsOnlyMode)}, |
Mustafa Emre Acer | b8bb01f | 2022-07-20 19:43:25 | [diff] [blame] | 1094 | {"omnibox-https-upgrades", flag_descriptions::kOmniboxHttpsUpgradesName, |
| 1095 | flag_descriptions::kOmniboxHttpsUpgradesDescription, flags_ui::kOsIos, |
| 1096 | FEATURE_VALUE_TYPE(omnibox::kDefaultTypedNavigationsToHttps)}, |
Benjamin Williams | 419c81e | 2022-05-04 18:33:22 | [diff] [blame] | 1097 | {"smart-sorting-new-overflow-menu", |
| 1098 | flag_descriptions::kSmartSortingNewOverflowMenuName, |
| 1099 | flag_descriptions::kSmartSortingNewOverflowMenuDescription, |
| 1100 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSmartSortingNewOverflowMenu)}, |
Scott Yoder | 1049356 | 2022-06-28 17:37:44 | [diff] [blame] | 1101 | {"new-overflow-menu-share-chrome-action", |
| 1102 | flag_descriptions::kNewOverflowMenuShareChromeActionName, |
| 1103 | flag_descriptions::kNewOverflowMenuShareChromeActionDescription, |
| 1104 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kNewOverflowMenuShareChromeAction)}, |
Alexander Tekle | d46a3698 | 2022-05-09 20:32:42 | [diff] [blame] | 1105 | {"autofill-enable-ranking-formula", |
| 1106 | flag_descriptions::kAutofillEnableRankingFormulaName, |
| 1107 | flag_descriptions::kAutofillEnableRankingFormulaDescription, |
| 1108 | flags_ui::kOsIos, |
| 1109 | FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableRankingFormula)}, |
Sergio Collazos | 5855871 | 2022-05-18 17:24:02 | [diff] [blame] | 1110 | {"enable-feed-ablation", flag_descriptions::kEnableFeedAblationName, |
| 1111 | flag_descriptions::kEnableFeedAblationDescription, flags_ui::kOsIos, |
| 1112 | FEATURE_VALUE_TYPE(kEnableFeedAblation)}, |
Chris Lu | 7f024ed2c | 2022-05-27 23:11:27 | [diff] [blame] | 1113 | {"content-suggestions-ui-module-refresh", |
| 1114 | flag_descriptions::kContentSuggestionsUIModuleRefreshName, |
| 1115 | flag_descriptions::kContentSuggestionsUIModuleRefreshDescription, |
Chris Lu | 8e308dc | 2022-09-06 16:59:40 | [diff] [blame] | 1116 | flags_ui::kOsIos, |
Chris Lu | 85e8cc64 | 2022-09-23 20:27:58 | [diff] [blame^] | 1117 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 1118 | kContentSuggestionsUIModuleRefresh, |
| 1119 | kModuleRefreshVariations, |
| 1120 | kContentSuggestionsUIModuleRefreshFlagOverrideFieldTrialName)}, |
Quentin Pubert | d7546ae | 2022-05-30 14:28:57 | [diff] [blame] | 1121 | {"3p-intents-in-incognito", flag_descriptions::kIOS3PIntentsInIncognitoName, |
| 1122 | flag_descriptions::kIOS3PIntentsInIncognitoDescription, flags_ui::kOsIos, |
| 1123 | FEATURE_VALUE_TYPE(kIOS3PIntentsInIncognito)}, |
Olivier Robin | 058c1fad | 2022-05-31 18:24:06 | [diff] [blame] | 1124 | {"default-browser-intents-show-settings", |
| 1125 | flag_descriptions::kDefaultBrowserIntentsShowSettingsName, |
| 1126 | flag_descriptions::kDefaultBrowserIntentsShowSettingsDescription, |
| 1127 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDefaultBrowserIntentsShowSettings)}, |
Ed Chin | 76b1b35e | 2022-06-08 23:01:17 | [diff] [blame] | 1128 | {"enable-discover-feed-ghost-cards", |
| 1129 | flag_descriptions::kEnableDiscoverFeedGhostCardsName, |
| 1130 | flag_descriptions::kEnableDiscoverFeedGhostCardsDescription, |
| 1131 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kDiscoverFeedGhostCardsEnabled)}, |
Gauthier Ambard | 30ad9ca | 2022-06-09 14:15:26 | [diff] [blame] | 1132 | {"bookmark-string-menu", flag_descriptions::kBookmarkStringName, |
| 1133 | flag_descriptions::kBookmarkStringDescription, flags_ui::kOsIos, |
| 1134 | FEATURE_WITH_PARAMS_VALUE_TYPE(kBookmarkString, |
| 1135 | kPopupMenuBookmarkStringVarations, |
| 1136 | "BookmarkString")}, |
Igor Ruvinov | a43a66dc | 2022-06-09 21:57:45 | [diff] [blame] | 1137 | {"dm-token-deletion", flag_descriptions::kDmTokenDeletionName, |
| 1138 | flag_descriptions::kDmTokenDeletionDescription, flags_ui::kOsIos, |
Igor Ruvinov | 44fed9f | 2022-06-10 22:51:42 | [diff] [blame] | 1139 | FEATURE_WITH_PARAMS_VALUE_TYPE(policy::features::kDmTokenDeletion, |
| 1140 | kDmTokenDeletionVariation, |
| 1141 | "DmTokenDeletion")}, |
Tommy Martino | ad42be5 | 2022-06-13 11:51:19 | [diff] [blame] | 1142 | {"ios-password-ui-split", flag_descriptions::kIOSPasswordUISplitName, |
| 1143 | flag_descriptions::kIOSPasswordUISplitDescription, flags_ui::kOsIos, |
| 1144 | FEATURE_VALUE_TYPE(password_manager::features::kIOSPasswordUISplit)}, |
Theodor-Stefan Cristea | 6d087b8 | 2022-07-26 15:25:29 | [diff] [blame] | 1145 | {"ios-password-manager-cross-origin-iframe-support", |
| 1146 | flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportName, |
| 1147 | flag_descriptions::kIOSPasswordManagerCrossOriginIframeSupportDescription, |
| 1148 | flags_ui::kOsIos, |
| 1149 | FEATURE_VALUE_TYPE(password_manager::features:: |
| 1150 | kIOSPasswordManagerCrossOriginIframeSupport)}, |
Christian Xu | d105a135 | 2022-06-17 19:54:14 | [diff] [blame] | 1151 | {"omnibox-adaptive-suggestions-count", |
| 1152 | flag_descriptions::kAdaptiveSuggestionsCountName, |
| 1153 | flag_descriptions::kAdaptiveSuggestionsCountDescription, flags_ui::kOsIos, |
| 1154 | FEATURE_VALUE_TYPE(omnibox::kAdaptiveSuggestionsCount)}, |
Chris Lu | 2fd473f | 2022-06-28 13:38:20 | [diff] [blame] | 1155 | {"trending-queries-module", flag_descriptions::kTrendingQueriesModuleName, |
| 1156 | flag_descriptions::kTrendingQueriesModuleDescription, flags_ui::kOsIos, |
Chris Lu | 85e8cc64 | 2022-09-23 20:27:58 | [diff] [blame^] | 1157 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 1158 | kTrendingQueriesModule, |
| 1159 | kTrendingQueriesModuleVariations, |
| 1160 | kTrendingQueriesFlagOverrideFieldTrialName)}, |
Nakul Vaidya | ddfdfbc | 2022-06-28 23:43:32 | [diff] [blame] | 1161 | {"autofill-parse-iban-fields", |
Nakul Vaidya | 876210f | 2022-08-08 17:47:19 | [diff] [blame] | 1162 | flag_descriptions::kAutofillParseIBANFieldsName, |
| 1163 | flag_descriptions::kAutofillParseIBANFieldsDescription, flags_ui::kOsIos, |
| 1164 | FEATURE_VALUE_TYPE(autofill::features::kAutofillParseIBANFields)}, |
Ernesto Izquierdo Clua | 7f4e36e2 | 2022-07-01 09:38:36 | [diff] [blame] | 1165 | {"autofill-enable-new-card-unmask-prompt-view", |
| 1166 | flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewName, |
| 1167 | flag_descriptions::kAutofillEnableNewCardUnmaskPromptViewDescription, |
| 1168 | flags_ui::kOsIos, |
ginnnnnnny | 591a497 | 2022-09-01 16:10:27 | [diff] [blame] | 1169 | FEATURE_VALUE_TYPE( |
| 1170 | autofill::features::kAutofillEnableNewCardUnmaskPromptView)}, |
Christian Xu | bdedabec | 2022-07-04 10:00:13 | [diff] [blame] | 1171 | {"omnibox-paste-button", flag_descriptions::kOmniboxPasteButtonName, |
| 1172 | flag_descriptions::kOmniboxPasteButtonDescription, flags_ui::kOsIos, |
| 1173 | FEATURE_WITH_PARAMS_VALUE_TYPE(kOmniboxPasteButton, |
| 1174 | kOmniboxPasteButtonVariations, |
| 1175 | "OmniboxPasteButton")}, |
Moe Ahmadi | 098519d8 | 2022-07-27 18:34:24 | [diff] [blame] | 1176 | {"omnibox-zero-suggest-prefetching", |
| 1177 | flag_descriptions::kOmniboxZeroSuggestPrefetchingName, |
| 1178 | flag_descriptions::kOmniboxZeroSuggestPrefetchingDescription, |
| 1179 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetching)}, |
Vincent Boisselle | ad6cbe2 | 2022-07-04 19:32:39 | [diff] [blame] | 1180 | {"enable-user-policy", flag_descriptions::kEnableUserPolicyName, |
| 1181 | flag_descriptions::kEnableUserPolicyDescription, flags_ui::kOsIos, |
Vincent Boisselle | 88fef22 | 2022-09-23 18:54:50 | [diff] [blame] | 1182 | FEATURE_VALUE_TYPE(policy::kUserPolicy)}, |
Marc Treib | b9d8ed80 | 2022-07-05 15:15:49 | [diff] [blame] | 1183 | {"enable-sync-history-datatype", |
| 1184 | flag_descriptions::kSyncEnableHistoryDataTypeName, |
| 1185 | flag_descriptions::kSyncEnableHistoryDataTypeDescription, flags_ui::kOsIos, |
| 1186 | FEATURE_VALUE_TYPE(syncer::kSyncEnableHistoryDataType)}, |
Christian Xu | cf26d56 | 2022-07-06 09:28:36 | [diff] [blame] | 1187 | {"omnibox-max-url-matches", flag_descriptions::kOmniboxMaxURLMatchesName, |
| 1188 | flag_descriptions::kOmniboxMaxURLMatchesDescription, flags_ui::kOsIos, |
| 1189 | FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxMaxURLMatches, |
| 1190 | kOmniboxMaxURLMatchesVariations, |
| 1191 | "OmniboxMaxURLMatches")}, |
Olivier Robin | 60d3a06 | 2022-07-06 17:34:06 | [diff] [blame] | 1192 | {"metrickit-non-crash-reports", |
| 1193 | flag_descriptions::kMetrickitNonCrashReportName, |
| 1194 | flag_descriptions::kMetrickitNonCrashReportDescription, flags_ui::kOsIos, |
| 1195 | FEATURE_VALUE_TYPE(kMetrickitNonCrashReport)}, |
Siyu An | 3194bda | 2022-07-13 19:30:37 | [diff] [blame] | 1196 | {"autofill-enable-remade-downstream-metrics", |
| 1197 | flag_descriptions::kAutofillEnableRemadeDownstreamMetricsName, |
| 1198 | flag_descriptions::kAutofillEnableRemadeDownstreamMetricsDescription, |
| 1199 | flags_ui::kOsIos, |
| 1200 | FEATURE_VALUE_TYPE( |
| 1201 | autofill::features::kAutofillEnableRemadeDownstreamMetrics)}, |
Nakul Vaidya | 13ca204 | 2022-07-27 01:59:55 | [diff] [blame] | 1202 | {"autofill-parse-vcn-card-on-file-standalone-cvc-fields", |
| 1203 | flag_descriptions::kAutofillParseVcnCardOnFileStandaloneCvcFieldsName, |
| 1204 | flag_descriptions:: |
| 1205 | kAutofillParseVcnCardOnFileStandaloneCvcFieldsDescription, |
| 1206 | flags_ui::kOsIos, |
| 1207 | FEATURE_VALUE_TYPE( |
| 1208 | autofill::features::kAutofillParseVcnCardOnFileStandaloneCvcFields)}, |
Ed Chin | 91e4499 | 2022-07-27 13:42:34 | [diff] [blame] | 1209 | #if BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED) |
| 1210 | {"feed-background-refresh-ios", |
| 1211 | flag_descriptions::kFeedBackgroundRefreshName, |
| 1212 | flag_descriptions::kFeedBackgroundRefreshDescription, flags_ui::kOsIos, |
| 1213 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFeedBackgroundRefresh, |
| 1214 | kFeedBackgroundRefreshVariations, |
| 1215 | "FeedBackgroundRefresh")}, |
Christian Xu | 164a2e51 | 2022-08-01 20:38:19 | [diff] [blame] | 1216 | {"omnibox-keyboard-paste-button", |
| 1217 | flag_descriptions::kOmniboxKeyboardPasteButtonName, |
| 1218 | flag_descriptions::kOmniboxKeyboardPasteButtonDescription, |
| 1219 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kOmniboxKeyboardPasteButton)}, |
Ed Chin | 91e4499 | 2022-07-27 13:42:34 | [diff] [blame] | 1220 | #endif // BUILDFLAG(IOS_BACKGROUND_MODE_ENABLED) |
Arthur Milchior | cf4877e | 2022-07-29 14:23:41 | [diff] [blame] | 1221 | {"enable-cbd-sign-out", flag_descriptions::kEnableCBDSignOutName, |
| 1222 | flag_descriptions::kEnableCBDSignOutDescription, flags_ui::kOsIos, |
Arthur Milchior | d36e250 | 2022-08-11 16:10:11 | [diff] [blame] | 1223 | FEATURE_VALUE_TYPE(switches::kEnableCbdSignOut)}, |
Aliona DANGLA | a5257ccc | 2022-08-29 14:01:49 | [diff] [blame] | 1224 | {"enable-open-in-download", flag_descriptions::kEnableOpenInDownloadName, |
| 1225 | flag_descriptions::kEnableOpenInDownloadDescription, flags_ui::kOsIos, |
| 1226 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableOpenInDownload, |
| 1227 | kOpenInDownloadVariations, |
| 1228 | "EnableOpenInDownload")}, |
Cheick Cisse | 87a51cb | 2022-09-08 21:29:17 | [diff] [blame] | 1229 | {"whats-new-ios", flag_descriptions::kWhatsNewIOSName, |
| 1230 | flag_descriptions::kWhatsNewIOSDescription, flags_ui::kOsIos, |
| 1231 | FEATURE_VALUE_TYPE(kWhatsNewIOS)}, |
ginnnnnnny | 591a497 | 2022-09-01 16:10:27 | [diff] [blame] | 1232 | {"ios-autofill-branding", flag_descriptions::kAutofillBrandingIOSName, |
| 1233 | flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos, |
| 1234 | FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS, |
| 1235 | kAutofillBrandingIOSVariations, |
Hira Mahmood | b0e5f41 | 2022-09-01 19:41:05 | [diff] [blame] | 1236 | "AutofillBrandingIOS")}, |
| 1237 | {"app-store-rating", flag_descriptions::kAppStoreRatingName, |
| 1238 | flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos, |
| 1239 | FEATURE_VALUE_TYPE(kAppStoreRating)}, |
Scott Yoder | cb2fe63 | 2022-09-12 15:28:35 | [diff] [blame] | 1240 | {"ios-new-post-restore-experience", |
| 1241 | flag_descriptions::kIOSNewPostRestoreExperienceName, |
| 1242 | flag_descriptions::kIOSNewPostRestoreExperienceDescription, |
| 1243 | flags_ui::kOsIos, |
Benjamin Williams | 3d3a2ec | 2022-09-13 20:01:26 | [diff] [blame] | 1244 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 1245 | post_restore_signin::features::kIOSNewPostRestoreExperience, |
| 1246 | kIOSNewPostRestoreExperienceVariations, |
| 1247 | "IOSNewPostRestoreExperience")}, |
Christian Xu | 6b90c2a3 | 2022-09-13 18:17:02 | [diff] [blame] | 1248 | {"most-visited-tiles", flag_descriptions::kMostVisitedTilesName, |
| 1249 | flag_descriptions::kMostVisitedTilesDescription, flags_ui::kOsIos, |
| 1250 | FEATURE_VALUE_TYPE(omnibox::kMostVisitedTiles)}, |
Olivier ROBIN | f0551878 | 2022-09-14 23:55:50 | [diff] [blame] | 1251 | {"enable-tflite-language-detection-ignore", |
| 1252 | flag_descriptions::kTFLiteLanguageDetectionIgnoreName, |
| 1253 | flag_descriptions::kTFLiteLanguageDetectionIgnoreDescription, |
| 1254 | flags_ui::kOsIos, |
| 1255 | FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionIgnoreEnabled)}, |
Hira Mahmood | b0e5f41 | 2022-09-01 19:41:05 | [diff] [blame] | 1256 | }; |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1257 | |
Rohit Rao | bed794c | 2020-04-27 15:27:45 | [diff] [blame] | 1258 | bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { |
| 1259 | return false; |
| 1260 | } |
| 1261 | |
| 1262 | flags_ui::FlagsState& GetGlobalFlagsState() { |
| 1263 | static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries, |
| 1264 | nullptr); |
| 1265 | return *flags_state; |
| 1266 | } |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1267 | // Creates the experimental test policies map, used by AsyncPolicyLoader and |
| 1268 | // PolicyLoaderIOS to locally enable policies. |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 1269 | NSMutableDictionary* CreateExperimentalTestingPolicies() { |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1270 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1271 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 1272 | // Shared variables for all enterprise experimental flags. |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1273 | NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init]; |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 1274 | NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init]; |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1275 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 1276 | // Set some sample policy values for testing if EnableSamplePolicies is set to |
| 1277 | // true. |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 1278 | if ([defaults boolForKey:@"EnableSamplePolicies"]) { |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1279 | [testing_policies addEntriesFromDictionary:@{ |
Tina Wang | 59d0b7e | 2020-08-11 04:41:01 | [diff] [blame] | 1280 | base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO, |
| 1281 | |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 1282 | base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO, |
| 1283 | |
| 1284 | // 2 = Disable all variations |
| 1285 | base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2, |
| 1286 | |
| 1287 | // 2 = Do not allow any site to show popups |
| 1288 | base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2, |
| 1289 | |
Tina Wang | 5abee80 | 2020-07-29 23:09:52 | [diff] [blame] | 1290 | // Set default search engine. |
| 1291 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) : |
| 1292 | @YES, |
| 1293 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) : |
| 1294 | @"http://www.google.com/search?q={searchTerms}", |
| 1295 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) : |
Tina Wang | 7cd0a06 | 2020-09-15 21:31:02 | [diff] [blame] | 1296 | @"TestEngine", |
Tina Wang | 5abee80 | 2020-07-29 23:09:52 | [diff] [blame] | 1297 | |
Tina Wang | 89068c8 | 2020-10-29 15:51:50 | [diff] [blame] | 1298 | base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO, |
| 1299 | |
Gauthier Ambard | 21b2370 | 2021-04-16 16:11:27 | [diff] [blame] | 1300 | base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO, |
| 1301 | |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 1302 | base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO, |
Tina Wang | 59d0b7e | 2020-08-11 04:41:01 | [diff] [blame] | 1303 | |
| 1304 | base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO, |
Tina Wang | 54dddfc2 | 2020-08-20 22:34:53 | [diff] [blame] | 1305 | |
| 1306 | // 2 = Enhanced safe browsing protection |
| 1307 | base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2, |
| 1308 | |
| 1309 | base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES, |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1310 | }]; |
| 1311 | } |
| 1312 | |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 1313 | if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) { |
Guillaume Jenkins | fe46d3a | 2021-04-26 19:51:04 | [diff] [blame] | 1314 | NSString* sync_policy_key = |
| 1315 | base::SysUTF8ToNSString(policy::key::kSyncDisabled); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1316 | [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}]; |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 1317 | } |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 1318 | |
Ewann | 570a630 | 2021-08-17 07:22:42 | [diff] [blame] | 1319 | // SyncTypesListDisabled policy. |
| 1320 | NSString* Sync_types_list_disabled_key = |
| 1321 | base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled); |
| 1322 | NSMutableArray* Sync_types_list_disabled_values = |
| 1323 | [[NSMutableArray alloc] init]; |
| 1324 | if ([defaults boolForKey:@"SyncTypesListBookmarks"]) { |
| 1325 | [Sync_types_list_disabled_values addObject:@"bookmarks"]; |
| 1326 | } |
| 1327 | if ([defaults boolForKey:@"SyncTypesListReadingList"]) { |
| 1328 | [Sync_types_list_disabled_values addObject:@"readingList"]; |
| 1329 | } |
| 1330 | if ([defaults boolForKey:@"SyncTypesListPreferences"]) { |
| 1331 | [Sync_types_list_disabled_values addObject:@"preferences"]; |
| 1332 | } |
| 1333 | if ([defaults boolForKey:@"SyncTypesListPasswords"]) { |
| 1334 | [Sync_types_list_disabled_values addObject:@"passwords"]; |
| 1335 | } |
| 1336 | if ([defaults boolForKey:@"SyncTypesListAutofill"]) { |
| 1337 | [Sync_types_list_disabled_values addObject:@"autofill"]; |
| 1338 | } |
| 1339 | if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) { |
| 1340 | [Sync_types_list_disabled_values addObject:@"typedUrls"]; |
| 1341 | } |
| 1342 | if ([defaults boolForKey:@"SyncTypesListTabs"]) { |
| 1343 | [Sync_types_list_disabled_values addObject:@"tabs"]; |
| 1344 | } |
| 1345 | if ([Sync_types_list_disabled_values count]) { |
| 1346 | [testing_policies addEntriesFromDictionary:@{ |
| 1347 | Sync_types_list_disabled_key : Sync_types_list_disabled_values |
| 1348 | }]; |
Ewann | 570a630 | 2021-08-17 07:22:42 | [diff] [blame] | 1349 | } |
| 1350 | |
Gauthier Ambard | 073eaa9 | 2021-11-22 15:24:13 | [diff] [blame] | 1351 | // If an incognito mode availability is set, set the value. |
Tina Wang | c6bcf57 | 2021-01-27 18:15:52 | [diff] [blame] | 1352 | NSString* incognito_policy_key = |
| 1353 | base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability); |
| 1354 | NSInteger incognito_mode_availability = |
| 1355 | [defaults integerForKey:incognito_policy_key]; |
| 1356 | if (incognito_mode_availability) { |
Tina Wang | c6bcf57 | 2021-01-27 18:15:52 | [diff] [blame] | 1357 | [testing_policies addEntriesFromDictionary:@{ |
| 1358 | incognito_policy_key : @(incognito_mode_availability), |
| 1359 | }]; |
| 1360 | } |
| 1361 | |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 1362 | NSString* restriction_pattern = |
| 1363 | [defaults stringForKey:@"RestrictAccountsToPatterns"]; |
| 1364 | if ([restriction_pattern length] > 0) { |
Ewann | b3bee38 | 2021-08-16 09:12:29 | [diff] [blame] | 1365 | NSString* restrict_key = |
| 1366 | base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns); |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 1367 | [testing_policies addEntriesFromDictionary:@{ |
Ewann | b3bee38 | 2021-08-16 09:12:29 | [diff] [blame] | 1368 | restrict_key : @[ restriction_pattern ] |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 1369 | }]; |
| 1370 | } |
| 1371 | |
Vincent Boisselle | 19200bc | 2021-09-01 17:58:25 | [diff] [blame] | 1372 | // If the sign-in policy is set (not "None"), add the policy key to the list |
| 1373 | // of enabled experimental policies, and set the value. |
| 1374 | NSString* const kSigninPolicyKey = @"BrowserSignin"; |
| 1375 | NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey]; |
| 1376 | if (signin_policy_mode) { |
| 1377 | // Remove the mode offset that was used to represent the unset policy. |
| 1378 | --signin_policy_mode; |
| 1379 | DCHECK(signin_policy_mode >= 0); |
| 1380 | |
Vincent Boisselle | 19200bc | 2021-09-01 17:58:25 | [diff] [blame] | 1381 | [testing_policies addEntriesFromDictionary:@{ |
| 1382 | kSigninPolicyKey : @(signin_policy_mode), |
| 1383 | }]; |
| 1384 | } |
| 1385 | |
Veronique Nguyen | 9b1044f | 2022-01-11 14:41:13 | [diff] [blame] | 1386 | // If the New Tab Page URL is set (not empty) add the value to the list of |
| 1387 | // test policies. |
| 1388 | NSString* ntp_location = [defaults stringForKey:@"NTPLocation"]; |
| 1389 | if ([ntp_location length] > 0) { |
| 1390 | NSString* ntp_location_key = |
| 1391 | base::SysUTF8ToNSString(policy::key::kNewTabPageLocation); |
| 1392 | [testing_policies |
| 1393 | addEntriesFromDictionary:@{ntp_location_key : ntp_location}]; |
Veronique Nguyen | 302d870 | 2022-01-12 21:18:57 | [diff] [blame] | 1394 | [allowed_experimental_policies addObject:ntp_location_key]; |
Veronique Nguyen | 9b1044f | 2022-01-11 14:41:13 | [diff] [blame] | 1395 | } |
| 1396 | |
Ali Juma | 9ec36d2 | 2022-03-28 14:53:12 | [diff] [blame] | 1397 | if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) { |
| 1398 | NSString* allow_backups_key = |
| 1399 | base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups); |
| 1400 | [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}]; |
| 1401 | [allowed_experimental_policies addObject:allow_backups_key]; |
| 1402 | } |
| 1403 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 1404 | // If any experimental policy was allowed, set the EnableExperimentalPolicies |
| 1405 | // policy. |
| 1406 | if ([allowed_experimental_policies count] > 0) { |
| 1407 | [testing_policies setValue:allowed_experimental_policies |
| 1408 | forKey:base::SysUTF8ToNSString( |
| 1409 | policy::key::kEnableExperimentalPolicies)]; |
| 1410 | } |
| 1411 | |
jlebel | 2eb4022 | 2022-05-06 11:15:42 | [diff] [blame] | 1412 | NSString* metrics_reporting_key = @"MetricsReportingEnabled"; |
| 1413 | switch ([defaults integerForKey:metrics_reporting_key]) { |
| 1414 | case 1: |
| 1415 | // Metrics reporting forced. |
| 1416 | [testing_policies setValue:@(YES) forKey:metrics_reporting_key]; |
| 1417 | break; |
| 1418 | case 2: |
| 1419 | // Metrics reporting disabled. |
| 1420 | [testing_policies setValue:@(NO) forKey:metrics_reporting_key]; |
| 1421 | break; |
| 1422 | default: |
| 1423 | // Metrics reporting not managed. |
| 1424 | break; |
| 1425 | } |
| 1426 | |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1427 | // Warning: Add new flags to TestingPoliciesHash() below. |
| 1428 | |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1429 | return testing_policies; |
| 1430 | } |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1431 | |
| 1432 | // Generates a unique NSString based on currently monitored policies from |
| 1433 | // NSUserDefaults standardUserDefaults. |
| 1434 | NSString* TestingPoliciesHash() { |
| 1435 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1436 | return [NSString |
jlebel | 2eb4022 | 2022-05-06 11:15:42 | [diff] [blame] | 1437 | stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d|%d|%@|%d", |
Ali Juma | 9ec36d2 | 2022-03-28 14:53:12 | [diff] [blame] | 1438 | [defaults boolForKey:@"DisallowChromeDataInBackups"], |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1439 | [defaults boolForKey:@"EnableSyncDisabledPolicy"], |
| 1440 | [defaults boolForKey:@"EnableSamplePolicies"], |
jlebel | 2eb4022 | 2022-05-06 11:15:42 | [diff] [blame] | 1441 | static_cast<int>([defaults |
| 1442 | integerForKey:@"IncognitoModeAvailability"]), |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1443 | [defaults stringForKey:@"RestrictAccountsToPatterns"], |
| 1444 | [defaults boolForKey:@"SyncTypesListBookmarks"], |
| 1445 | [defaults boolForKey:@"SyncTypesListReadingList"], |
| 1446 | [defaults boolForKey:@"SyncTypesListPreferences"], |
| 1447 | [defaults boolForKey:@"SyncTypesListPasswords"], |
| 1448 | [defaults boolForKey:@"SyncTypesListAutofill"], |
| 1449 | [defaults boolForKey:@"SyncTypesListTypedUrls"], |
jlebel | 2eb4022 | 2022-05-06 11:15:42 | [diff] [blame] | 1450 | [defaults boolForKey:@"SyncTypesListTabs"], |
| 1451 | static_cast<int>( |
| 1452 | [defaults integerForKey:@"BrowserSignin"]), |
| 1453 | [defaults stringForKey:@"NTPLocation"], |
| 1454 | static_cast<int>([defaults |
| 1455 | integerForKey:@"MetricsReportingEnabled"])]; |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1456 | } |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1457 | } // namespace |
| 1458 | |
Gauthier Ambard | 02dbf02 | 2022-08-23 08:28:47 | [diff] [blame] | 1459 | // Add all switches from experimental flags to `command_line`. |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1460 | void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) { |
| 1461 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1462 | |
| 1463 | // Set the UA flag if UseMobileSafariUA is enabled. |
| 1464 | if ([defaults boolForKey:@"UseMobileSafariUA"]) { |
| 1465 | // Safari uses "Vesion/", followed by the OS version excluding bugfix, where |
| 1466 | // Chrome puts its product token. |
| 1467 | int32_t major = 0; |
| 1468 | int32_t minor = 0; |
| 1469 | int32_t bugfix = 0; |
| 1470 | base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); |
| 1471 | std::string product = base::StringPrintf("Version/%d.%d", major, minor); |
| 1472 | |
| 1473 | command_line->AppendSwitchASCII(switches::kUserAgent, |
| 1474 | web::BuildMobileUserAgent(product)); |
| 1475 | } |
| 1476 | |
| 1477 | // Shared variables for all enterprise experimental flags. |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 1478 | NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies(); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1479 | |
| 1480 | // If a CBCM enrollment token is provided, force Chrome Browser Cloud |
| 1481 | // Management to enabled and add the token to the list of policies. |
| 1482 | NSString* token_key = |
| 1483 | base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken); |
| 1484 | NSString* token = [defaults stringForKey:token_key]; |
| 1485 | |
| 1486 | if ([token length] > 0) { |
| 1487 | command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement); |
| 1488 | [testing_policies setValue:token forKey:token_key]; |
| 1489 | } |
| 1490 | |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1491 | // If some policies were set, commit them to the app's registration defaults. |
| 1492 | if ([testing_policies count] > 0) { |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 1493 | NSDictionary* registration_defaults = |
| 1494 | @{kPolicyLoaderIOSConfigurationKey : testing_policies}; |
| 1495 | [defaults registerDefaults:registration_defaults]; |
| 1496 | } |
| 1497 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1498 | // Freeform commandline flags. These are added last, so that any flags added |
| 1499 | // earlier in this function take precedence. |
| 1500 | if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { |
| 1501 | base::CommandLine::StringVector flags; |
| 1502 | // Append an empty "program" argument. |
| 1503 | flags.push_back(""); |
| 1504 | |
| 1505 | // The number of flags corresponds to the number of text fields in |
| 1506 | // Experimental.plist. |
| 1507 | const int kNumFreeformFlags = 5; |
| 1508 | for (int i = 1; i <= kNumFreeformFlags; ++i) { |
| 1509 | NSString* key = |
| 1510 | [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i]; |
| 1511 | NSString* flag = [defaults stringForKey:key]; |
| 1512 | if ([flag length]) { |
Robbie Gibson | c91ce62 | 2019-05-20 14:44:33 | [diff] [blame] | 1513 | // iOS keyboard replaces -- with —, so undo that. |
| 1514 | flag = [flag stringByReplacingOccurrencesOfString:@"—" |
| 1515 | withString:@"--" |
| 1516 | options:0 |
| 1517 | range:NSMakeRange(0, 1)]; |
| 1518 | // To make things easier, allow flags with no dashes by prepending them |
| 1519 | // here. This also allows for flags that just have one dash if they |
| 1520 | // exist. |
| 1521 | if (![flag hasPrefix:@"-"]) { |
| 1522 | flag = [@"--" stringByAppendingString:flag]; |
| 1523 | } |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1524 | flags.push_back(base::SysNSStringToUTF8(flag)); |
| 1525 | } |
| 1526 | } |
| 1527 | |
| 1528 | base::CommandLine temp_command_line(flags); |
| 1529 | command_line->AppendArguments(temp_command_line, false); |
| 1530 | } |
msarda | fc76f66 | 2017-02-24 12:46:28 | [diff] [blame] | 1531 | |
justincohen | dacc85d | 2017-06-28 23:34:10 | [diff] [blame] | 1532 | // Populate command line flag for 3rd party keyboard omnibox workaround. |
| 1533 | NSString* enableThirdPartyKeyboardWorkaround = |
| 1534 | [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"]; |
| 1535 | if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) { |
| 1536 | command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround); |
| 1537 | } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) { |
| 1538 | command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround); |
| 1539 | } |
| 1540 | |
Sylvain Defresne | d3cd8d9 | 2022-01-18 13:35:08 | [diff] [blame] | 1541 | ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1542 | } |
| 1543 | |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1544 | void MonitorExperimentalSettingsChanges() { |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1545 | // Startup values for settings to be observed. |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1546 | __block NSString* hash = TestingPoliciesHash(); |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1547 | static std::atomic_bool pending_check(false); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1548 | |
| 1549 | auto monitor = ^(NSNotification* notification) { |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1550 | bool has_pending_check = pending_check.exchange(true); |
| 1551 | if (has_pending_check) |
| 1552 | return; |
| 1553 | |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1554 | // Can be called from any thread from where the notification was sent, |
| 1555 | // but since it may change standardUserDefaults, and that has to be on main |
| 1556 | // thread, dispatch to main thread. |
| 1557 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 1558 | // Check if observed settings have changed. Since source and destination |
| 1559 | // are both user defaults, this is required to avoid cycling back here. |
| 1560 | NSString* newHash = TestingPoliciesHash(); |
| 1561 | if (![newHash isEqualToString:hash]) { |
| 1562 | hash = newHash; |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1563 | |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1564 | // Publish update. |
| 1565 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1566 | NSMutableDictionary* testing_policies = |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 1567 | CreateExperimentalTestingPolicies(); |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1568 | NSDictionary* registration_defaults = |
| 1569 | @{kPolicyLoaderIOSConfigurationKey : testing_policies}; |
| 1570 | [defaults registerDefaults:registration_defaults]; |
| 1571 | } |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1572 | |
| 1573 | pending_check.store(false); |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1574 | }); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1575 | }; |
| 1576 | |
| 1577 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
| 1578 | [center addObserverForName:NSUserDefaultsDidChangeNotification |
| 1579 | object:nil |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1580 | queue:nil |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1581 | usingBlock:monitor]; |
| 1582 | } |
| 1583 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1584 | void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, |
| 1585 | base::CommandLine* command_line) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1586 | GetGlobalFlagsState().ConvertFlagsToSwitches( |
sdefresne | c976390 | 2015-12-02 10:30:11 | [diff] [blame] | 1587 | flags_storage, command_line, flags_ui::kAddSentinels, |
Gregory Chatzinoff | f652372 | 2017-11-21 01:33:53 | [diff] [blame] | 1588 | switches::kEnableFeatures, switches::kDisableFeatures); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1589 | } |
| 1590 | |
jkrcal | bf07337 | 2016-07-29 07:21:31 | [diff] [blame] | 1591 | std::vector<std::string> RegisterAllFeatureVariationParameters( |
| 1592 | flags_ui::FlagsStorage* flags_storage, |
| 1593 | base::FeatureList* feature_list) { |
Justin Cohen | 2e2adb5 | 2019-10-25 17:00:02 | [diff] [blame] | 1594 | // Occasionally DCHECK crashes on canary can be very distuptive. An |
| 1595 | // experimental flag was added to aid in temporarily disabling this for |
| 1596 | // canary testers. |
Peter Boström | 3f79857 | 2022-07-26 23:44:36 | [diff] [blame] | 1597 | #if BUILDFLAG(DCHECK_IS_CONFIGURABLE) |
Justin Cohen | 2e2adb5 | 2019-10-25 17:00:02 | [diff] [blame] | 1598 | if (experimental_flags::AreDCHECKCrashesDisabled()) { |
| 1599 | std::vector<base::FeatureList::FeatureOverrideInfo> overrides; |
| 1600 | overrides.push_back( |
| 1601 | {std::cref(base::kDCheckIsFatalFeature), |
| 1602 | base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE}); |
| 1603 | feature_list->RegisterExtraFeatureOverrides(std::move(overrides)); |
| 1604 | } |
Peter Boström | 3f79857 | 2022-07-26 23:44:36 | [diff] [blame] | 1605 | #endif // BUILDFLAG(DCHECK_IS_CONFIGURABLE) |
Justin Cohen | 2e2adb5 | 2019-10-25 17:00:02 | [diff] [blame] | 1606 | |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1607 | return GetGlobalFlagsState().RegisterAllFeatureVariationParameters( |
| 1608 | flags_storage, feature_list); |
jkrcal | bf07337 | 2016-07-29 07:21:31 | [diff] [blame] | 1609 | } |
| 1610 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1611 | void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage, |
| 1612 | flags_ui::FlagAccess access, |
Matt Menke | 4d77757 | 2022-06-15 15:55:50 | [diff] [blame] | 1613 | base::Value::List& supported_entries, |
| 1614 | base::Value::List& unsupported_entries) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1615 | GetGlobalFlagsState().GetFlagFeatureEntries( |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1616 | flags_storage, access, supported_entries, unsupported_entries, |
Renjie Tang | 208c819 | 2020-11-03 00:46:51 | [diff] [blame] | 1617 | base::BindRepeating(&SkipConditionalFeatureEntry)); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1618 | } |
| 1619 | |
| 1620 | void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage, |
| 1621 | const std::string& internal_name, |
| 1622 | bool enable) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1623 | GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name, |
| 1624 | enable); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1625 | } |
| 1626 | |
| 1627 | void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1628 | GetGlobalFlagsState().ResetAllFlags(flags_storage); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1629 | } |
| 1630 | |
| 1631 | namespace testing { |
| 1632 | |
Elly Fong-Jones | 323ab109 | 2021-08-23 22:36:31 | [diff] [blame] | 1633 | base::span<const flags_ui::FeatureEntry> GetFeatureEntries() { |
| 1634 | return base::span<const flags_ui::FeatureEntry>(kFeatureEntries, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 1635 | std::size(kFeatureEntries)); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1636 | } |
| 1637 | |
| 1638 | } // namespace testing |