| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_FALLBACK_CRASH_HANDLING_WIN_H_ |
| 6 #define COMPONENTS_CRASH_CONTENT_APP_FALLBACK_CRASH_HANDLING_WIN_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 #include <string> |
| 10 |
| 11 #include "base/command_line.h" |
| 12 |
| 13 namespace crash_reporter { |
| 14 |
| 15 namespace switches { |
| 16 extern const char kFallbackCrashHandler[]; |
| 17 // The fallback handler uses the same prefetch ID as the Crashpad handler. |
| 18 extern const char kPrefetchArgument[]; |
| 19 } |
| 20 |
| 21 // A somewhat unique exit code for the crashed process. This is mostly |
| 22 // for testing, as there won't likely be anyone around to record the exit |
| 23 // code of the Crashpad handler. |
| 24 extern const uint32_t kFallbackCrashTerminationCode; |
| 25 |
| 26 // Sets up fallback crash handling for this process. |
| 27 // Note that this installs an unhandled exception filter, and requires |
| 28 // that the executable call the "RunAsFallbackCrashHandler" function, when |
| 29 // it's passed a --type switch with the value |kFallbackCrashHandlerType|. |
| 30 bool SetupFallbackCrashHandling(const base::CommandLine& command_line); |
| 31 |
| 32 // Runs the fallback crash handler process, to handle a crash in a process |
| 33 // that's previously called SetupFallbackCrashHandling. |
| 34 // The |product_name|, |version| and |channel_name| parameters will be used |
| 35 // as properties of the crash for the purposes of upload. |
| 36 int RunAsFallbackCrashHandler(const base::CommandLine& command_line, |
| 37 std::string product_name, |
| 38 std::string version, |
| 39 std::string channel_name); |
| 40 |
| 41 } // namespace crash_reporter |
| 42 |
| 43 #endif // COMPONENTS_CRASH_CONTENT_APP_FALLBACK_CRASH_HANDLING_WIN_H_ |
| OLD | NEW |