|
16 | 16 | #include "base/path_service.h" |
17 | 17 | #include "base/strings/utf_string_conversions.h" |
18 | 18 | #include "base/threading/thread_restrictions.h" |
| 19 | +#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h" |
19 | 20 | #include "chrome/common/chrome_paths.h" |
| 21 | +#include "components/crash/core/app/crashpad.h" |
| 22 | +#include "components/crash/core/common/crash_key.h" |
20 | 23 | #include "components/upload_list/crash_upload_list.h" |
21 | 24 | #include "components/upload_list/text_log_upload_list.h" |
22 | 25 | #include "content/public/common/content_switches.h" |
23 | 26 | #include "gin/arguments.h" |
24 | 27 | #include "gin/data_object_builder.h" |
25 | 28 | #include "services/service_manager/embedder/switches.h" |
| 29 | +#include "shell/app/electron_crash_reporter_client.h" |
| 30 | +#include "shell/common/crash_keys.h" |
26 | 31 | #include "shell/common/electron_paths.h" |
27 | 32 | #include "shell/common/gin_converters/callback_converter.h" |
28 | 33 | #include "shell/common/gin_converters/file_path_converter.h" |
29 | 34 | #include "shell/common/gin_converters/time_converter.h" |
30 | 35 | #include "shell/common/gin_helper/dictionary.h" |
31 | 36 | #include "shell/common/node_includes.h" |
32 | | - |
33 | | -#if !defined(MAS_BUILD) |
34 | | -#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h" |
35 | | -#include "components/crash/core/app/crashpad.h" // nogncheck |
36 | | -#include "components/crash/core/common/crash_key.h" |
37 | | -#include "shell/app/electron_crash_reporter_client.h" |
38 | | -#include "shell/common/crash_keys.h" |
39 | | -#include "third_party/crashpad/crashpad/client/crashpad_info.h" // nogncheck |
40 | | -#endif |
| 37 | +#include "third_party/crashpad/crashpad/client/crashpad_info.h" |
41 | 38 |
|
42 | 39 | #if defined(OS_LINUX) |
43 | 40 | #include "components/crash/core/app/breakpad_linux.h" |
@@ -65,14 +62,6 @@ namespace api { |
65 | 62 |
|
66 | 63 | namespace crash_reporter { |
67 | 64 |
|
68 | | -#if defined(MAS_BUILD) |
69 | | -namespace { |
70 | | - |
71 | | -void NoOp() {} |
72 | | - |
73 | | -} // namespace |
74 | | -#endif |
75 | | - |
76 | 65 | bool IsCrashReporterEnabled() { |
77 | 66 | return g_crash_reporter_initialized; |
78 | 67 | } |
@@ -214,13 +203,8 @@ void Initialize(v8::Local<v8::Object> exports, |
214 | 203 | void* priv) { |
215 | 204 | gin_helper::Dictionary dict(context->GetIsolate(), exports); |
216 | 205 | dict.SetMethod("start", &electron::api::crash_reporter::Start); |
217 | | -#if defined(MAS_BUILD) |
218 | | - dict.SetMethod("addExtraParameter", &electron::api::crash_reporter::NoOp); |
219 | | - dict.SetMethod("removeExtraParameter", &electron::api::crash_reporter::NoOp); |
220 | | -#else |
221 | 206 | dict.SetMethod("addExtraParameter", &electron::crash_keys::SetCrashKey); |
222 | 207 | dict.SetMethod("removeExtraParameter", &electron::crash_keys::ClearCrashKey); |
223 | | -#endif |
224 | 208 | dict.SetMethod("getParameters", &GetParameters); |
225 | 209 | dict.SetMethod("getUploadedReports", &GetUploadedReports); |
226 | 210 | dict.SetMethod("setUploadToServer", &SetUploadToServer); |
|
0 commit comments