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