sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Implementation of about_flags for iOS that sets flags based on experimental |
| 6 | // settings. |
| 7 | |
Nazerke | 9c25905 | 2019-06-26 15:30:10 | [diff] [blame] | 8 | #include "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> |
avi | 57194367 | 2015-12-22 02:12:49 | [diff] [blame] | 11 | #include <stddef.h> |
| 12 | #include <stdint.h> |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 13 | |
Gregory Chatzinoff | f652372 | 2017-11-21 01:33:53 | [diff] [blame] | 14 | #include "base/base_switches.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 15 | #include "base/bind.h" |
danakj | db9ae794 | 2020-11-11 16:01:35 | [diff] [blame] | 16 | #include "base/callback_helpers.h" |
Hans Wennborg | 3a2fb61f | 2020-05-11 15:51:16 | [diff] [blame] | 17 | #include "base/check_op.h" |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 18 | #import "base/mac/foundation_util.h" |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 19 | #include "base/no_destructor.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 20 | #include "base/strings/stringprintf.h" |
| 21 | #include "base/strings/sys_string_conversions.h" |
Sebastien Marchand | 75a7cdf | 2018-11-13 23:47:03 | [diff] [blame] | 22 | #include "base/system/sys_info.h" |
Mohamad Ahmadi | c4df81f | 2017-12-20 04:41:59 | [diff] [blame] | 23 | #include "components/autofill/core/common/autofill_features.h" |
Jared Saul | d998539f | 2019-03-19 15:11:17 | [diff] [blame] | 24 | #include "components/autofill/core/common/autofill_payments_features.h" |
Moe Ahmadi | d6d5d17 | 2018-06-20 17:20:23 | [diff] [blame] | 25 | #include "components/autofill/core/common/autofill_switches.h" |
Olivier Robin | 3d6041162 | 2018-02-23 10:03:22 | [diff] [blame] | 26 | #include "components/autofill/ios/browser/autofill_switches.h" |
Jesse McKenna | 85c1a59f | 2021-05-05 19:08:30 | [diff] [blame] | 27 | #include "components/breadcrumbs/core/features.h" |
Matt Jones | 125dfb4 | 2022-02-11 17:23:42 | [diff] [blame] | 28 | #include "components/commerce/core/commerce_feature_list.h" |
| 29 | #include "components/commerce/core/flag_descriptions.h" |
Robbie Gibson | 5e343663 | 2020-04-27 15:48:04 | [diff] [blame] | 30 | #include "components/content_settings/core/common/features.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 31 | #include "components/dom_distiller/core/dom_distiller_switches.h" |
Guillaume Jenkins | 4e6ac1e | 2020-11-11 16:57:40 | [diff] [blame] | 32 | #include "components/enterprise/browser/enterprise_switches.h" |
Tommy Nyquist | c1d6dea1 | 2017-07-26 20:37:23 | [diff] [blame] | 33 | #include "components/feature_engagement/public/feature_constants.h" |
| 34 | #include "components/feature_engagement/public/feature_list.h" |
edchin | d847c096 | 2021-03-03 18:17:05 | [diff] [blame] | 35 | #include "components/feed/feed_feature_list.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 36 | #include "components/flags_ui/feature_entry.h" |
| 37 | #include "components/flags_ui/feature_entry_macros.h" |
| 38 | #include "components/flags_ui/flags_storage.h" |
| 39 | #include "components/flags_ui/flags_ui_switches.h" |
Tanja Gornak | b0985dd | 2018-10-11 17:24:40 | [diff] [blame] | 40 | #include "components/invalidation/impl/invalidation_switches.h" |
noyau | 4cfb133 | 2016-10-25 17:05:42 | [diff] [blame] | 41 | #include "components/ntp_tiles/switches.h" |
Justin Donnelly | 33d712e | 2017-08-23 21:32:51 | [diff] [blame] | 42 | #include "components/omnibox/browser/omnibox_field_trial.h" |
Tomasz Wiszkowski | d938a111 | 2019-03-06 18:01:57 | [diff] [blame] | 43 | #include "components/omnibox/common/omnibox_features.h" |
Raj T | 3898f03 | 2021-08-19 23:51:27 | [diff] [blame] | 44 | #include "components/optimization_guide/core/optimization_guide_features.h" |
Ioana Pandele | d14ce9e | 2017-11-28 14:41:46 | [diff] [blame] | 45 | #include "components/password_manager/core/common/password_manager_features.h" |
mathp | 9b4c11d | 2017-07-06 20:24:13 | [diff] [blame] | 46 | #include "components/payments/core/features.h" |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 47 | #import "components/policy/core/common/policy_loader_ios_constants.h" |
| 48 | #include "components/policy/policy_constants.h" |
Joemer Ramos | 3417573 | 2022-02-14 18:59:16 | [diff] [blame] | 49 | #include "components/safe_browsing/core/common/features.h" |
Victor Hugo Vianna Silva | 0399402f | 2021-09-07 21:41:25 | [diff] [blame] | 50 | #import "components/send_tab_to_self/features.h" |
Tommy Martino | 0caf336 | 2021-01-13 20:29:58 | [diff] [blame] | 51 | #include "components/shared_highlighting/core/common/shared_highlighting_features.h" |
Valeriya Sinevich | a79dc61 | 2018-09-25 14:49:09 | [diff] [blame] | 52 | #include "components/signin/core/browser/account_reconcilor.h" |
Jérôme Lebel | c374fdd | 2019-09-27 10:36:48 | [diff] [blame] | 53 | #include "components/signin/ios/browser/features.h" |
Colin Blundell | 3517170e | 2019-07-11 08:16:34 | [diff] [blame] | 54 | #include "components/signin/public/base/signin_switches.h" |
sdefresne | 3657978 | 2016-02-05 11:08:25 | [diff] [blame] | 55 | #include "components/strings/grit/components_strings.h" |
Victor Hugo Vianna Silva | a48aa01c | 2022-02-09 20:38:23 | [diff] [blame] | 56 | #include "components/sync/base/command_line_switches.h" |
| 57 | #include "components/sync/base/features.h" |
Ewann | 570a630 | 2021-08-17 07:22:42 | [diff] [blame] | 58 | #include "components/sync/base/pref_names.h" |
Moe Ahmadi | e4cce1f | 2018-12-18 23:48:01 | [diff] [blame] | 59 | #include "components/translate/core/browser/translate_prefs.h" |
Olivier Robin | ffe767c | 2022-04-21 13:13:23 | [diff] [blame] | 60 | #include "components/translate/core/common/translate_util.h" |
Sylvain Defresne | ae6987e | 2018-03-01 13:21:40 | [diff] [blame] | 61 | #include "ios/chrome/browser/browsing_data/browsing_data_features.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 62 | #include "ios/chrome/browser/chrome_switches.h" |
Eugene But | 2823dc7e | 2020-07-21 18:10:37 | [diff] [blame] | 63 | #include "ios/chrome/browser/crash_report/features.h" |
Nazerke | 21bdc45a | 2019-07-11 09:02:05 | [diff] [blame] | 64 | #include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h" |
Ed Chin | 100660bf | 2022-04-26 16:59:13 | [diff] [blame] | 65 | #import "ios/chrome/browser/ntp/features.h" |
Vincent Boisselle | d042d55 | 2022-04-09 01:22:59 | [diff] [blame] | 66 | #include "ios/chrome/browser/policy/cloud/user_policy_switch.h" |
edchin | 6869684 | 2020-04-09 17:19:31 | [diff] [blame] | 67 | #include "ios/chrome/browser/policy/policy_features.h" |
Vincent Boisselle | 19200bc | 2021-09-01 17:58:25 | [diff] [blame] | 68 | #include "ios/chrome/browser/policy/policy_util.h" |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 69 | #include "ios/chrome/browser/screen_time/screen_time_buildflags.h" |
Olivier Robin | 3a957df | 2021-12-21 18:04:34 | [diff] [blame] | 70 | #import "ios/chrome/browser/sessions/session_features.h" |
Gauthier Ambard | 33e0330 | 2019-02-21 13:28:58 | [diff] [blame] | 71 | #include "ios/chrome/browser/system_flags.h" |
Louis Romero | ac04f786a | 2022-04-19 09:39:30 | [diff] [blame] | 72 | #include "ios/chrome/browser/ui/bubble/bubble_features.h" |
adamta | 22a4d50 | 2020-05-21 03:12:21 | [diff] [blame] | 73 | #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" |
Javier Ernesto Flores Robles | 209b282 | 2021-03-25 19:16:50 | [diff] [blame] | 74 | #import "ios/chrome/browser/ui/default_promo/default_browser_utils.h" |
Ewann | 1a9d33d | 2021-06-14 11:12:24 | [diff] [blame] | 75 | #import "ios/chrome/browser/ui/download/features.h" |
Aliona DANGLA | ebfd7d02 | 2021-10-08 14:15:45 | [diff] [blame] | 76 | #include "ios/chrome/browser/ui/first_run/fre_field_trial.h" |
Kurt Horimoto | 4da682b02 | 2018-04-12 07:43:35 | [diff] [blame] | 77 | #import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h" |
adamta | 27356847 | 2020-12-04 23:53:57 | [diff] [blame] | 78 | #import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h" |
Christian Xu | b8c06cd | 2022-04-29 20:55:01 | [diff] [blame^] | 79 | #import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h" |
Tina Wang | 17514e2f | 2021-09-24 23:57:18 | [diff] [blame] | 80 | #import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_features.h" |
Robbie Gibson | 686c5673 | 2021-10-04 17:11:45 | [diff] [blame] | 81 | #import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h" |
gogerald | 0ff29e5 | 2021-02-03 18:56:19 | [diff] [blame] | 82 | #import "ios/chrome/browser/ui/start_surface/start_surface_features.h" |
Nazerke | 0bf10c4 | 2020-11-12 11:17:32 | [diff] [blame] | 83 | #import "ios/chrome/browser/ui/tab_switcher/tab_grid/features.h" |
Kurt Horimoto | 79d590b | 2018-09-12 19:09:28 | [diff] [blame] | 84 | #import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h" |
Justin Cohen | 2d81c58 | 2018-01-22 14:46:44 | [diff] [blame] | 85 | #include "ios/chrome/browser/ui/ui_feature_flags.h" |
Louis Romero | fbfbd93 | 2022-04-15 18:04:50 | [diff] [blame] | 86 | #include "ios/chrome/browser/ui/util/features.h" |
Yi Su | 392b303 | 2018-06-05 07:26:47 | [diff] [blame] | 87 | #include "ios/chrome/browser/web/features.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 88 | #include "ios/chrome/grit/ios_strings.h" |
Sylvain Defresne | 559ce5f | 2022-01-13 17:14:58 | [diff] [blame] | 89 | #include "ios/public/provider/chrome/browser/app_utils/app_utils_api.h" |
Eugene But | 61818bc | 2019-04-15 21:04:07 | [diff] [blame] | 90 | #include "ios/web/common/features.h" |
Eugene But | e79f274 | 2019-07-26 17:07:22 | [diff] [blame] | 91 | #include "ios/web/common/user_agent.h" |
Eugene But | b141623 | 2019-07-22 17:31:58 | [diff] [blame] | 92 | #include "ios/web/common/web_view_creation_util.h" |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 93 | |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 94 | #if BUILDFLAG(IOS_SCREEN_TIME_ENABLED) |
| 95 | #include "ios/chrome/browser/screen_time/features.h" |
| 96 | #endif |
| 97 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 98 | #if !defined(OFFICIAL_BUILD) |
| 99 | #include "components/variations/variations_switches.h" |
vitaliii | 489217aa | 2017-01-30 14:50:22 | [diff] [blame] | 100 | #endif |
stkhapugin | c1be179 | 2016-12-13 14:30:53 | [diff] [blame] | 101 | |
| 102 | #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 103 | #error "This file requires ARC support." |
| 104 | #endif |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 105 | |
elawrence | 816f6790e | 2017-06-16 18:19:28 | [diff] [blame] | 106 | using flags_ui::FeatureEntry; |
| 107 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 108 | namespace { |
Emily Stark | bafa906 | 2017-12-27 15:22:46 | [diff] [blame] | 109 | |
Olivier Robin | 3d6041162 | 2018-02-23 10:03:22 | [diff] [blame] | 110 | const FeatureEntry::Choice kAutofillIOSDelayBetweenFieldsChoices[] = { |
| 111 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 112 | {"0", autofill::switches::kAutofillIOSDelayBetweenFields, "0"}, |
| 113 | {"10", autofill::switches::kAutofillIOSDelayBetweenFields, "10"}, |
| 114 | {"20", autofill::switches::kAutofillIOSDelayBetweenFields, "20"}, |
| 115 | {"50", autofill::switches::kAutofillIOSDelayBetweenFields, "50"}, |
| 116 | {"100", autofill::switches::kAutofillIOSDelayBetweenFields, "100"}, |
| 117 | {"200", autofill::switches::kAutofillIOSDelayBetweenFields, "200"}, |
| 118 | {"500", autofill::switches::kAutofillIOSDelayBetweenFields, "500"}, |
| 119 | {"1000", autofill::switches::kAutofillIOSDelayBetweenFields, "1000"}, |
| 120 | }; |
| 121 | |
Nohemi Fernandez | 222d6d4 | 2020-09-30 20:35:57 | [diff] [blame] | 122 | const FeatureEntry::Choice kDelayThresholdMinutesToUpdateGaiaCookieChoices[] = { |
| 123 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 124 | {"0", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "0"}, |
| 125 | {"10", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "10"}, |
| 126 | {"60", signin::kDelayThresholdMinutesToUpdateGaiaCookie, "60"}, |
| 127 | }; |
| 128 | |
Nohemi Fernandez | c00842a | 2021-07-26 11:47:34 | [diff] [blame] | 129 | const FeatureEntry::Choice |
| 130 | kWaitThresholdMillisecondsForCapabilitiesApiChoices[] = { |
| 131 | {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 132 | {"200", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "200"}, |
| 133 | {"500", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "500"}, |
| 134 | {"5000", signin::kWaitThresholdMillisecondsForCapabilitiesApi, "5000"}, |
| 135 | }; |
| 136 | |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 137 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = { |
| 138 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}}; |
| 139 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = { |
| 140 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}}; |
| 141 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches5[] = { |
| 142 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "5"}}; |
| 143 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = { |
| 144 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}}; |
| 145 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = { |
| 146 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}}; |
| 147 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = { |
| 148 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}}; |
| 149 | const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = { |
| 150 | {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}}; |
| 151 | |
| 152 | const FeatureEntry::FeatureVariation |
| 153 | kOmniboxUIMaxAutocompleteMatchesVariations[] = { |
| 154 | {"3 matches", kOmniboxUIMaxAutocompleteMatches3, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 155 | std::size(kOmniboxUIMaxAutocompleteMatches3), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 156 | {"4 matches", kOmniboxUIMaxAutocompleteMatches4, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 157 | std::size(kOmniboxUIMaxAutocompleteMatches4), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 158 | {"5 matches", kOmniboxUIMaxAutocompleteMatches5, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 159 | std::size(kOmniboxUIMaxAutocompleteMatches5), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 160 | {"6 matches", kOmniboxUIMaxAutocompleteMatches6, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 161 | std::size(kOmniboxUIMaxAutocompleteMatches6), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 162 | {"8 matches", kOmniboxUIMaxAutocompleteMatches8, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 163 | std::size(kOmniboxUIMaxAutocompleteMatches8), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 164 | {"10 matches", kOmniboxUIMaxAutocompleteMatches10, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 165 | std::size(kOmniboxUIMaxAutocompleteMatches10), nullptr}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 166 | {"12 matches", kOmniboxUIMaxAutocompleteMatches12, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 167 | std::size(kOmniboxUIMaxAutocompleteMatches12), nullptr}}; |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 168 | |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 169 | const FeatureEntry::FeatureParam |
| 170 | kAutofillUseMobileLabelDisambiguationShowAll[] = { |
| 171 | {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName, |
| 172 | autofill::features:: |
| 173 | kAutofillUseMobileLabelDisambiguationParameterShowAll}}; |
| 174 | const FeatureEntry::FeatureParam |
| 175 | kAutofillUseMobileLabelDisambiguationShowOne[] = { |
| 176 | {autofill::features::kAutofillUseMobileLabelDisambiguationParameterName, |
| 177 | autofill::features:: |
| 178 | kAutofillUseMobileLabelDisambiguationParameterShowOne}}; |
| 179 | |
| 180 | const FeatureEntry::FeatureVariation |
| 181 | kAutofillUseMobileLabelDisambiguationVariations[] = { |
| 182 | {"(show all)", kAutofillUseMobileLabelDisambiguationShowAll, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 183 | std::size(kAutofillUseMobileLabelDisambiguationShowAll), nullptr}, |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 184 | {"(show one)", kAutofillUseMobileLabelDisambiguationShowOne, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 185 | std::size(kAutofillUseMobileLabelDisambiguationShowOne), nullptr}}; |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 186 | |
Javier Ernesto Flores Robles | e85f4a1 | 2021-02-23 18:10:10 | [diff] [blame] | 187 | const FeatureEntry::FeatureParam |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 188 | kDefaultBrowserFullscreenPromoExperimentRemindMeLater[] = { |
| 189 | {kDefaultBrowserFullscreenPromoExperimentRemindMeGroupParam, "true"}}; |
| 190 | const FeatureEntry::FeatureVariation |
| 191 | kDefaultBrowserFullscreenPromoExperimentVariations[] = { |
| 192 | {"Remind me later", |
| 193 | kDefaultBrowserFullscreenPromoExperimentRemindMeLater, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 194 | std::size(kDefaultBrowserFullscreenPromoExperimentRemindMeLater), |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 195 | nullptr}}; |
| 196 | |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 197 | const FeatureEntry::FeatureParam kDiscoverFeedInNtpEnableNativeUI[] = { |
| 198 | {kDiscoverFeedIsNativeUIEnabled, "true"}}; |
| 199 | const FeatureEntry::FeatureVariation kDiscoverFeedInNtpVariations[] = { |
| 200 | {"Native UI", kDiscoverFeedInNtpEnableNativeUI, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 201 | std::size(kDiscoverFeedInNtpEnableNativeUI), nullptr}}; |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 202 | |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 203 | const FeatureEntry::FeatureParam kDiscoverFeedSRSReconstructedTemplates[] = { |
| 204 | {kDiscoverFeedSRSReconstructedTemplatesEnabled, "true"}}; |
| 205 | const FeatureEntry::FeatureParam kDiscoverFeedSRSPreloadTemplates[] = { |
| 206 | {kDiscoverFeedSRSPreloadTemplatesEnabled, "true"}}; |
| 207 | const FeatureEntry::FeatureVariation |
| 208 | kEnableDiscoverFeedStaticResourceServingVariations[] = { |
| 209 | {"Reconstruct Templates", kDiscoverFeedSRSReconstructedTemplates, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 210 | std::size(kDiscoverFeedSRSReconstructedTemplates), nullptr}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 211 | {"Preload Templates", kDiscoverFeedSRSPreloadTemplates, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 212 | std::size(kDiscoverFeedSRSPreloadTemplates), nullptr}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 213 | }; |
| 214 | |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 215 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion1[] = { |
| 216 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 217 | kIOSOmniboxUpdatedPopupUIVariation1}}; |
| 218 | const FeatureEntry::FeatureParam kiOSOmniboxUpdatedPopupUIVersion2[] = { |
| 219 | {kIOSOmniboxUpdatedPopupUIVariationName, |
| 220 | kIOSOmniboxUpdatedPopupUIVariation2}}; |
| 221 | const FeatureEntry::FeatureVariation kiOSOmniboxUpdatedPopupUIVariations[] = { |
| 222 | {"Version 1", kiOSOmniboxUpdatedPopupUIVersion1, |
| 223 | std::size(kiOSOmniboxUpdatedPopupUIVersion1), nullptr}, |
| 224 | {"Version 2", kiOSOmniboxUpdatedPopupUIVersion2, |
| 225 | std::size(kiOSOmniboxUpdatedPopupUIVersion2), nullptr}}; |
| 226 | |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 227 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsShrinkLogo[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 228 | {kStartSurfaceShrinkLogoParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 229 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 230 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsHideShortcuts[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 231 | {kStartSurfaceHideShortcutsParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 232 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 233 | const FeatureEntry::FeatureParam kStartSurfaceTenSecondsReturnToRecentTab[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 234 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 235 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 236 | const FeatureEntry::FeatureParam |
| 237 | kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab[] = { |
| 238 | {kStartSurfaceShrinkLogoParam, "true"}, |
| 239 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 240 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 241 | const FeatureEntry::FeatureParam |
| 242 | kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab[] = { |
| 243 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 244 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 245 | {kReturnToStartSurfaceInactiveDurationInSeconds, "10"}}; |
| 246 | const FeatureEntry::FeatureParam kStartSurfaceOneHourShrinkLogo[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 247 | {kStartSurfaceShrinkLogoParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 248 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 249 | const FeatureEntry::FeatureParam kStartSurfaceOneHourHideShortcuts[] = { |
| 250 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 251 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 252 | const FeatureEntry::FeatureParam kStartSurfaceOneHourReturnToRecentTab[] = { |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 253 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 254 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 255 | const FeatureEntry::FeatureParam |
| 256 | kStartSurfaceOneHourShrinkLogoReturnToRecentTab[] = { |
| 257 | {kStartSurfaceShrinkLogoParam, "true"}, |
| 258 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 259 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
| 260 | const FeatureEntry::FeatureParam |
| 261 | kStartSurfaceOneHourHideShortcutsReturnToRecentTab[] = { |
| 262 | {kStartSurfaceHideShortcutsParam, "true"}, |
| 263 | {kStartSurfaceReturnToRecentTabParam, "true"}, |
| 264 | {kReturnToStartSurfaceInactiveDurationInSeconds, "3600"}}; |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 265 | |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 266 | const FeatureEntry::FeatureVariation kStartSurfaceVariations[] = { |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 267 | {"10s:Show Return to Recent Tab tile", |
| 268 | kStartSurfaceTenSecondsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 269 | std::size(kStartSurfaceTenSecondsReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 270 | {"10s:Shrink Logo", kStartSurfaceTenSecondsShrinkLogo, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 271 | std::size(kStartSurfaceTenSecondsShrinkLogo), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 272 | {"10s:Hide Shortcuts", kStartSurfaceTenSecondsHideShortcuts, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 273 | std::size(kStartSurfaceTenSecondsHideShortcuts), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 274 | {"10s:Shrink Logo and show Return to Recent Tab tile", |
| 275 | kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 276 | std::size(kStartSurfaceTenSecondsShrinkLogoReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 277 | {"10s:Hide Shortcuts and show Return to Recent Tab tile", |
| 278 | kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 279 | std::size(kStartSurfaceTenSecondsHideShortcutsReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 280 | {"1h:Show Return to Recent Tab tile", kStartSurfaceOneHourReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 281 | std::size(kStartSurfaceOneHourReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 282 | {"1h:Shrink Logo", kStartSurfaceOneHourShrinkLogo, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 283 | std::size(kStartSurfaceOneHourShrinkLogo), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 284 | {"1h:Hide Shortcuts", kStartSurfaceOneHourHideShortcuts, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 285 | std::size(kStartSurfaceOneHourHideShortcuts), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 286 | {"1h:Shrink Logo and show Return to Recent Tab tile", |
| 287 | kStartSurfaceOneHourShrinkLogoReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 288 | std::size(kStartSurfaceOneHourShrinkLogoReturnToRecentTab), nullptr}, |
gogerald | 53c6e7a | 2021-04-15 22:07:35 | [diff] [blame] | 289 | {"1h:Hide Shortcuts and show Return to Recent Tab tile", |
| 290 | kStartSurfaceOneHourHideShortcutsReturnToRecentTab, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 291 | std::size(kStartSurfaceOneHourHideShortcutsReturnToRecentTab), nullptr}, |
Chris Lu | 5470417c | 2021-03-03 18:43:08 | [diff] [blame] | 292 | }; |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 293 | |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 294 | const FeatureEntry::FeatureParam kFREDefaultPromoTestingDefaultDelay[] = { |
| 295 | {kFREDefaultPromoTestingDefaultDelayParam, "true"}}; |
Aliona DANGLA | ebfd7d02 | 2021-10-08 14:15:45 | [diff] [blame] | 296 | const FeatureEntry::FeatureParam kFREDefaultPromoTestingOnly[] = { |
| 297 | {kFREDefaultPromoTestingOnlyParam, "true"}}; |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 298 | const FeatureEntry::FeatureParam kFREDefaultPromoTestingShortDelay[] = { |
| 299 | {kFREDefaultPromoTestingShortDelayParam, "true"}}; |
| 300 | const FeatureEntry::FeatureVariation kFREDefaultPromoTestingVariations[] = { |
| 301 | {"Wait 14 days after FRE default browser promo", |
| 302 | kFREDefaultPromoTestingDefaultDelay, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 303 | std::size(kFREDefaultPromoTestingDefaultDelay), nullptr}, |
Aliona DANGLA | ebfd7d02 | 2021-10-08 14:15:45 | [diff] [blame] | 304 | {"FRE default browser promo only", kFREDefaultPromoTestingOnly, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 305 | std::size(kFREDefaultPromoTestingOnly), nullptr}, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 306 | {"Wait 3 days after FRE default browser promo", |
| 307 | kFREDefaultPromoTestingShortDelay, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 308 | std::size(kFREDefaultPromoTestingShortDelay), nullptr}, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 309 | }; |
| 310 | |
Veronique Nguyen | 6593c76 | 2021-11-30 17:28:56 | [diff] [blame] | 311 | const FeatureEntry::FeatureVariation kEnableFREUIModuleIOSVariations[] = { |
| 312 | {"TOP | OLD", |
| 313 | (FeatureEntry::FeatureParam[]){ |
| 314 | {kFREUIIdentitySwitcherPositionParam, "top"}, |
| 315 | {kFREUIStringsSetParam, "old"}}, |
| 316 | 2, nullptr}, |
| 317 | {"BOTTOM | OLD", |
| 318 | (FeatureEntry::FeatureParam[]){ |
| 319 | {kFREUIIdentitySwitcherPositionParam, "bottom"}, |
| 320 | {kFREUIStringsSetParam, "old"}}, |
| 321 | 2, nullptr}, |
| 322 | {"TOP | NEW", |
| 323 | (FeatureEntry::FeatureParam[]){ |
| 324 | {kFREUIIdentitySwitcherPositionParam, "top"}, |
| 325 | {kFREUIStringsSetParam, "new"}}, |
| 326 | 2, nullptr}, |
| 327 | {"BOTTOM | NEW", |
| 328 | (FeatureEntry::FeatureParam[]){ |
| 329 | {kFREUIIdentitySwitcherPositionParam, "bottom"}, |
| 330 | {kFREUIStringsSetParam, "new"}}, |
| 331 | 2, nullptr}}; |
| 332 | |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 333 | const FeatureEntry::FeatureParam kNewMICEFREWithUMADialog[] = { |
| 334 | {kNewMobileIdentityConsistencyFREParam, |
| 335 | kNewMobileIdentityConsistencyFREParamUMADialog}}; |
| 336 | const FeatureEntry::FeatureParam kNewMICEFREWithThreeSteps[] = { |
| 337 | {kNewMobileIdentityConsistencyFREParam, |
| 338 | kNewMobileIdentityConsistencyFREParamThreeSteps}}; |
| 339 | const FeatureEntry::FeatureParam kNewMICEFREWithTwoSteps[] = { |
| 340 | {kNewMobileIdentityConsistencyFREParam, |
| 341 | kNewMobileIdentityConsistencyFREParamTwoSteps}}; |
| 342 | const FeatureEntry::FeatureVariation |
| 343 | kNewMobileIdentityConsistencyFREVariations[] = { |
| 344 | {"New FRE with UMA dialog", kNewMICEFREWithUMADialog, |
| 345 | std::size(kNewMICEFREWithUMADialog), nullptr}, |
| 346 | {"new FRE with 3 steps", kNewMICEFREWithThreeSteps, |
| 347 | std::size(kNewMICEFREWithThreeSteps), nullptr}, |
| 348 | {"new FRE with 2 steps", kNewMICEFREWithTwoSteps, |
| 349 | std::size(kNewMICEFREWithTwoSteps), nullptr}}; |
| 350 | |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 351 | const FeatureEntry::FeatureParam kBubbleRichIPHTargetHighlight[] = { |
| 352 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterTargetHighlight}}; |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 353 | const FeatureEntry::FeatureParam kBubbleRichIPHExplicitDismissal[] = { |
| 354 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterExplicitDismissal}}; |
| 355 | const FeatureEntry::FeatureParam kBubbleRichIPHRich[] = { |
| 356 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRich}}; |
| 357 | const FeatureEntry::FeatureParam kBubbleRichIPHRichWithSnooze[] = { |
| 358 | {kBubbleRichIPHParameterName, kBubbleRichIPHParameterRichWithSnooze}}; |
| 359 | const FeatureEntry::FeatureVariation kBubbleRichIPHVariations[] = { |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 360 | {"Target Highlight", kBubbleRichIPHTargetHighlight, |
| 361 | std::size(kBubbleRichIPHTargetHighlight), nullptr}, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 362 | {"Explicit dismissal", kBubbleRichIPHExplicitDismissal, |
| 363 | std::size(kBubbleRichIPHExplicitDismissal), nullptr}, |
| 364 | {"Dismissal and rich content", kBubbleRichIPHRich, |
| 365 | std::size(kBubbleRichIPHRich), nullptr}, |
Louis Romero | 023cc505 | 2022-04-08 23:29:39 | [diff] [blame] | 366 | {"Dismissal, rich content, and snooze", kBubbleRichIPHRichWithSnooze, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 367 | std::size(kBubbleRichIPHRichWithSnooze), nullptr}, |
| 368 | }; |
| 369 | |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 370 | // To add a new entry, add to the end of kFeatureEntries. There are four |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 371 | // distinct types of entries: |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 372 | // . ENABLE_DISABLE_VALUE: entry is either enabled, disabled, or uses the |
| 373 | // default value for this feature. Use the ENABLE_DISABLE_VALUE_TYPE |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 374 | // macro for this type supplying the command line to the macro. |
| 375 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 376 | // deactivated state for this lab (i.e. no command line option). To specify |
| 377 | // this type of entry use the macro MULTI_VALUE_TYPE supplying it the |
| 378 | // array of choices. |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 379 | // . FEATURE_VALUE: entry is associated with a base::Feature instance. Entry is |
| 380 | // either enabled, disabled, or uses the default value of the associated |
| 381 | // base::Feature instance. To specify this type of entry use the macro |
| 382 | // FEATURE_VALUE_TYPE supplying it the base::Feature instance. |
| 383 | // . FEATURE_WITH_PARAM_VALUES: a list of choices associated with a |
| 384 | // base::Feature instance. Choices corresponding to the default state, a |
| 385 | // universally enabled state, and a universally disabled state are |
| 386 | // automatically included. To specify this type of entry use the macro |
| 387 | // FEATURE_WITH_PARAMS_VALUE_TYPE supplying it the base::Feature instance and |
| 388 | // the array of choices. |
| 389 | // |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 390 | // See the documentation of FeatureEntry for details on the fields. |
| 391 | // |
| 392 | // When adding a new choice, add it to the end of the list. |
| 393 | const flags_ui::FeatureEntry kFeatureEntries[] = { |
Cooper Knaak | 1e02656 | 2017-07-26 05:22:28 | [diff] [blame] | 394 | {"in-product-help-demo-mode-choice", |
| 395 | flag_descriptions::kInProductHelpDemoModeName, |
| 396 | flag_descriptions::kInProductHelpDemoModeDescription, flags_ui::kOsIos, |
| 397 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
Tommy Nyquist | c1d6dea1 | 2017-07-26 20:37:23 | [diff] [blame] | 398 | feature_engagement::kIPHDemoMode, |
| 399 | feature_engagement::kIPHDemoModeChoiceVariations, |
Marc Treib | 2752e8b | 2017-08-04 14:12:09 | [diff] [blame] | 400 | "IPH_DemoMode")}, |
Moe Ahmadi | c3fd7cd | 2018-05-11 21:40:22 | [diff] [blame] | 401 | {"enable-autofill-credit-card-upload", |
| 402 | flag_descriptions::kAutofillCreditCardUploadName, |
| 403 | flag_descriptions::kAutofillCreditCardUploadDescription, flags_ui::kOsIos, |
Anne Lim | 579b573 | 2018-08-30 18:24:24 | [diff] [blame] | 404 | FEATURE_VALUE_TYPE(autofill::features::kAutofillUpstream)}, |
Tina Wang | 41d431c | 2021-06-21 21:04:13 | [diff] [blame] | 405 | {"enable-discover-feed-preview", |
| 406 | flag_descriptions::kEnableDiscoverFeedPreviewName, |
| 407 | flag_descriptions::kEnableDiscoverFeedPreviewDescription, flags_ui::kOsIos, |
| 408 | FEATURE_VALUE_TYPE(kEnableDiscoverFeedPreview)}, |
Moe Ahmadi | d6d5d17 | 2018-06-20 17:20:23 | [diff] [blame] | 409 | {"use-sync-sandbox", flag_descriptions::kSyncSandboxName, |
| 410 | flag_descriptions::kSyncSandboxDescription, flags_ui::kOsIos, |
| 411 | SINGLE_VALUE_TYPE_AND_VALUE( |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 412 | syncer::kSyncServiceURL, |
Moe Ahmadi | d6d5d17 | 2018-06-20 17:20:23 | [diff] [blame] | 413 | "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")}, |
| 414 | {"wallet-service-use-sandbox", |
| 415 | flag_descriptions::kWalletServiceUseSandboxName, |
| 416 | flag_descriptions::kWalletServiceUseSandboxDescription, flags_ui::kOsIos, |
| 417 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 418 | autofill::switches::kWalletServiceUseSandbox, |
| 419 | "1", |
| 420 | autofill::switches::kWalletServiceUseSandbox, |
| 421 | "0")}, |
Mohamad Ahmadi | c4df81f | 2017-12-20 04:41:59 | [diff] [blame] | 422 | {"show-autofill-type-predictions", |
| 423 | flag_descriptions::kShowAutofillTypePredictionsName, |
| 424 | flag_descriptions::kShowAutofillTypePredictionsDescription, |
| 425 | flags_ui::kOsIos, |
Gauthier Ambard | cfd8518 | 2018-01-05 10:37:46 | [diff] [blame] | 426 | FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)}, |
Olivier Robin | 3d6041162 | 2018-02-23 10:03:22 | [diff] [blame] | 427 | {"autofill-ios-delay-between-fields", |
| 428 | flag_descriptions::kAutofillIOSDelayBetweenFieldsName, |
| 429 | flag_descriptions::kAutofillIOSDelayBetweenFieldsDescription, |
| 430 | flags_ui::kOsIos, MULTI_VALUE_TYPE(kAutofillIOSDelayBetweenFieldsChoices)}, |
Kurt Horimoto | dc33af3 | 2018-05-01 01:39:14 | [diff] [blame] | 431 | {"fullscreen-viewport-adjustment-experiment", |
Chris Lu | 481a932 | 2019-09-25 22:16:53 | [diff] [blame] | 432 | flag_descriptions::kFullscreenSmoothScrollingName, |
| 433 | flag_descriptions::kFullscreenSmoothScrollingDescription, flags_ui::kOsIos, |
| 434 | FEATURE_VALUE_TYPE(fullscreen::features::kSmoothScrollingDefault)}, |
Robbie Gibson | 1f37a5e | 2020-08-06 17:03:06 | [diff] [blame] | 435 | {"webpage-default-zoom-from-dynamic-type", |
| 436 | flag_descriptions::kWebPageDefaultZoomFromDynamicTypeName, |
| 437 | flag_descriptions::kWebPageDefaultZoomFromDynamicTypeDescription, |
| 438 | flags_ui::kOsIos, |
| 439 | FEATURE_VALUE_TYPE(web::kWebPageDefaultZoomFromDynamicType)}, |
Robbie Gibson | 88f2396 | 2020-09-28 14:35:56 | [diff] [blame] | 440 | {"webpage-alternative-text-zoom", |
| 441 | flag_descriptions::kWebPageAlternativeTextZoomName, |
| 442 | flag_descriptions::kWebPageAlternativeTextZoomDescription, |
| 443 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(web::kWebPageAlternativeTextZoom)}, |
Kurt Horimoto | 79d590b | 2018-09-12 19:09:28 | [diff] [blame] | 444 | {"toolbar-container", flag_descriptions::kToolbarContainerName, |
| 445 | flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos, |
| 446 | FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)}, |
Stepan Khapugin | cc4e984 | 2019-01-23 13:38:13 | [diff] [blame] | 447 | {"omnibox-ui-max-autocomplete-matches", |
| 448 | flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName, |
| 449 | flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription, |
| 450 | flags_ui::kOsIos, |
| 451 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 452 | omnibox::kUIExperimentMaxAutocompleteMatches, |
| 453 | kOmniboxUIMaxAutocompleteMatchesVariations, |
| 454 | "OmniboxUIMaxAutocompleteVariations")}, |
Robbie Gibson | 84f1ddc | 2020-12-10 21:41:28 | [diff] [blame] | 455 | {"omnibox-local-history-zero-suggest", |
| 456 | flag_descriptions::kOmniboxLocalHistoryZeroSuggestName, |
| 457 | flag_descriptions::kOmniboxLocalHistoryZeroSuggestDescription, |
| 458 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(omnibox::kLocalHistoryZeroSuggest)}, |
Justin Cohen | 20b6f07 | 2019-01-16 01:38:50 | [diff] [blame] | 459 | #if defined(DCHECK_IS_CONFIGURABLE) |
| 460 | {"dcheck-is-fatal", flag_descriptions::kDcheckIsFatalName, |
| 461 | flag_descriptions::kDcheckIsFatalDescription, flags_ui::kOsIos, |
| 462 | FEATURE_VALUE_TYPE(base::kDCheckIsFatalFeature)}, |
| 463 | #endif // defined(DCHECK_IS_CONFIGURABLE) |
Caitlin Fischer | 43edd90a | 2019-05-01 13:24:30 | [diff] [blame] | 464 | {"autofill-use-mobile-label-disambiguation", |
| 465 | flag_descriptions::kAutofillUseMobileLabelDisambiguationName, |
| 466 | flag_descriptions::kAutofillUseMobileLabelDisambiguationDescription, |
| 467 | flags_ui::kOsIos, |
Caitlin Fischer | 37e0123 | 2019-05-24 13:05:45 | [diff] [blame] | 468 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 469 | autofill::features::kAutofillUseMobileLabelDisambiguation, |
| 470 | kAutofillUseMobileLabelDisambiguationVariations, |
| 471 | "AutofillUseMobileLabelDisambiguation")}, |
Olivier Robin | 43814bb | 2021-06-22 15:25:45 | [diff] [blame] | 472 | {"metrickit-crash-reports", flag_descriptions::kMetrickitCrashReportName, |
| 473 | flag_descriptions::kMetrickitCrashReportDescription, flags_ui::kOsIos, |
| 474 | FEATURE_VALUE_TYPE(kMetrickitCrashReport)}, |
Mike Dougherty | b6c770d | 2019-09-13 22:56:46 | [diff] [blame] | 475 | {"ios-breadcrumbs", flag_descriptions::kLogBreadcrumbsName, |
| 476 | flag_descriptions::kLogBreadcrumbsDescription, flags_ui::kOsIos, |
Jesse McKenna | 85c1a59f | 2021-05-05 19:08:30 | [diff] [blame] | 477 | FEATURE_VALUE_TYPE(breadcrumbs::kLogBreadcrumbs)}, |
Eugene But | 2823dc7e | 2020-07-21 18:10:37 | [diff] [blame] | 478 | {"ios-synthetic-crash-reports", |
| 479 | flag_descriptions::kSyntheticCrashReportsForUteName, |
| 480 | flag_descriptions::kSyntheticCrashReportsForUteDescription, |
| 481 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSyntheticCrashReportsForUte)}, |
Jérôme Lebel | c374fdd | 2019-09-27 10:36:48 | [diff] [blame] | 482 | {"force-startup-signin-promo", |
| 483 | flag_descriptions::kForceStartupSigninPromoName, |
| 484 | flag_descriptions::kForceStartupSigninPromoDescription, flags_ui::kOsIos, |
Alice Wang | 345e0944 | 2021-07-05 09:03:29 | [diff] [blame] | 485 | FEATURE_VALUE_TYPE(switches::kForceStartupSigninPromo)}, |
Yoichi Osato | 7ae1175 | 2021-03-16 03:27:22 | [diff] [blame] | 486 | {"restore-session-from-cache", |
| 487 | flag_descriptions::kRestoreSessionFromCacheName, |
| 488 | flag_descriptions::kRestoreSessionFromCacheDescription, flags_ui::kOsIos, |
Justin Cohen | 3ec2522c | 2021-04-23 18:23:49 | [diff] [blame] | 489 | FEATURE_VALUE_TYPE(web::kRestoreSessionFromCache)}, |
sczs | 4622e6e | 2019-11-06 01:17:59 | [diff] [blame] | 490 | {"autofill-save-card-dismiss-on-navigation", |
| 491 | flag_descriptions::kAutofillSaveCardDismissOnNavigationName, |
| 492 | flag_descriptions::kAutofillSaveCardDismissOnNavigationDescription, |
| 493 | flags_ui::kOsIos, |
| 494 | FEATURE_VALUE_TYPE( |
| 495 | autofill::features::kAutofillSaveCardDismissOnNavigation)}, |
sczs | 37d9c13 | 2020-07-18 06:06:33 | [diff] [blame] | 496 | {"new-content-suggestions-feed", flag_descriptions::kDiscoverFeedInNtpName, |
adamta | 22a4d50 | 2020-05-21 03:12:21 | [diff] [blame] | 497 | flag_descriptions::kDiscoverFeedInNtpDescription, flags_ui::kOsIos, |
gogerald | db0d8ae | 2020-11-13 03:56:58 | [diff] [blame] | 498 | FEATURE_WITH_PARAMS_VALUE_TYPE(kDiscoverFeedInNtp, |
| 499 | kDiscoverFeedInNtpVariations, |
| 500 | "IOSDiscoverFeed")}, |
Roberto Moura | b87b972 | 2020-06-17 17:12:09 | [diff] [blame] | 501 | {"expanded-tab-strip", flag_descriptions::kExpandedTabStripName, |
| 502 | flag_descriptions::kExpandedTabStripDescription, flags_ui::kOsIos, |
| 503 | FEATURE_VALUE_TYPE(kExpandedTabStrip)}, |
Tommy Martino | 6b4eb7e | 2020-06-25 18:25:41 | [diff] [blame] | 504 | {"shared-highlighting-ios", flag_descriptions::kSharedHighlightingIOSName, |
| 505 | flag_descriptions::kSharedHighlightingIOSDescription, flags_ui::kOsIos, |
| 506 | FEATURE_VALUE_TYPE(kSharedHighlightingIOS)}, |
Veronique Nguyen | 6593c76 | 2021-11-30 17:28:56 | [diff] [blame] | 507 | {"enable-fre-ui-module-ios-with-options", |
| 508 | flag_descriptions::kEnableFREUIModuleIOSName, |
Tina Wang | a252ca4 | 2021-04-01 17:14:23 | [diff] [blame] | 509 | flag_descriptions::kEnableFREUIModuleIOSDescription, flags_ui::kOsIos, |
Veronique Nguyen | 6593c76 | 2021-11-30 17:28:56 | [diff] [blame] | 510 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREUIModuleIOS, |
| 511 | kEnableFREUIModuleIOSVariations, |
| 512 | "EnableFREUIModuleIOS")}, |
jlebel | 041fc1c | 2022-03-04 12:53:30 | [diff] [blame] | 513 | {"new-mobile-identity-consistency-fre", |
| 514 | flag_descriptions::kNewMobileIdentityConsistencyFREName, |
| 515 | flag_descriptions::kNewMobileIdentityConsistencyFREDescription, |
| 516 | flags_ui::kOsIos, |
| 517 | FEATURE_WITH_PARAMS_VALUE_TYPE(signin::kNewMobileIdentityConsistencyFRE, |
| 518 | kNewMobileIdentityConsistencyFREVariations, |
| 519 | "NewMobileIdentityConsistencyFRE")}, |
Tina Wang | 17514e2f | 2021-09-24 23:57:18 | [diff] [blame] | 520 | {"enable-long-message-duration", |
| 521 | flag_descriptions::kEnableLongMessageDurationName, |
| 522 | flag_descriptions::kEnableLongMessageDurationDescription, flags_ui::kOsIos, |
| 523 | FEATURE_VALUE_TYPE(kEnableLongMessageDuration)}, |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 524 | #if BUILDFLAG(IOS_SCREEN_TIME_ENABLED) |
edchin | 81467b8 | 2020-09-03 19:31:45 | [diff] [blame] | 525 | {"screen-time-integration-ios", |
| 526 | flag_descriptions::kScreenTimeIntegrationName, |
| 527 | flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos, |
| 528 | FEATURE_VALUE_TYPE(kScreenTimeIntegration)}, |
Sylvain Defresne | 9c10708 | 2020-10-27 16:39:13 | [diff] [blame] | 529 | #endif |
Nazerke | 3e993f7 | 2020-09-21 13:00:06 | [diff] [blame] | 530 | {"modern-tab-strip", flag_descriptions::kModernTabStripName, |
| 531 | flag_descriptions::kModernTabStripDescription, flags_ui::kOsIos, |
| 532 | FEATURE_VALUE_TYPE(kModernTabStrip)}, |
Nohemi Fernandez | 222d6d4 | 2020-09-30 20:35:57 | [diff] [blame] | 533 | {"minutes-delay-to-restore-gaia-cookies-if-deleted", |
| 534 | flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieName, |
| 535 | flag_descriptions::kDelayThresholdMinutesToUpdateGaiaCookieDescription, |
| 536 | flags_ui::kOsIos, |
| 537 | MULTI_VALUE_TYPE(kDelayThresholdMinutesToUpdateGaiaCookieChoices)}, |
Vidhan Jain | b4de5c5 | 2021-08-30 17:08:02 | [diff] [blame] | 538 | {"add-passwords-in-settings", |
| 539 | flag_descriptions::kAddPasswordsInSettingsName, |
| 540 | flag_descriptions::kAddPasswordsInSettingsDescription, flags_ui::kOsIos, |
| 541 | FEATURE_VALUE_TYPE( |
| 542 | password_manager::features::kSupportForAddPasswordsInSettings)}, |
Eugene But | f869bff | 2020-12-10 01:16:55 | [diff] [blame] | 543 | {"record-snapshot-size", flag_descriptions::kRecordSnapshotSizeName, |
| 544 | flag_descriptions::kRecordSnapshotSizeDescription, flags_ui::kOsIos, |
| 545 | FEATURE_VALUE_TYPE(web::features::kRecordSnapshotSize)}, |
Chris Lu | b17195f | 2020-12-10 20:49:14 | [diff] [blame] | 546 | {"default-browser-fullscreen-promo-experiment", |
| 547 | flag_descriptions::kDefaultBrowserFullscreenPromoExperimentName, |
| 548 | flag_descriptions::kDefaultBrowserFullscreenPromoExperimentDescription, |
| 549 | flags_ui::kOsIos, |
Javier Ernesto Flores Robles | 15941423 | 2021-06-16 14:29:59 | [diff] [blame] | 550 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 551 | kDefaultBrowserFullscreenPromoExperiment, |
| 552 | kDefaultBrowserFullscreenPromoExperimentVariations, |
| 553 | "IOSDefaultBrowserFullscreenPromoExperiment")}, |
Cheick Cisse | 76ade3d | 2020-12-16 00:15:11 | [diff] [blame] | 554 | {"ios-shared-highlighting-color-change", |
| 555 | flag_descriptions::kIOSSharedHighlightingColorChangeName, |
| 556 | flag_descriptions::kIOSSharedHighlightingColorChangeDescription, |
Cheick Cisse | d0b5bfe | 2021-02-11 14:23:07 | [diff] [blame] | 557 | flags_ui::kOsIos, |
| 558 | FEATURE_VALUE_TYPE(web::features::kIOSSharedHighlightingColorChange)}, |
Cheick Cisse | fe99486 | 2021-12-15 16:01:34 | [diff] [blame] | 559 | {"ios-shared-highlighting-v2", |
| 560 | flag_descriptions::kIOSSharedHighlightingV2Name, |
| 561 | flag_descriptions::kIOSSharedHighlightingV2Description, flags_ui::kOsIos, |
| 562 | FEATURE_VALUE_TYPE(shared_highlighting::kIOSSharedHighlightingV2)}, |
Stepan Khapugin | 0434120 | 2021-01-07 12:22:45 | [diff] [blame] | 563 | {"omnibox-new-textfield-implementation", |
| 564 | flag_descriptions::kOmniboxNewImplementationName, |
| 565 | flag_descriptions::kOmniboxNewImplementationDescription, flags_ui::kOsIos, |
| 566 | FEATURE_VALUE_TYPE(kIOSNewOmniboxImplementation)}, |
Stepan Khapugin | 422f08d | 2022-02-18 16:19:44 | [diff] [blame] | 567 | {"omnibox-new-popup-ui", flag_descriptions::kIOSOmniboxUpdatedPopupUIName, |
| 568 | flag_descriptions::kIOSOmniboxUpdatedPopupUIDescription, flags_ui::kOsIos, |
Robbie Gibson | 4635103 | 2022-03-31 19:46:23 | [diff] [blame] | 569 | FEATURE_WITH_PARAMS_VALUE_TYPE(kIOSOmniboxUpdatedPopupUI, |
| 570 | kiOSOmniboxUpdatedPopupUIVariations, |
| 571 | "kIOSOmniboxUpdatedPopupUI")}, |
gogerald | 0ff29e5 | 2021-02-03 18:56:19 | [diff] [blame] | 572 | {"start-surface", flag_descriptions::kStartSurfaceName, |
| 573 | flag_descriptions::kStartSurfaceDescription, flags_ui::kOsIos, |
gogerald | 0e39e3aa | 2021-02-10 18:41:23 | [diff] [blame] | 574 | FEATURE_WITH_PARAMS_VALUE_TYPE(kStartSurface, |
| 575 | kStartSurfaceVariations, |
| 576 | "StartSurface")}, |
Justin Cohen | 13ac7a20 | 2021-02-04 18:27:28 | [diff] [blame] | 577 | {"ios-crashpad", flag_descriptions::kCrashpadIOSName, |
| 578 | flag_descriptions::kCrashpadIOSDescription, flags_ui::kOsIos, |
| 579 | FEATURE_VALUE_TYPE(kCrashpadIOS)}, |
Vidhan Jain | 451b475 | 2021-07-15 10:16:42 | [diff] [blame] | 580 | {"autofill-address-verification-in-save-prompt", |
| 581 | flag_descriptions::kEnableAutofillAddressSavePromptAddressVerificationName, |
| 582 | flag_descriptions:: |
| 583 | kEnableAutofillAddressSavePromptAddressVerificationDescription, |
| 584 | flags_ui::kOsIos, |
| 585 | FEATURE_VALUE_TYPE( |
| 586 | autofill::features:: |
| 587 | kAutofillAddressProfileSavePromptAddressVerificationSupport)}, |
Vidhan Jain | a6574155 | 2021-03-09 17:18:27 | [diff] [blame] | 588 | {"autofill-address-save-prompt", |
| 589 | flag_descriptions::kEnableAutofillAddressSavePromptName, |
| 590 | flag_descriptions::kEnableAutofillAddressSavePromptDescription, |
| 591 | flags_ui::kOsIos, |
| 592 | FEATURE_VALUE_TYPE(autofill::features::kAutofillAddressProfileSavePrompt)}, |
Viktor Semeniuk | 68e794a | 2021-03-24 10:23:25 | [diff] [blame] | 593 | {"filling-across-affiliated-websites", |
| 594 | flag_descriptions::kFillingAcrossAffiliatedWebsitesName, |
| 595 | flag_descriptions::kFillingAcrossAffiliatedWebsitesDescription, |
| 596 | flags_ui::kOsIos, |
| 597 | FEATURE_VALUE_TYPE( |
| 598 | password_manager::features::kFillingAcrossAffiliatedWebsites)}, |
Jared Saul | d47c2b7 | 2021-03-25 22:47:31 | [diff] [blame] | 599 | {"autofill-parse-merchant-promo-code-fields", |
| 600 | flag_descriptions::kAutofillParseMerchantPromoCodeFieldsName, |
| 601 | flag_descriptions::kAutofillParseMerchantPromoCodeFieldsDescription, |
| 602 | flags_ui::kOsIos, |
| 603 | FEATURE_VALUE_TYPE( |
| 604 | autofill::features::kAutofillParseMerchantPromoCodeFields)}, |
edchin | 257cea2f | 2021-04-07 13:07:13 | [diff] [blame] | 605 | {"interest-feed-v2-clicks-and-views-cond-upload", |
| 606 | flag_descriptions::kInterestFeedV2ClickAndViewActionsConditionalUploadName, |
| 607 | flag_descriptions:: |
| 608 | kInterestFeedV2ClickAndViewActionsConditionalUploadDescription, |
| 609 | flags_ui::kOsIos, |
| 610 | FEATURE_VALUE_TYPE(feed::kInterestFeedV2ClicksAndViewsConditionalUpload)}, |
Mohammad Refaat | 76b14f54 | 2021-10-27 14:46:55 | [diff] [blame] | 611 | {"tabs-search-ios", flag_descriptions::kTabsSearchName, |
| 612 | flag_descriptions::kTabsSearchDescription, flags_ui::kOsIos, |
| 613 | FEATURE_VALUE_TYPE(kTabsSearch)}, |
Mohammad Refaat | 9541008 | 2022-02-23 02:01:02 | [diff] [blame] | 614 | {"tabs-search-regular-results-suggested-actions-ios", |
| 615 | flag_descriptions::kTabsSearchRegularResultsSuggestedActionsName, |
| 616 | flag_descriptions::kTabsSearchRegularResultsSuggestedActionsDescription, |
| 617 | flags_ui::kOsIos, |
| 618 | FEATURE_VALUE_TYPE(kTabsSearchRegularResultsSuggestedActions)}, |
Side Yilmaz | 0e6c15a | 2021-04-26 12:55:09 | [diff] [blame] | 619 | {"incognito-brand-consistency-for-ios", |
| 620 | flag_descriptions::kIncognitoBrandConsistencyForIOSName, |
| 621 | flag_descriptions::kIncognitoBrandConsistencyForIOSDescription, |
| 622 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kIncognitoBrandConsistencyForIOS)}, |
Side Yilmaz | 6c53f710 | 2021-09-07 13:26:19 | [diff] [blame] | 623 | {"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName, |
| 624 | flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos, |
| 625 | FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)}, |
Side YILMAZ | 4b40a308 | 2022-04-11 10:13:33 | [diff] [blame] | 626 | {"update-history-entry-points-in-incognito", |
| 627 | flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName, |
| 628 | flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription, |
| 629 | flags_ui::kOsIos, |
| 630 | FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)}, |
jlebel | d95434d65 | 2021-06-22 10:32:48 | [diff] [blame] | 631 | {"sync-trusted-vault-passphrase-ios-rpc", |
| 632 | flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName, |
| 633 | flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription, |
| 634 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 635 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseiOSRPC)}, |
Mikel Astiz | 850b0fe | 2021-06-16 09:47:27 | [diff] [blame] | 636 | {"sync-trusted-vault-passphrase-promo", |
| 637 | flag_descriptions::kSyncTrustedVaultPassphrasePromoName, |
| 638 | flag_descriptions::kSyncTrustedVaultPassphrasePromoDescription, |
| 639 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 640 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphrasePromo)}, |
Mikel Astiz | 850b0fe | 2021-06-16 09:47:27 | [diff] [blame] | 641 | {"sync-trusted-vault-passphrase-recovery", |
| 642 | flag_descriptions::kSyncTrustedVaultPassphraseRecoveryName, |
| 643 | flag_descriptions::kSyncTrustedVaultPassphraseRecoveryDescription, |
| 644 | flags_ui::kOsIos, |
Victor Hugo Vianna Silva | 3cd7ae9 | 2022-02-09 20:49:51 | [diff] [blame] | 645 | FEATURE_VALUE_TYPE(::syncer::kSyncTrustedVaultPassphraseRecovery)}, |
Nohemi Fernandez | c00842a | 2021-07-26 11:47:34 | [diff] [blame] | 646 | {"wait-threshold-seconds-for-capabilities-api", |
| 647 | flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiName, |
| 648 | flag_descriptions::kWaitThresholdMillisecondsForCapabilitiesApiDescription, |
| 649 | flags_ui::kOsIos, |
| 650 | MULTI_VALUE_TYPE(kWaitThresholdMillisecondsForCapabilitiesApiChoices)}, |
Jared Saul | 2188f76 | 2021-08-02 21:22:23 | [diff] [blame] | 651 | {"autofill-fill-merchant-promo-code-fields", |
| 652 | flag_descriptions::kAutofillFillMerchantPromoCodeFieldsName, |
| 653 | flag_descriptions::kAutofillFillMerchantPromoCodeFieldsDescription, |
| 654 | flags_ui::kOsIos, |
| 655 | FEATURE_VALUE_TYPE( |
| 656 | autofill::features::kAutofillFillMerchantPromoCodeFields)}, |
Gauthier Ambard | 14d3a26 | 2021-08-09 18:09:23 | [diff] [blame] | 657 | {"context-menu-phase2", |
| 658 | flag_descriptions::kWebViewNativeContextMenuPhase2Name, |
| 659 | flag_descriptions::kWebViewNativeContextMenuPhase2Description, |
| 660 | flags_ui::kOsIos, |
| 661 | FEATURE_VALUE_TYPE(web::features::kWebViewNativeContextMenuPhase2)}, |
Gauthier Ambard | 14d3a26 | 2021-08-09 18:09:23 | [diff] [blame] | 662 | {"default-wkwebview-context-menu", |
| 663 | flag_descriptions::kDefaultWebViewContextMenuName, |
| 664 | flag_descriptions::kDefaultWebViewContextMenuDescription, flags_ui::kOsIos, |
| 665 | FEATURE_VALUE_TYPE(web::features::kDefaultWebViewContextMenu)}, |
Sylvain Defresne | dff67e4 | 2021-09-24 09:43:03 | [diff] [blame] | 666 | {"new-overflow-menu", flag_descriptions::kNewOverflowMenuName, |
| 667 | flag_descriptions::kNewOverflowMenuDescription, flags_ui::kOsIos, |
| 668 | FEATURE_VALUE_TYPE(kNewOverflowMenu)}, |
| 669 | {"enable-new-download-api", flag_descriptions::kEnableNewDownloadAPIName, |
| 670 | flag_descriptions::kEnableNewDownloadAPIDescription, flags_ui::kOsIos, |
| 671 | FEATURE_VALUE_TYPE(web::features::kEnableNewDownloadAPI)}, |
Evan Bernstein | 0a85f33 | 2021-09-29 19:07:24 | [diff] [blame] | 672 | {"use-lens-to-search-for-image", |
| 673 | flag_descriptions::kUseLensToSearchForImageName, |
| 674 | flag_descriptions::kUseLensToSearchForImageDescription, flags_ui::kOsIos, |
Ali Juma | 02a9b7b | 2021-10-01 13:44:44 | [diff] [blame] | 675 | FEATURE_VALUE_TYPE(kUseLensToSearchForImage)}, |
Benjamin Williams | bee6ab6 | 2022-02-28 18:09:40 | [diff] [blame] | 676 | {"use-load-simulated-request-for-error-page-navigation", |
| 677 | flag_descriptions::kUseLoadSimulatedRequestForErrorPageNavigationName, |
| 678 | flag_descriptions:: |
| 679 | kUseLoadSimulatedRequestForErrorPageNavigationDescription, |
| 680 | flags_ui::kOsIos, |
| 681 | FEATURE_VALUE_TYPE( |
| 682 | web::features::kUseLoadSimulatedRequestForErrorPageNavigation)}, |
Sergio Collazos | 9fcc6ed | 2021-10-06 00:58:03 | [diff] [blame] | 683 | {"enable-discover-feed-static-resource-serving", |
| 684 | flag_descriptions::kEnableDiscoverFeedStaticResourceServingName, |
| 685 | flag_descriptions::kEnableDiscoverFeedStaticResourceServingDescription, |
| 686 | flags_ui::kOsIos, |
| 687 | FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 688 | kEnableDiscoverFeedStaticResourceServing, |
| 689 | kEnableDiscoverFeedStaticResourceServingVariations, |
| 690 | "IOSDiscoverFeedStaticResourceServing")}, |
| 691 | {"enable-disco-feed-endpoint", |
| 692 | flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointName, |
| 693 | flag_descriptions::kEnableDiscoverFeedDiscoFeedEndpointDescription, |
| 694 | flags_ui::kOsIos, |
Aliona DANGLA | 8fae66f0 | 2021-10-06 15:47:11 | [diff] [blame] | 695 | FEATURE_VALUE_TYPE(kEnableDiscoverFeedDiscoFeedEndpoint)}, |
| 696 | {"enable-fre-default-browser-screen-testing", |
| 697 | flag_descriptions::kEnableFREDefaultBrowserScreenTestingName, |
| 698 | flag_descriptions::kEnableFREDefaultBrowserScreenTestingDescription, |
| 699 | flags_ui::kOsIos, |
| 700 | FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableFREDefaultBrowserScreenTesting, |
| 701 | kFREDefaultPromoTestingVariations, |
ginny huang | 5ba43b8 | 2021-10-06 18:28:18 | [diff] [blame] | 702 | "EnableFREDefaultBrowserScreenTesting")}, |
edchin | 1313f2b | 2021-10-11 08:08:47 | [diff] [blame] | 703 | {"enable-discover-feed-shorter-cache", |
| 704 | flag_descriptions::kEnableDiscoverFeedShorterCacheName, |
| 705 | flag_descriptions::kEnableDiscoverFeedShorterCacheDescription, |
| 706 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableDiscoverFeedShorterCache)}, |
Tommy Martino | 7393d76 | 2021-10-12 17:59:28 | [diff] [blame] | 707 | {"shared-highlighting-amp", |
| 708 | flag_descriptions::kIOSSharedHighlightingAmpName, |
| 709 | flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos, |
| 710 | FEATURE_VALUE_TYPE(shared_highlighting::kSharedHighlightingAmp)}, |
David Maunder | f4a5e1e | 2021-10-18 17:24:28 | [diff] [blame] | 711 | {"enable-commerce-price-tracking", |
Matt Jones | 125dfb4 | 2022-02-11 17:23:42 | [diff] [blame] | 712 | commerce::flag_descriptions::kCommercePriceTrackingName, |
| 713 | commerce::flag_descriptions::kCommercePriceTrackingDescription, |
| 714 | flags_ui::kOsIos, |
| 715 | FEATURE_WITH_PARAMS_VALUE_TYPE(commerce::kCommercePriceTracking, |
| 716 | commerce::kCommercePriceTrackingVariations, |
adamta | 67b6c581 | 2021-10-19 17:02:15 | [diff] [blame] | 717 | "CommercePriceTracking")}, |
Tina Wang | 8058d5f | 2021-11-04 20:06:06 | [diff] [blame] | 718 | {"web-feed-ios", flag_descriptions::kEnableWebChannelsName, |
| 719 | flag_descriptions::kEnableWebChannelsDescription, flags_ui::kOsIos, |
| 720 | FEATURE_VALUE_TYPE(kEnableWebChannels)}, |
adamta | 3933159 | 2021-11-01 20:18:54 | [diff] [blame] | 721 | {"ntp-view-hierarchy-repair", |
| 722 | flag_descriptions::kNTPViewHierarchyRepairName, |
| 723 | flag_descriptions::kNTPViewHierarchyRepairDescription, flags_ui::kOsIos, |
| 724 | FEATURE_VALUE_TYPE(kNTPViewHierarchyRepair)}, |
Chris Lu | 37588a9 | 2021-11-02 21:19:45 | [diff] [blame] | 725 | {"single-ntp", flag_descriptions::kSingleNtpName, |
| 726 | flag_descriptions::kSingleNtpDescription, flags_ui::kOsIos, |
| 727 | FEATURE_VALUE_TYPE(kSingleNtp)}, |
Justin Cohen | 69cec68 | 2021-11-04 20:10:26 | [diff] [blame] | 728 | {"synthesized-restore-session", |
| 729 | flag_descriptions::kSynthesizedRestoreSessionName, |
| 730 | flag_descriptions::kSynthesizedRestoreSessionDescription, flags_ui::kOsIos, |
| 731 | FEATURE_VALUE_TYPE(web::features::kSynthesizedRestoreSession)}, |
Chris Lu | 4723b82 | 2021-11-05 21:47:44 | [diff] [blame] | 732 | {"remove-extra-ntps", flag_descriptions::kRemoveExcessNTPsExperimentName, |
| 733 | flag_descriptions::kRemoveExcessNTPsExperimentDescription, |
Sylvain Defresne | 1619dd00 | 2021-11-06 10:09:48 | [diff] [blame] | 734 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kRemoveExcessNTPs)}, |
| 735 | {"lazily-create-web-state-on-restoration", |
| 736 | flag_descriptions::kLazilyCreateWebStateOnRestorationName, |
| 737 | flag_descriptions::kLazilyCreateWebStateOnRestorationDescription, |
| 738 | flags_ui::kOsIos, |
| 739 | FEATURE_VALUE_TYPE(web::features::kEnableUnrealizedWebStates)}, |
ginny huang | 1f1755c | 2021-11-11 23:38:23 | [diff] [blame] | 740 | {"enable-shortened-password-auto-fill-instruction", |
| 741 | flag_descriptions::kEnableShortenedPasswordAutoFillInstructionName, |
| 742 | flag_descriptions::kEnableShortenedPasswordAutoFillInstructionDescription, |
| 743 | flags_ui::kOsIos, |
| 744 | FEATURE_VALUE_TYPE(kEnableShortenedPasswordAutoFillInstruction)}, |
Benjamin Williams | 0e7e2fb | 2021-11-17 03:03:41 | [diff] [blame] | 745 | {"enable-password-manager-branding-update", |
| 746 | flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateName, |
| 747 | flag_descriptions::kIOSEnablePasswordManagerBrandingUpdateDescription, |
| 748 | flags_ui::kOsIos, |
Aliona DANGLA | e5b0b6e5 | 2021-11-30 11:58:19 | [diff] [blame] | 749 | FEATURE_VALUE_TYPE( |
| 750 | password_manager::features::kIOSEnablePasswordManagerBrandingUpdate)}, |
Gauthier Ambard | 1d326e2 | 2021-12-16 10:57:53 | [diff] [blame] | 751 | {"default-mode-ua", flag_descriptions::kAddSettingForDefaultPageModeName, |
| 752 | flag_descriptions::kAddSettingForDefaultPageModeDescription, |
| 753 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kAddSettingForDefaultPageMode)}, |
ginnnnnnny | 1532d87 | 2021-12-20 15:57:37 | [diff] [blame] | 754 | {"ios-media-permissions-control", |
| 755 | flag_descriptions::kMediaPermissionsControlName, |
| 756 | flag_descriptions::kMediaPermissionsControlDescription, flags_ui::kOsIos, |
| 757 | FEATURE_VALUE_TYPE(web::features::kMediaPermissionsControl)}, |
Olivier Robin | 3a957df | 2021-12-21 18:04:34 | [diff] [blame] | 758 | {"enable-save-session-tabs-in-separate-files", |
| 759 | flag_descriptions::kSaveSessionTabsToSeparateFilesName, |
| 760 | flag_descriptions::kSaveSessionTabsToSeparateFilesDescription, |
| 761 | flags_ui::kOsIos, |
| 762 | FEATURE_VALUE_TYPE(sessions::kSaveSessionTabsToSeparateFiles)}, |
Gauthier Ambard | 42ad0bb | 2021-12-22 16:50:48 | [diff] [blame] | 763 | {"use-sf-symbols-samples", flag_descriptions::kUseSFSymbolsSamplesName, |
| 764 | flag_descriptions::kUseSFSymbolsSamplesDescription, flags_ui::kOsIos, |
| 765 | FEATURE_VALUE_TYPE(kUseSFSymbolsSamples)}, |
Gauthier Ambard | fa18254 | 2022-01-07 08:27:50 | [diff] [blame] | 766 | {"use-new-popup-menu", flag_descriptions::kUseUIKitPopupMenuName, |
| 767 | flag_descriptions::kUseUIKitPopupMenuDescription, flags_ui::kOsIos, |
| 768 | FEATURE_VALUE_TYPE(kUseUIKitPopupMenu)}, |
Nohemi Fernandez | 76f5480 | 2022-01-10 18:23:32 | [diff] [blame] | 769 | {"enable-unicorn-account-support", |
| 770 | flag_descriptions::kEnableUnicornAccountSupportName, |
| 771 | flag_descriptions::kEnableUnicornAccountSupportDescription, |
| 772 | flags_ui::kOsIos, |
| 773 | FEATURE_VALUE_TYPE(signin::kEnableUnicornAccountSupport)}, |
Chris Lu | 411bea8 | 2022-01-12 18:19:22 | [diff] [blame] | 774 | {"single-cell-content-suggestions", |
| 775 | flag_descriptions::kSingleCellContentSuggestionsName, |
| 776 | flag_descriptions::kSingleCellContentSuggestionsDescription, |
| 777 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kSingleCellContentSuggestions)}, |
Chris Lu | e521105 | 2022-02-02 20:44:04 | [diff] [blame] | 778 | {"content-suggestions-header-migration", |
| 779 | flag_descriptions::kContentSuggestionsHeaderMigrationName, |
| 780 | flag_descriptions::kContentSuggestionsHeaderMigrationDescription, |
| 781 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kContentSuggestionsHeaderMigration)}, |
rgod | 90cca8b | 2022-02-04 12:38:27 | [diff] [blame] | 782 | {"leak-detection-unauthenticated", |
| 783 | flag_descriptions::kLeakDetectionUnauthenticatedName, |
| 784 | flag_descriptions::kLeakDetectionUnauthenticatedDescription, |
| 785 | flags_ui::kOsIos, |
| 786 | FEATURE_VALUE_TYPE( |
| 787 | password_manager::features::kLeakDetectionUnauthenticated)}, |
Veronique Nguyen | fc9824b | 2022-02-10 17:12:53 | [diff] [blame] | 788 | {"mute-compromised-passwords", |
| 789 | flag_descriptions::kMuteCompromisedPasswordsName, |
| 790 | flag_descriptions::kMuteCompromisedPasswordsDescription, flags_ui::kOsIos, |
| 791 | FEATURE_VALUE_TYPE(password_manager::features::kMuteCompromisedPasswords)}, |
Veronique Nguyen | 00ba26ea | 2022-02-25 14:57:17 | [diff] [blame] | 792 | {"enable-favicon-passwords", |
| 793 | flag_descriptions::kEnableFaviconForPasswordsName, |
| 794 | flag_descriptions::kEnableFaviconForPasswordsDescription, flags_ui::kOsIos, |
| 795 | FEATURE_VALUE_TYPE( |
| 796 | password_manager::features::kEnableFaviconForPasswords)}, |
Shivani Chauhan | bf97b0d | 2022-02-08 22:21:28 | [diff] [blame] | 797 | {"autofill-enable-sending-bcn-in-get-upload-details", |
| 798 | flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsName, |
| 799 | flag_descriptions::kAutofillEnableSendingBcnInGetUploadDetailsDescription, |
| 800 | flags_ui::kOsIos, |
| 801 | FEATURE_VALUE_TYPE( |
| 802 | autofill::features::kAutofillEnableSendingBcnInGetUploadDetails)}, |
Ali Juma | 1429cf8a | 2022-02-09 15:31:01 | [diff] [blame] | 803 | {"enable-fullscreen-api", flag_descriptions::kEnableFullscreenAPIName, |
| 804 | flag_descriptions::kEnableFullscreenAPIDescription, flags_ui::kOsIos, |
| 805 | FEATURE_VALUE_TYPE(web::features::kEnableFullscreenAPI)}, |
Joemer Ramos | 3417573 | 2022-02-14 18:59:16 | [diff] [blame] | 806 | {"enable-enhanced-safe-browsing", |
| 807 | flag_descriptions::kEnhancedProtectionName, |
| 808 | flag_descriptions::kEnhancedProtectionDescription, flags_ui::kOsIos, |
| 809 | FEATURE_VALUE_TYPE(safe_browsing::kEnhancedProtection)}, |
Christian Xu | 612e285 | 2022-02-10 17:27:42 | [diff] [blame] | 810 | {"context-menu-phase2-screenshot", |
| 811 | flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotName, |
| 812 | flag_descriptions::kWebViewNativeContextMenuPhase2ScreenshotDescription, |
| 813 | flags_ui::kOsIos, |
| 814 | FEATURE_VALUE_TYPE( |
| 815 | web::features::kWebViewNativeContextMenuPhase2Screenshot)}, |
Shivani Chauhan | af1eb74d | 2022-02-11 21:13:19 | [diff] [blame] | 816 | {"autofill-enable-unmask-card-request-set-instrument-id", |
| 817 | flag_descriptions::kAutofillEnableUnmaskCardRequestSetInstrumentIdName, |
| 818 | flag_descriptions:: |
| 819 | kAutofillEnableUnmaskCardRequestSetInstrumentIdDescription, |
| 820 | flags_ui::kOsIos, |
| 821 | FEATURE_VALUE_TYPE( |
| 822 | autofill::features::kAutofillEnableUnmaskCardRequestSetInstrumentId)}, |
Victor Hugo Vianna Silva | f0a4400 | 2022-02-16 10:38:00 | [diff] [blame] | 823 | {"send-tab-to-self-signin-promo", |
| 824 | flag_descriptions::kSendTabToSelfSigninPromoName, |
| 825 | flag_descriptions::kSendTabToSelfSigninPromoDescription, flags_ui::kOsIos, |
| 826 | FEATURE_VALUE_TYPE(send_tab_to_self::kSendTabToSelfSigninPromo)}, |
Chris Lu | 7f560f7 | 2022-03-01 18:19:01 | [diff] [blame] | 827 | {"content-suggestions-uiviewcontroller-migration", |
| 828 | flag_descriptions::kContentSuggestionsUIViewControllerMigrationName, |
| 829 | flag_descriptions::kContentSuggestionsUIViewControllerMigrationDescription, |
| 830 | flags_ui::kOsIos, |
| 831 | FEATURE_VALUE_TYPE(kContentSuggestionsUIViewControllerMigration)}, |
Christian Xu | bd60c4b7 | 2022-03-22 15:25:01 | [diff] [blame] | 832 | {"bubble-rich-iph", flag_descriptions::kBubbleRichIPHName, |
| 833 | flag_descriptions::kBubbleRichIPHDescription, flags_ui::kOsIos, |
| 834 | FEATURE_WITH_PARAMS_VALUE_TYPE(kBubbleRichIPH, |
| 835 | kBubbleRichIPHVariations, |
| 836 | "BubbleRichIPH")}, |
Siyu An | ff02e74 | 2022-04-07 19:08:22 | [diff] [blame] | 837 | {"autofill-enforce-delays-in-strike-database", |
| 838 | flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseName, |
| 839 | flag_descriptions::kAutofillEnforceDelaysInStrikeDatabaseDescription, |
| 840 | flags_ui::kOsIos, |
| 841 | FEATURE_VALUE_TYPE( |
| 842 | autofill::features::kAutofillEnforceDelaysInStrikeDatabase)}, |
Ewann | 4f26056 | 2022-04-11 13:37:19 | [diff] [blame] | 843 | {"download-calendar", flag_descriptions::kDownloadCalendarName, |
| 844 | flag_descriptions::kDownloadCalendarDescription, flags_ui::kOsIos, |
| 845 | FEATURE_VALUE_TYPE(kDownloadCalendar)}, |
Louis Romero | fbfbd93 | 2022-04-15 18:04:50 | [diff] [blame] | 846 | {"uiview-window-observing", flag_descriptions::kUIViewWindowObservingName, |
| 847 | flag_descriptions::kUIViewWindowObservingDescription, flags_ui::kOsIos, |
| 848 | FEATURE_VALUE_TYPE(kUIViewWindowObserving)}, |
Jared Saul | b0473bd | 2022-04-20 00:03:41 | [diff] [blame] | 849 | {"autofill-upstream-allow-additional-email-domains", |
| 850 | flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsName, |
| 851 | flag_descriptions::kAutofillUpstreamAllowAdditionalEmailDomainsDescription, |
| 852 | flags_ui::kOsIos, |
| 853 | FEATURE_VALUE_TYPE( |
| 854 | autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains)}, |
| 855 | {"autofill-upstream-allow-all-email-domains", |
| 856 | flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsName, |
| 857 | flag_descriptions::kAutofillUpstreamAllowAllEmailDomainsDescription, |
| 858 | flags_ui::kOsIos, |
| 859 | FEATURE_VALUE_TYPE( |
| 860 | autofill::features::kAutofillUpstreamAllowAllEmailDomains)}, |
Olivier Robin | ffe767c | 2022-04-21 13:13:23 | [diff] [blame] | 861 | {"enable-tflite-language-detection", |
| 862 | flag_descriptions::kTFLiteLanguageDetectionName, |
| 863 | flag_descriptions::kTFLiteLanguageDetectionDescription, flags_ui::kOsIos, |
| 864 | FEATURE_VALUE_TYPE(translate::kTFLiteLanguageDetectionEnabled)}, |
| 865 | {"optimization-guide-model-downloading", |
| 866 | flag_descriptions::kOptimizationGuideModelDownloadingName, |
| 867 | flag_descriptions::kOptimizationGuideModelDownloadingDescription, |
| 868 | flags_ui::kOsIos, |
| 869 | FEATURE_VALUE_TYPE( |
| 870 | optimization_guide::features::kOptimizationGuideModelDownloading)}, |
| 871 | {"optimization-target-prediction", |
| 872 | flag_descriptions::kOptimizationTargetPredictionName, |
| 873 | flag_descriptions::kOptimizationTargetPredictionDescription, |
| 874 | flags_ui::kOsIos, |
| 875 | FEATURE_VALUE_TYPE( |
| 876 | optimization_guide::features::kOptimizationTargetPrediction)}, |
Rushan Suleymanov | 72730960 | 2022-04-28 20:08:54 | [diff] [blame] | 877 | {"sync-standalone-invalidations", flag_descriptions::kSyncInvalidationsName, |
| 878 | flag_descriptions::kSyncInvalidationsDescription, flags_ui::kOsIos, |
| 879 | FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidations)}, |
| 880 | {"sync-standalone-invalidations-wallet-and-offer", |
| 881 | flag_descriptions::kSyncInvalidationsWalletAndOfferName, |
| 882 | flag_descriptions::kSyncInvalidationsWalletAndOfferDescription, |
| 883 | flags_ui::kOsIos, |
| 884 | FEATURE_VALUE_TYPE(::syncer::kUseSyncInvalidationsForWalletAndOffer)}, |
Christian Xu | b8c06cd | 2022-04-29 20:55:01 | [diff] [blame^] | 885 | {"suggestions-scrolling-ipad", |
| 886 | flag_descriptions::kEnableSuggestionsScrollingOnIPadName, |
| 887 | flag_descriptions::kEnableSuggestionsScrollingOnIPadDescription, |
| 888 | flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableSuggestionsScrollingOnIPad)}, |
Sylvain Defresne | 1619dd00 | 2021-11-06 10:09:48 | [diff] [blame] | 889 | }; |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 890 | |
Rohit Rao | bed794c | 2020-04-27 15:27:45 | [diff] [blame] | 891 | bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { |
| 892 | return false; |
| 893 | } |
| 894 | |
| 895 | flags_ui::FlagsState& GetGlobalFlagsState() { |
| 896 | static base::NoDestructor<flags_ui::FlagsState> flags_state(kFeatureEntries, |
| 897 | nullptr); |
| 898 | return *flags_state; |
| 899 | } |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 900 | // Creates the experimental test policies map, used by AsyncPolicyLoader and |
| 901 | // PolicyLoaderIOS to locally enable policies. |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 902 | NSMutableDictionary* CreateExperimentalTestingPolicies() { |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 903 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 904 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 905 | // Shared variables for all enterprise experimental flags. |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 906 | NSMutableDictionary* testing_policies = [[NSMutableDictionary alloc] init]; |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 907 | NSMutableArray* allowed_experimental_policies = [[NSMutableArray alloc] init]; |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 908 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 909 | // Set some sample policy values for testing if EnableSamplePolicies is set to |
| 910 | // true. |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 911 | if ([defaults boolForKey:@"EnableSamplePolicies"]) { |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 912 | [testing_policies addEntriesFromDictionary:@{ |
Tina Wang | 59d0b7e | 2020-08-11 04:41:01 | [diff] [blame] | 913 | base::SysUTF8ToNSString(policy::key::kAutofillAddressEnabled) : @NO, |
| 914 | |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 915 | base::SysUTF8ToNSString(policy::key::kAutofillCreditCardEnabled) : @NO, |
| 916 | |
| 917 | // 2 = Disable all variations |
| 918 | base::SysUTF8ToNSString(policy::key::kChromeVariations) : @2, |
| 919 | |
| 920 | // 2 = Do not allow any site to show popups |
| 921 | base::SysUTF8ToNSString(policy::key::kDefaultPopupsSetting) : @2, |
| 922 | |
Tina Wang | 5abee80 | 2020-07-29 23:09:52 | [diff] [blame] | 923 | // Set default search engine. |
| 924 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderEnabled) : |
| 925 | @YES, |
| 926 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderSearchURL) : |
| 927 | @"http://www.google.com/search?q={searchTerms}", |
| 928 | base::SysUTF8ToNSString(policy::key::kDefaultSearchProviderName) : |
Tina Wang | 7cd0a06 | 2020-09-15 21:31:02 | [diff] [blame] | 929 | @"TestEngine", |
Tina Wang | 5abee80 | 2020-07-29 23:09:52 | [diff] [blame] | 930 | |
Tina Wang | 89068c8 | 2020-10-29 15:51:50 | [diff] [blame] | 931 | base::SysUTF8ToNSString(policy::key::kEditBookmarksEnabled) : @NO, |
| 932 | |
Gauthier Ambard | 21b2370 | 2021-04-16 16:11:27 | [diff] [blame] | 933 | base::SysUTF8ToNSString(policy::key::kNTPContentSuggestionsEnabled) : @NO, |
| 934 | |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 935 | base::SysUTF8ToNSString(policy::key::kPasswordManagerEnabled) : @NO, |
Tina Wang | 59d0b7e | 2020-08-11 04:41:01 | [diff] [blame] | 936 | |
| 937 | base::SysUTF8ToNSString(policy::key::kTranslateEnabled) : @NO, |
Tina Wang | 54dddfc2 | 2020-08-20 22:34:53 | [diff] [blame] | 938 | |
| 939 | // 2 = Enhanced safe browsing protection |
| 940 | base::SysUTF8ToNSString(policy::key::kSafeBrowsingProtectionLevel) : @2, |
| 941 | |
| 942 | base::SysUTF8ToNSString(policy::key::kSearchSuggestEnabled) : @YES, |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 943 | }]; |
| 944 | } |
| 945 | |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 946 | if ([defaults boolForKey:@"EnableSyncDisabledPolicy"]) { |
Guillaume Jenkins | fe46d3a | 2021-04-26 19:51:04 | [diff] [blame] | 947 | NSString* sync_policy_key = |
| 948 | base::SysUTF8ToNSString(policy::key::kSyncDisabled); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 949 | [testing_policies addEntriesFromDictionary:@{sync_policy_key : @YES}]; |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 950 | } |
Ewann | 227a3c0 | 2021-04-19 12:04:54 | [diff] [blame] | 951 | |
Ewann | 570a630 | 2021-08-17 07:22:42 | [diff] [blame] | 952 | // SyncTypesListDisabled policy. |
| 953 | NSString* Sync_types_list_disabled_key = |
| 954 | base::SysUTF8ToNSString(policy::key::kSyncTypesListDisabled); |
| 955 | NSMutableArray* Sync_types_list_disabled_values = |
| 956 | [[NSMutableArray alloc] init]; |
| 957 | if ([defaults boolForKey:@"SyncTypesListBookmarks"]) { |
| 958 | [Sync_types_list_disabled_values addObject:@"bookmarks"]; |
| 959 | } |
| 960 | if ([defaults boolForKey:@"SyncTypesListReadingList"]) { |
| 961 | [Sync_types_list_disabled_values addObject:@"readingList"]; |
| 962 | } |
| 963 | if ([defaults boolForKey:@"SyncTypesListPreferences"]) { |
| 964 | [Sync_types_list_disabled_values addObject:@"preferences"]; |
| 965 | } |
| 966 | if ([defaults boolForKey:@"SyncTypesListPasswords"]) { |
| 967 | [Sync_types_list_disabled_values addObject:@"passwords"]; |
| 968 | } |
| 969 | if ([defaults boolForKey:@"SyncTypesListAutofill"]) { |
| 970 | [Sync_types_list_disabled_values addObject:@"autofill"]; |
| 971 | } |
| 972 | if ([defaults boolForKey:@"SyncTypesListTypedUrls"]) { |
| 973 | [Sync_types_list_disabled_values addObject:@"typedUrls"]; |
| 974 | } |
| 975 | if ([defaults boolForKey:@"SyncTypesListTabs"]) { |
| 976 | [Sync_types_list_disabled_values addObject:@"tabs"]; |
| 977 | } |
| 978 | if ([Sync_types_list_disabled_values count]) { |
| 979 | [testing_policies addEntriesFromDictionary:@{ |
| 980 | Sync_types_list_disabled_key : Sync_types_list_disabled_values |
| 981 | }]; |
Ewann | 570a630 | 2021-08-17 07:22:42 | [diff] [blame] | 982 | } |
| 983 | |
Gauthier Ambard | 073eaa9 | 2021-11-22 15:24:13 | [diff] [blame] | 984 | // If an incognito mode availability is set, set the value. |
Tina Wang | c6bcf57 | 2021-01-27 18:15:52 | [diff] [blame] | 985 | NSString* incognito_policy_key = |
| 986 | base::SysUTF8ToNSString(policy::key::kIncognitoModeAvailability); |
| 987 | NSInteger incognito_mode_availability = |
| 988 | [defaults integerForKey:incognito_policy_key]; |
| 989 | if (incognito_mode_availability) { |
Tina Wang | c6bcf57 | 2021-01-27 18:15:52 | [diff] [blame] | 990 | [testing_policies addEntriesFromDictionary:@{ |
| 991 | incognito_policy_key : @(incognito_mode_availability), |
| 992 | }]; |
| 993 | } |
| 994 | |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 995 | NSString* restriction_pattern = |
| 996 | [defaults stringForKey:@"RestrictAccountsToPatterns"]; |
| 997 | if ([restriction_pattern length] > 0) { |
Ewann | b3bee38 | 2021-08-16 09:12:29 | [diff] [blame] | 998 | NSString* restrict_key = |
| 999 | base::SysUTF8ToNSString(policy::key::kRestrictAccountsToPatterns); |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 1000 | [testing_policies addEntriesFromDictionary:@{ |
Ewann | b3bee38 | 2021-08-16 09:12:29 | [diff] [blame] | 1001 | restrict_key : @[ restriction_pattern ] |
Ewann | 40a8f8a | 2021-07-29 10:01:20 | [diff] [blame] | 1002 | }]; |
| 1003 | } |
| 1004 | |
Vincent Boisselle | 19200bc | 2021-09-01 17:58:25 | [diff] [blame] | 1005 | // If the sign-in policy is set (not "None"), add the policy key to the list |
| 1006 | // of enabled experimental policies, and set the value. |
| 1007 | NSString* const kSigninPolicyKey = @"BrowserSignin"; |
| 1008 | NSInteger signin_policy_mode = [defaults integerForKey:kSigninPolicyKey]; |
| 1009 | if (signin_policy_mode) { |
| 1010 | // Remove the mode offset that was used to represent the unset policy. |
| 1011 | --signin_policy_mode; |
| 1012 | DCHECK(signin_policy_mode >= 0); |
| 1013 | |
Vincent Boisselle | 19200bc | 2021-09-01 17:58:25 | [diff] [blame] | 1014 | [testing_policies addEntriesFromDictionary:@{ |
| 1015 | kSigninPolicyKey : @(signin_policy_mode), |
| 1016 | }]; |
| 1017 | } |
| 1018 | |
Veronique Nguyen | 9b1044f | 2022-01-11 14:41:13 | [diff] [blame] | 1019 | // If the New Tab Page URL is set (not empty) add the value to the list of |
| 1020 | // test policies. |
| 1021 | NSString* ntp_location = [defaults stringForKey:@"NTPLocation"]; |
| 1022 | if ([ntp_location length] > 0) { |
| 1023 | NSString* ntp_location_key = |
| 1024 | base::SysUTF8ToNSString(policy::key::kNewTabPageLocation); |
| 1025 | [testing_policies |
| 1026 | addEntriesFromDictionary:@{ntp_location_key : ntp_location}]; |
Veronique Nguyen | 302d870 | 2022-01-12 21:18:57 | [diff] [blame] | 1027 | [allowed_experimental_policies addObject:ntp_location_key]; |
Veronique Nguyen | 9b1044f | 2022-01-11 14:41:13 | [diff] [blame] | 1028 | } |
| 1029 | |
Ali Juma | 9ec36d2 | 2022-03-28 14:53:12 | [diff] [blame] | 1030 | if ([defaults boolForKey:@"DisallowChromeDataInBackups"]) { |
| 1031 | NSString* allow_backups_key = |
| 1032 | base::SysUTF8ToNSString(policy::key::kAllowChromeDataInBackups); |
| 1033 | [testing_policies addEntriesFromDictionary:@{allow_backups_key : @NO}]; |
| 1034 | [allowed_experimental_policies addObject:allow_backups_key]; |
| 1035 | } |
| 1036 | |
Guillaume Jenkins | 25e9bd7 | 2020-08-27 17:39:06 | [diff] [blame] | 1037 | // If any experimental policy was allowed, set the EnableExperimentalPolicies |
| 1038 | // policy. |
| 1039 | if ([allowed_experimental_policies count] > 0) { |
| 1040 | [testing_policies setValue:allowed_experimental_policies |
| 1041 | forKey:base::SysUTF8ToNSString( |
| 1042 | policy::key::kEnableExperimentalPolicies)]; |
| 1043 | } |
| 1044 | |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1045 | // Warning: Add new flags to TestingPoliciesHash() below. |
| 1046 | |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1047 | return testing_policies; |
| 1048 | } |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1049 | |
| 1050 | // Generates a unique NSString based on currently monitored policies from |
| 1051 | // NSUserDefaults standardUserDefaults. |
| 1052 | NSString* TestingPoliciesHash() { |
| 1053 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1054 | return [NSString |
Ali Juma | 9ec36d2 | 2022-03-28 14:53:12 | [diff] [blame] | 1055 | stringWithFormat:@"%d|%d|%d|%d|%@|%d|%d|%d|%d|%d|%d|%d", |
| 1056 | [defaults boolForKey:@"DisallowChromeDataInBackups"], |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1057 | [defaults boolForKey:@"EnableSyncDisabledPolicy"], |
| 1058 | [defaults boolForKey:@"EnableSamplePolicies"], |
| 1059 | (int)[defaults |
| 1060 | integerForKey:@"IncognitoModeAvailability"], |
| 1061 | [defaults stringForKey:@"RestrictAccountsToPatterns"], |
| 1062 | [defaults boolForKey:@"SyncTypesListBookmarks"], |
| 1063 | [defaults boolForKey:@"SyncTypesListReadingList"], |
| 1064 | [defaults boolForKey:@"SyncTypesListPreferences"], |
| 1065 | [defaults boolForKey:@"SyncTypesListPasswords"], |
| 1066 | [defaults boolForKey:@"SyncTypesListAutofill"], |
| 1067 | [defaults boolForKey:@"SyncTypesListTypedUrls"], |
| 1068 | [defaults boolForKey:@"SyncTypesListTabs"]]; |
| 1069 | } |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1070 | } // namespace |
| 1071 | |
| 1072 | // Add all switches from experimental flags to |command_line|. |
| 1073 | void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) { |
| 1074 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1075 | |
| 1076 | // Set the UA flag if UseMobileSafariUA is enabled. |
| 1077 | if ([defaults boolForKey:@"UseMobileSafariUA"]) { |
| 1078 | // Safari uses "Vesion/", followed by the OS version excluding bugfix, where |
| 1079 | // Chrome puts its product token. |
| 1080 | int32_t major = 0; |
| 1081 | int32_t minor = 0; |
| 1082 | int32_t bugfix = 0; |
| 1083 | base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); |
| 1084 | std::string product = base::StringPrintf("Version/%d.%d", major, minor); |
| 1085 | |
| 1086 | command_line->AppendSwitchASCII(switches::kUserAgent, |
| 1087 | web::BuildMobileUserAgent(product)); |
| 1088 | } |
| 1089 | |
| 1090 | // Shared variables for all enterprise experimental flags. |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 1091 | NSMutableDictionary* testing_policies = CreateExperimentalTestingPolicies(); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1092 | |
| 1093 | // If a CBCM enrollment token is provided, force Chrome Browser Cloud |
| 1094 | // Management to enabled and add the token to the list of policies. |
| 1095 | NSString* token_key = |
| 1096 | base::SysUTF8ToNSString(policy::key::kCloudManagementEnrollmentToken); |
| 1097 | NSString* token = [defaults stringForKey:token_key]; |
| 1098 | |
| 1099 | if ([token length] > 0) { |
| 1100 | command_line->AppendSwitch(switches::kEnableChromeBrowserCloudManagement); |
| 1101 | [testing_policies setValue:token forKey:token_key]; |
| 1102 | } |
| 1103 | |
Vincent Boisselle | d042d55 | 2022-04-09 01:22:59 | [diff] [blame] | 1104 | if ([defaults boolForKey:@"EnableUserPolicy"]) { |
| 1105 | policy::EnableUserPolicy(); |
| 1106 | } |
| 1107 | |
Guillaume Jenkins | 57606d7 | 2020-08-13 17:32:55 | [diff] [blame] | 1108 | // If some policies were set, commit them to the app's registration defaults. |
| 1109 | if ([testing_policies count] > 0) { |
Guillaume Jenkins | eeb7007c | 2020-06-25 22:55:40 | [diff] [blame] | 1110 | NSDictionary* registration_defaults = |
| 1111 | @{kPolicyLoaderIOSConfigurationKey : testing_policies}; |
| 1112 | [defaults registerDefaults:registration_defaults]; |
| 1113 | } |
| 1114 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1115 | // Freeform commandline flags. These are added last, so that any flags added |
| 1116 | // earlier in this function take precedence. |
| 1117 | if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { |
| 1118 | base::CommandLine::StringVector flags; |
| 1119 | // Append an empty "program" argument. |
| 1120 | flags.push_back(""); |
| 1121 | |
| 1122 | // The number of flags corresponds to the number of text fields in |
| 1123 | // Experimental.plist. |
| 1124 | const int kNumFreeformFlags = 5; |
| 1125 | for (int i = 1; i <= kNumFreeformFlags; ++i) { |
| 1126 | NSString* key = |
| 1127 | [NSString stringWithFormat:@"FreeformCommandLineFlag%d", i]; |
| 1128 | NSString* flag = [defaults stringForKey:key]; |
| 1129 | if ([flag length]) { |
Robbie Gibson | c91ce62 | 2019-05-20 14:44:33 | [diff] [blame] | 1130 | // iOS keyboard replaces -- with —, so undo that. |
| 1131 | flag = [flag stringByReplacingOccurrencesOfString:@"—" |
| 1132 | withString:@"--" |
| 1133 | options:0 |
| 1134 | range:NSMakeRange(0, 1)]; |
| 1135 | // To make things easier, allow flags with no dashes by prepending them |
| 1136 | // here. This also allows for flags that just have one dash if they |
| 1137 | // exist. |
| 1138 | if (![flag hasPrefix:@"-"]) { |
| 1139 | flag = [@"--" stringByAppendingString:flag]; |
| 1140 | } |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1141 | flags.push_back(base::SysNSStringToUTF8(flag)); |
| 1142 | } |
| 1143 | } |
| 1144 | |
| 1145 | base::CommandLine temp_command_line(flags); |
| 1146 | command_line->AppendArguments(temp_command_line, false); |
| 1147 | } |
msarda | fc76f66 | 2017-02-24 12:46:28 | [diff] [blame] | 1148 | |
justincohen | dacc85d | 2017-06-28 23:34:10 | [diff] [blame] | 1149 | // Populate command line flag for 3rd party keyboard omnibox workaround. |
| 1150 | NSString* enableThirdPartyKeyboardWorkaround = |
| 1151 | [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"]; |
| 1152 | if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) { |
| 1153 | command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround); |
| 1154 | } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) { |
| 1155 | command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround); |
| 1156 | } |
| 1157 | |
Sylvain Defresne | d3cd8d9 | 2022-01-18 13:35:08 | [diff] [blame] | 1158 | ios::provider::AppendSwitchesFromExperimentalSettings(defaults, command_line); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1159 | } |
| 1160 | |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1161 | void MonitorExperimentalSettingsChanges() { |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1162 | // Startup values for settings to be observed. |
David Jean | 6f85d44f | 2021-08-19 08:08:45 | [diff] [blame] | 1163 | __block NSString* hash = TestingPoliciesHash(); |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1164 | static std::atomic_bool pending_check(false); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1165 | |
| 1166 | auto monitor = ^(NSNotification* notification) { |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1167 | bool has_pending_check = pending_check.exchange(true); |
| 1168 | if (has_pending_check) |
| 1169 | return; |
| 1170 | |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1171 | // Can be called from any thread from where the notification was sent, |
| 1172 | // but since it may change standardUserDefaults, and that has to be on main |
| 1173 | // thread, dispatch to main thread. |
| 1174 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 1175 | // Check if observed settings have changed. Since source and destination |
| 1176 | // are both user defaults, this is required to avoid cycling back here. |
| 1177 | NSString* newHash = TestingPoliciesHash(); |
| 1178 | if (![newHash isEqualToString:hash]) { |
| 1179 | hash = newHash; |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1180 | |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1181 | // Publish update. |
| 1182 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 1183 | NSMutableDictionary* testing_policies = |
Vincent Boisselle | ed0e6f1a | 2021-11-09 06:47:34 | [diff] [blame] | 1184 | CreateExperimentalTestingPolicies(); |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1185 | NSDictionary* registration_defaults = |
| 1186 | @{kPolicyLoaderIOSConfigurationKey : testing_policies}; |
| 1187 | [defaults registerDefaults:registration_defaults]; |
| 1188 | } |
David Jean | e83ed65 | 2021-08-25 14:52:48 | [diff] [blame] | 1189 | |
| 1190 | pending_check.store(false); |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1191 | }); |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1192 | }; |
| 1193 | |
| 1194 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
| 1195 | [center addObserverForName:NSUserDefaultsDidChangeNotification |
| 1196 | object:nil |
David Jean | bc0fae3 | 2021-08-25 10:31:39 | [diff] [blame] | 1197 | queue:nil |
David Jean | 5ca263c | 2021-08-18 09:19:30 | [diff] [blame] | 1198 | usingBlock:monitor]; |
| 1199 | } |
| 1200 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1201 | void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, |
| 1202 | base::CommandLine* command_line) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1203 | GetGlobalFlagsState().ConvertFlagsToSwitches( |
sdefresne | c976390 | 2015-12-02 10:30:11 | [diff] [blame] | 1204 | flags_storage, command_line, flags_ui::kAddSentinels, |
Gregory Chatzinoff | f652372 | 2017-11-21 01:33:53 | [diff] [blame] | 1205 | switches::kEnableFeatures, switches::kDisableFeatures); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1206 | } |
| 1207 | |
jkrcal | bf07337 | 2016-07-29 07:21:31 | [diff] [blame] | 1208 | std::vector<std::string> RegisterAllFeatureVariationParameters( |
| 1209 | flags_ui::FlagsStorage* flags_storage, |
| 1210 | base::FeatureList* feature_list) { |
Justin Cohen | 2e2adb5 | 2019-10-25 17:00:02 | [diff] [blame] | 1211 | // Occasionally DCHECK crashes on canary can be very distuptive. An |
| 1212 | // experimental flag was added to aid in temporarily disabling this for |
| 1213 | // canary testers. |
| 1214 | #if defined(DCHECK_IS_CONFIGURABLE) |
| 1215 | if (experimental_flags::AreDCHECKCrashesDisabled()) { |
| 1216 | std::vector<base::FeatureList::FeatureOverrideInfo> overrides; |
| 1217 | overrides.push_back( |
| 1218 | {std::cref(base::kDCheckIsFatalFeature), |
| 1219 | base::FeatureList::OverrideState::OVERRIDE_DISABLE_FEATURE}); |
| 1220 | feature_list->RegisterExtraFeatureOverrides(std::move(overrides)); |
| 1221 | } |
| 1222 | #endif // defined(DCHECK_IS_CONFIGURABLE) |
| 1223 | |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1224 | return GetGlobalFlagsState().RegisterAllFeatureVariationParameters( |
| 1225 | flags_storage, feature_list); |
jkrcal | bf07337 | 2016-07-29 07:21:31 | [diff] [blame] | 1226 | } |
| 1227 | |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1228 | void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage, |
| 1229 | flags_ui::FlagAccess access, |
Morten Stenshorne | 7afa580 | 2021-07-15 10:04:43 | [diff] [blame] | 1230 | base::Value::ListStorage& supported_entries, |
| 1231 | base::Value::ListStorage& unsupported_entries) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1232 | GetGlobalFlagsState().GetFlagFeatureEntries( |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1233 | flags_storage, access, supported_entries, unsupported_entries, |
Renjie Tang | 208c819 | 2020-11-03 00:46:51 | [diff] [blame] | 1234 | base::BindRepeating(&SkipConditionalFeatureEntry)); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1235 | } |
| 1236 | |
| 1237 | void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage, |
| 1238 | const std::string& internal_name, |
| 1239 | bool enable) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1240 | GetGlobalFlagsState().SetFeatureEntryEnabled(flags_storage, internal_name, |
| 1241 | enable); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1242 | } |
| 1243 | |
| 1244 | void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) { |
Sylvain Defresne | 8327a2f | 2019-01-17 14:19:18 | [diff] [blame] | 1245 | GetGlobalFlagsState().ResetAllFlags(flags_storage); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1246 | } |
| 1247 | |
| 1248 | namespace testing { |
| 1249 | |
Elly Fong-Jones | 323ab109 | 2021-08-23 22:36:31 | [diff] [blame] | 1250 | base::span<const flags_ui::FeatureEntry> GetFeatureEntries() { |
| 1251 | return base::span<const flags_ui::FeatureEntry>(kFeatureEntries, |
Daniel Cheng | 1f047a8 | 2022-02-26 10:04:53 | [diff] [blame] | 1252 | std::size(kFeatureEntries)); |
sdefresne | 14900ee | 2015-11-27 14:43:21 | [diff] [blame] | 1253 | } |
| 1254 | |
| 1255 | } // namespace testing |