]> khamidou — GitHub mirrors - electron.git/commitdiff
Add dummy implementation of crash reporter.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 15 Jan 2014 12:01:03 +0000 (12:01 +0000)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 15 Jan 2014 12:01:03 +0000 (12:01 +0000)
atom.gyp
common/crash_reporter/crash_reporter_linux.cc [new file with mode: 0644]
common/crash_reporter/crash_reporter_linux.h [new file with mode: 0644]

index f75aac85c256ae2bd3d171ed64f134facf8c6ce2..a9e1b37eb6abc22856e4108e6c7a9c3ea95a029d 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       'common/api/object_life_monitor.h',
       'common/crash_reporter/crash_reporter.cc',
       'common/crash_reporter/crash_reporter.h',
+      'common/crash_reporter/crash_reporter_linux.cc',
+      'common/crash_reporter/crash_reporter_linux.h',
       'common/crash_reporter/crash_reporter_mac.h',
       'common/crash_reporter/crash_reporter_mac.mm',
       'common/crash_reporter/crash_reporter_win.cc',
diff --git a/common/crash_reporter/crash_reporter_linux.cc b/common/crash_reporter/crash_reporter_linux.cc
new file mode 100644 (file)
index 0000000..2589c99
--- /dev/null
@@ -0,0 +1,38 @@
+// 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.
+
+#include "common/crash_reporter/crash_reporter_linux.h"
+
+#include "base/memory/singleton.h"
+
+namespace crash_reporter {
+
+CrashReporterLinux::CrashReporterLinux() {
+}
+
+CrashReporterLinux::~CrashReporterLinux() {
+}
+
+void CrashReporterLinux::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) {
+}
+
+void CrashReporterLinux::SetUploadParameters() {
+}
+
+// static
+CrashReporterLinux* CrashReporterLinux::GetInstance() {
+  return Singleton<CrashReporterLinux>::get();
+}
+
+// static
+CrashReporter* CrashReporter::GetInstance() {
+  return CrashReporterLinux::GetInstance();
+}
+
+}  // namespace crash_reporter
diff --git a/common/crash_reporter/crash_reporter_linux.h b/common/crash_reporter/crash_reporter_linux.h
new file mode 100644 (file)
index 0000000..a968a39
--- /dev/null
@@ -0,0 +1,38 @@
+// 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.
+
+#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"
+
+template <typename T> struct DefaultSingletonTraits;
+
+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();
+
+  DISALLOW_COPY_AND_ASSIGN(CrashReporterLinux);
+};
+
+}  // namespace crash_reporter
+
+#endif  // ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_