2014-02-26 12:39:20 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
2014-01-15 12:01:03 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
|
|
|
|
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
|
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "common/crash_reporter/crash_reporter.h"
|
2014-02-26 12:54:56 +00:00
|
|
|
#include "common/crash_reporter/linux/crash_dump_handler.h"
|
2014-01-15 12:01:03 +00:00
|
|
|
|
|
|
|
template <typename T> struct DefaultSingletonTraits;
|
|
|
|
|
2014-02-26 12:54:56 +00:00
|
|
|
namespace google_breakpad {
|
|
|
|
class MinidumpDescriptor;
|
|
|
|
}
|
|
|
|
|
2014-01-15 12:01:03 +00:00
|
|
|
namespace crash_reporter {
|
|
|
|
|
|
|
|
class CrashReporterLinux : public CrashReporter {
|
|
|
|
public:
|
|
|
|
static CrashReporterLinux* GetInstance();
|
|
|
|
|
|
|
|
virtual void InitBreakpad(const std::string& product_name,
|
|
|
|
const std::string& version,
|
|
|
|
const std::string& company_name,
|
|
|
|
const std::string& submit_url,
|
|
|
|
bool auto_submit,
|
|
|
|
bool skip_system_crash_handler) OVERRIDE;
|
|
|
|
virtual void SetUploadParameters() OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend struct DefaultSingletonTraits<CrashReporterLinux>;
|
|
|
|
|
|
|
|
CrashReporterLinux();
|
|
|
|
virtual ~CrashReporterLinux();
|
|
|
|
|
2014-02-26 12:39:20 +00:00
|
|
|
void EnableCrashDumping();
|
|
|
|
|
2014-02-26 12:54:56 +00:00
|
|
|
static bool CrashDone(const google_breakpad::MinidumpDescriptor& minidump,
|
|
|
|
void* context,
|
|
|
|
const bool succeeded);
|
|
|
|
|
|
|
|
CrashKeyStorage crash_keys_;
|
|
|
|
|
2014-01-15 12:01:03 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(CrashReporterLinux);
|
|
|
|
};
|
|
|
|
} // namespace crash_reporter
|
|
|
|
|
|
|
|
#endif // ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
|