Disable crash reporting by default for Brave Origin (#35253)

This commit is contained in:
Brian R. Bondy
2026-04-04 11:54:16 -04:00
committed by GitHub
parent a59c2d1fbe
commit 2d48fb7f59
4 changed files with 11 additions and 2 deletions
@@ -10,6 +10,7 @@
#include "base/notreached.h"
#include "brave/browser/metrics/brave_metrics_service_accessor.h"
#include "brave/browser/metrics/buildflags/buildflags.h"
#include "brave/components/brave_origin/buildflags/buildflags.h"
#include "brave/components/constants/pref_names.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/metrics_reporting_state.h"
@@ -18,6 +19,9 @@
#include "components/version_info/channel.h"
bool GetDefaultPrefValueForMetricsReporting() {
#if BUILDFLAG(IS_BRAVE_ORIGIN_BRANDED)
return false;
#else
auto channel = chrome::GetChannel();
switch (channel) {
case version_info::Channel::STABLE:
@@ -31,6 +35,7 @@ bool GetDefaultPrefValueForMetricsReporting() {
}
NOTREACHED() << "Unexpected value for channel: "
<< std::to_underlying(channel);
#endif // BUILDFLAG(IS_BRAVE_ORIGIN_BRANDED)
}
bool ShouldShowCrashReportPermissionAskDialog() {
@@ -60,7 +60,11 @@ function InputCheckbox(props: InputCheckboxProps) {
}
function HelpImprove() {
// <if expr="is_brave_origin_branded">
const [isMetricsReportingEnabled, setMetricsReportingEnabled] = React.useState(false)
// <else>
const [isMetricsReportingEnabled, setMetricsReportingEnabled] = React.useState(true)
// </if>
const [isP3AEnabled, setP3AEnabled] = React.useState(true)
const [completeURLPromise] = React.useState(() => {
return WelcomeBrowserProxyImpl.getInstance().getWelcomeCompleteURL()
@@ -21,7 +21,7 @@ provideStrings({
braveWelcomeSetDefaultButtonLabel: 'Set Brave as default browser',
braveWelcomeSelectAllButtonLabel: 'Select All',
braveWelcomeHelpImproveBraveTitle: 'Help make Brave better.',
braveWelcomeStabilityDiagnosticsTitle: 'Stability & Diagnostics',
braveWelcomeStabilityDiagnosticsTitle: 'Stability',
braveWelcomeSendReportsLabel: 'Send diagnostic reports if you experience a crash or freeze. $1Learn more.$1',
braveWelcomeSendInsightsLabel: 'Share private and anonymous product insights about what features are being used by Brave\'s users. $1Learn more.$1',
braveWelcomeSetupCompleteLabel: 'Setup complete',
@@ -61,7 +61,7 @@
</message>
<message name="IDS_BRAVE_WELCOME_STABILITY_DIAGNOSTICS_TITLE" desc="A title for screen that asks user to opt-in for diagnostic reports (Brave Origin)">
Stability &amp; Diagnostics
Stability
</message>
<message name="IDS_BRAVE_WELCOME_SEND_REPORTS_LABEL" desc="A checkbox label for user to opt-in opt-out to send diagnostic reports">