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