2013-07-04 07:54:34 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2013-11-13 09:29:35 +00:00
|
|
|
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
|
|
|
|
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
|
2013-07-04 07:54:34 +00:00
|
|
|
|
2013-11-14 10:02:15 +00:00
|
|
|
#include <map>
|
2013-07-04 07:54:34 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
|
|
|
namespace crash_reporter {
|
|
|
|
|
|
|
|
class CrashReporter {
|
|
|
|
public:
|
2013-11-18 10:27:50 +00:00
|
|
|
typedef std::map<std::string, std::string> StringMap;
|
|
|
|
|
2013-11-14 05:33:09 +00:00
|
|
|
static CrashReporter* GetInstance();
|
|
|
|
|
|
|
|
void Start(std::string product_name,
|
|
|
|
const std::string& company_name,
|
|
|
|
const std::string& submit_url,
|
|
|
|
bool auto_submit,
|
2013-11-18 10:27:50 +00:00
|
|
|
bool skip_system_crash_handler,
|
|
|
|
const StringMap& extra_parameters);
|
2013-11-14 05:33:09 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
CrashReporter();
|
|
|
|
virtual ~CrashReporter();
|
|
|
|
|
|
|
|
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) = 0;
|
2013-11-18 10:27:50 +00:00
|
|
|
virtual void SetUploadParameters() = 0;
|
2013-11-14 05:33:09 +00:00
|
|
|
|
2013-11-14 10:02:15 +00:00
|
|
|
StringMap upload_parameters_;
|
2013-11-14 05:33:09 +00:00
|
|
|
bool is_browser_;
|
2013-07-04 07:54:34 +00:00
|
|
|
|
|
|
|
private:
|
2013-11-18 10:27:50 +00:00
|
|
|
void SetUploadParameters(const StringMap& parameters);
|
|
|
|
|
2013-11-14 05:33:09 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(CrashReporter);
|
2013-07-04 07:54:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace crash_reporter
|
|
|
|
|
2013-11-13 09:29:35 +00:00
|
|
|
#endif // ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_H_
|