|
@@ -38,7 +38,8 @@ static const off_t kMaxMinidumpFileSize = 1258291;
|
|
|
|
|
|
CrashReporterLinux::CrashReporterLinux()
|
|
|
: process_start_time_(0),
|
|
|
- pid_(getpid()) {
|
|
|
+ pid_(getpid()),
|
|
|
+ upload_to_server_(true) {
|
|
|
// Set the base process start time value.
|
|
|
struct timeval tv;
|
|
|
if (!gettimeofday(&tv, NULL)) {
|
|
@@ -69,6 +70,7 @@ void CrashReporterLinux::InitBreakpad(const std::string& product_name,
|
|
|
crash_keys_->SetKeyValue("prod", ATOM_PRODUCT_NAME);
|
|
|
crash_keys_->SetKeyValue("ver", version.c_str());
|
|
|
upload_url_ = submit_url;
|
|
|
+ upload_to_server_ = upload_to_server;
|
|
|
|
|
|
for (StringMap::const_iterator iter = upload_parameters_.begin();
|
|
|
iter != upload_parameters_.end(); ++iter)
|
|
@@ -79,6 +81,14 @@ void CrashReporterLinux::SetUploadParameters() {
|
|
|
upload_parameters_["platform"] = "linux";
|
|
|
}
|
|
|
|
|
|
+void CrashReporterLinux::SetUploadToServer(const bool upload_to_server) {
|
|
|
+ upload_to_server_ = upload_to_server;
|
|
|
+}
|
|
|
+
|
|
|
+bool CrashReporterLinux::GetUploadToServer() {
|
|
|
+ return upload_to_server_;
|
|
|
+}
|
|
|
+
|
|
|
void CrashReporterLinux::EnableCrashDumping(const base::FilePath& crashes_dir) {
|
|
|
base::CreateDirectory(crashes_dir);
|
|
|
|
|
@@ -117,7 +127,7 @@ bool CrashReporterLinux::CrashDone(const MinidumpDescriptor& minidump,
|
|
|
info.fd = minidump.fd();
|
|
|
info.distro = base::g_linux_distro;
|
|
|
info.distro_length = my_strlen(base::g_linux_distro);
|
|
|
- info.upload = true;
|
|
|
+ info.upload = self->upload_to_server_;
|
|
|
info.process_start_time = self->process_start_time_;
|
|
|
info.oom_size = base::g_oom_size;
|
|
|
info.pid = self->pid_;
|