Added finch control SendWebUIJavaScriptErrorReports
This will control a feature which will send reports if the JavaScript on
a WebUI surface has a serious error, such as an unhandled exception.
Following instruction from go/finch-feature-api
Launch bug: https://crbug.com/1134416
Bug: chromium:1121816
Change-Id: Iaf2ac7935bf0546a9d1cc3709448ab5695b62196
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462487
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Ian Barkley-Yeung <[email protected]>
Cr-Commit-Position: refs/heads/master@{#816621}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 6e937c88..50cdaf3 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2335,6 +2335,20 @@
constexpr char kAmbientModeInternalName[] = "enable-ambient-mode";
#endif // OS_CHROMEOS
+#if !defined(OS_WIN) && !defined(OS_FUCHSIA)
+const FeatureEntry::FeatureParam
+ kSendWebUIJavaScriptErrorReportsVariationSendToStaging[] = {
+ {features::kSendWebUIJavaScriptErrorReportsSendToProductionVariation,
+ "false"}};
+
+const FeatureEntry::FeatureVariation
+ kSendWebUIJavaScriptErrorReportsVariations[] = {
+ {"Send reports to staging server.",
+ kSendWebUIJavaScriptErrorReportsVariationSendToStaging,
+ base::size(kSendWebUIJavaScriptErrorReportsVariationSendToStaging),
+ nullptr}};
+#endif
+
#if defined(OS_ANDROID)
// The variations of --metrics-settings-android.
const FeatureEntry::FeatureParam kMetricsSettingsAndroidAlternativeOne[] = {
@@ -2442,6 +2456,16 @@
flag_descriptions::kWebrtcPipeWireCapturerDescription, kOsLinux,
FEATURE_VALUE_TYPE(features::kWebRtcPipeWireCapturer)},
#endif // defined(WEBRTC_USE_PIPEWIRE)
+#if !defined(OS_WIN) && !defined(OS_FUCHSIA)
+ {"send-webui-javascript-error-reports",
+ flag_descriptions::kSendWebUIJavaScriptErrorReportsName,
+ flag_descriptions::kSendWebUIJavaScriptErrorReportsDescription,
+ kOsLinux | kOsCrOS | kOsAndroid,
+ FEATURE_WITH_PARAMS_VALUE_TYPE(
+ features::kSendWebUIJavaScriptErrorReports,
+ kSendWebUIJavaScriptErrorReportsVariations,
+ "SendWebUIJavaScriptErrorReportsVariations")},
+#endif
#if !defined(OS_ANDROID)
{"enable-webrtc-remote-event-log",
flag_descriptions::kWebRtcRemoteEventLogName,