mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1384220 - remove --with-crashreporter-enable-percent configure option; r=ted.mielczarek
This option was added ~decade ago; AFAICT from bug archaeology, the option was added to prevent our servers from being overwhelmed. Somewhere over the years, however, we obtained more capable servers and the option disappeared from mozconfigs. It seems moderately unlikely that we'll have a need for this option again, and we could reintroduce this patch very easily in any event. Let's go ahead and remove it.
This commit is contained in:
parent
6961a5ba45
commit
320fa56056
@ -250,7 +250,6 @@ def old_configure_options(*options):
|
||||
'--with-app-name',
|
||||
'--with-arch',
|
||||
'--with-branding',
|
||||
'--with-crashreporter-enable-percent',
|
||||
'--with-cross-lib',
|
||||
'--with-debug-label',
|
||||
'--with-default-mozilla-five-home',
|
||||
|
@ -3112,17 +3112,6 @@ if test -n "$MOZ_CRASHREPORTER"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
MOZ_ARG_WITH_STRING(crashreporter-enable-percent,
|
||||
[ --with-crashreporter-enable-percent=NN
|
||||
Enable sending crash reports by default on NN% of users. (default=100)],
|
||||
[ val=`echo $withval | sed 's/[^0-9]//g'`
|
||||
MOZ_CRASHREPORTER_ENABLE_PERCENT="$val"])
|
||||
|
||||
if test -z "$MOZ_CRASHREPORTER_ENABLE_PERCENT"; then
|
||||
MOZ_CRASHREPORTER_ENABLE_PERCENT=100
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(MOZ_CRASHREPORTER_ENABLE_PERCENT, $MOZ_CRASHREPORTER_ENABLE_PERCENT)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = libjpeg-turbo configuration
|
||||
dnl ========================================================
|
||||
|
@ -439,12 +439,6 @@ void SendCompleted(bool success, const string& serverResponse)
|
||||
}
|
||||
}
|
||||
|
||||
bool ShouldEnableSending()
|
||||
{
|
||||
srand(time(0));
|
||||
return ((rand() % 100) < MOZ_CRASHREPORTER_ENABLE_PERCENT);
|
||||
}
|
||||
|
||||
static string ComputeDumpHash() {
|
||||
#ifdef XP_LINUX
|
||||
// On Linux we rely on the system-provided libcurl which uses nss so we have
|
||||
|
@ -115,7 +115,6 @@ namespace CrashReporter {
|
||||
bool escape);
|
||||
void LogMessage(const std::string& message);
|
||||
void DeleteDump();
|
||||
bool ShouldEnableSending();
|
||||
|
||||
// Telemetry ping
|
||||
bool SendCrashPing(StringTable& strings, const std::string& hash,
|
||||
|
@ -58,11 +58,9 @@ static void LoadSettings()
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gIncludeURLCheck),
|
||||
settings["IncludeURL"][0] != '0');
|
||||
}
|
||||
bool enabled;
|
||||
bool enabled = true;
|
||||
if (settings.find("SubmitReport") != settings.end())
|
||||
enabled = settings["SubmitReport"][0] != '0';
|
||||
else
|
||||
enabled = ShouldEnableSending();
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gSubmitReportCheck),
|
||||
enabled);
|
||||
}
|
||||
|
@ -169,14 +169,12 @@ static bool RestartApplication()
|
||||
// load default state of submit checkbox
|
||||
// we don't just do this via IB because we want the default to be
|
||||
// off a certain percentage of the time
|
||||
BOOL submitChecked = NO;
|
||||
BOOL submitChecked = YES;
|
||||
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
if (nil != [userDefaults objectForKey:@"submitReport"]) {
|
||||
submitChecked = [userDefaults boolForKey:@"submitReport"];
|
||||
submitChecked = [userDefaults boolForKey:@"submitReport"];
|
||||
}
|
||||
else {
|
||||
// use compile-time specified enable percentage
|
||||
submitChecked = ShouldEnableSending();
|
||||
[userDefaults setBool:submitChecked forKey:@"submitReport"];
|
||||
}
|
||||
[mSubmitReportButton setState:(submitChecked ? NSOnState : NSOffState)];
|
||||
|
@ -912,7 +912,7 @@ static BOOL CALLBACK CrashReporterDialogProc(HWND hwndDlg, UINT message,
|
||||
|
||||
if (!CheckBoolKey(gCrashReporterKey.c_str(),
|
||||
SUBMIT_REPORT_VALUE, &enabled))
|
||||
enabled = ShouldEnableSending();
|
||||
enabled = true;
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_SUBMITREPORTCHECK, enabled ? BST_CHECKED
|
||||
: BST_UNCHECKED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user