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