|
@@ -16,28 +16,25 @@
|
|
|
#include "base/path_service.h"
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
#include "base/threading/thread_restrictions.h"
|
|
|
+#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h"
|
|
|
#include "chrome/common/chrome_paths.h"
|
|
|
+#include "components/crash/core/app/crashpad.h"
|
|
|
+#include "components/crash/core/common/crash_key.h"
|
|
|
#include "components/upload_list/crash_upload_list.h"
|
|
|
#include "components/upload_list/text_log_upload_list.h"
|
|
|
#include "content/public/common/content_switches.h"
|
|
|
#include "gin/arguments.h"
|
|
|
#include "gin/data_object_builder.h"
|
|
|
#include "services/service_manager/embedder/switches.h"
|
|
|
+#include "shell/app/electron_crash_reporter_client.h"
|
|
|
+#include "shell/common/crash_keys.h"
|
|
|
#include "shell/common/electron_paths.h"
|
|
|
#include "shell/common/gin_converters/callback_converter.h"
|
|
|
#include "shell/common/gin_converters/file_path_converter.h"
|
|
|
#include "shell/common/gin_converters/time_converter.h"
|
|
|
#include "shell/common/gin_helper/dictionary.h"
|
|
|
#include "shell/common/node_includes.h"
|
|
|
-
|
|
|
-#if !defined(MAS_BUILD)
|
|
|
-#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h"
|
|
|
-#include "components/crash/core/app/crashpad.h" // nogncheck
|
|
|
-#include "components/crash/core/common/crash_key.h"
|
|
|
-#include "shell/app/electron_crash_reporter_client.h"
|
|
|
-#include "shell/common/crash_keys.h"
|
|
|
-#include "third_party/crashpad/crashpad/client/crashpad_info.h" // nogncheck
|
|
|
-#endif
|
|
|
+#include "third_party/crashpad/crashpad/client/crashpad_info.h"
|
|
|
|
|
|
#if defined(OS_LINUX)
|
|
|
#include "components/crash/core/app/breakpad_linux.h"
|
|
@@ -65,14 +62,6 @@ namespace api {
|
|
|
|
|
|
namespace crash_reporter {
|
|
|
|
|
|
-#if defined(MAS_BUILD)
|
|
|
-namespace {
|
|
|
-
|
|
|
-void NoOp() {}
|
|
|
-
|
|
|
-} // namespace
|
|
|
-#endif
|
|
|
-
|
|
|
bool IsCrashReporterEnabled() {
|
|
|
return g_crash_reporter_initialized;
|
|
|
}
|
|
@@ -214,13 +203,8 @@ void Initialize(v8::Local<v8::Object> exports,
|
|
|
void* priv) {
|
|
|
gin_helper::Dictionary dict(context->GetIsolate(), exports);
|
|
|
dict.SetMethod("start", &electron::api::crash_reporter::Start);
|
|
|
-#if defined(MAS_BUILD)
|
|
|
- dict.SetMethod("addExtraParameter", &electron::api::crash_reporter::NoOp);
|
|
|
- dict.SetMethod("removeExtraParameter", &electron::api::crash_reporter::NoOp);
|
|
|
-#else
|
|
|
dict.SetMethod("addExtraParameter", &electron::crash_keys::SetCrashKey);
|
|
|
dict.SetMethod("removeExtraParameter", &electron::crash_keys::ClearCrashKey);
|
|
|
-#endif
|
|
|
dict.SetMethod("getParameters", &GetParameters);
|
|
|
dict.SetMethod("getUploadedReports", &GetUploadedReports);
|
|
|
dict.SetMethod("setUploadToServer", &SetUploadToServer);
|