| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_ELF_BREAKPAD_H_ | 5 #ifndef CHROME_ELF_BREAKPAD_BREAKPAD_H_ |
| 6 #define CHROME_ELF_BREAKPAD_H_ | 6 #define CHROME_ELF_BREAKPAD_BREAKPAD_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 namespace google_breakpad { | 10 namespace google_breakpad { |
| 11 class ExceptionHandler; | 11 class ExceptionHandler; |
| 12 } | 12 } |
| 13 | 13 |
| 14 // Initializes collection and upload of crash reports. This will only be done if | 14 // Initializes collection and upload of crash reports. This will only be done if |
| 15 // the user has agreed to crash dump reporting. | 15 // the user has agreed to crash dump reporting. |
| 16 // | 16 // |
| 17 // Crash reporting has to be initialized as early as possible (e.g., the first | 17 // Crash reporting has to be initialized as early as possible (e.g., the first |
| 18 // thing in main()) to catch crashes occuring during process startup. | 18 // thing in main()) to catch crashes occuring during process startup. |
| 19 // Crashes which occur during the global static construction phase will not | 19 // Crashes which occur during the global static construction phase will not |
| 20 // be caught and reported. This should not be a problem as static non-POD | 20 // be caught and reported. This should not be a problem as static non-POD |
| 21 // objects are not allowed by the style guide and exceptions to this rule are | 21 // objects are not allowed by the style guide and exceptions to this rule are |
| 22 // rare. | 22 // rare. |
| 23 void InitializeCrashReporting(); | 23 void InitializeCrashReporting(); |
| 24 | 24 |
| 25 // Generates a crashdump for the provided |exinfo|. This crashdump will be | 25 // Generates a crashdump for the provided |exinfo|. This crashdump will be |
| 26 // either be saved locally, or uploaded, depending on how the ExceptionHandler | 26 // either be saved locally, or uploaded, depending on how the ExceptionHandler |
| 27 // has been configured. | 27 // has been configured. |
| 28 int GenerateCrashDump(EXCEPTION_POINTERS* exinfo); | 28 int GenerateCrashDump(EXCEPTION_POINTERS* exinfo); |
| 29 | 29 |
| 30 // Global pointer to the ExceptionHandler. This is initialized by | 30 // Global pointer to the ExceptionHandler. This is initialized by |
| 31 // InitializeCrashReporting() and used by GenerateCrashDump() to record dumps. | 31 // InitializeCrashReporting() and used by GenerateCrashDump() to record dumps. |
| 32 extern google_breakpad::ExceptionHandler* g_elf_breakpad; | 32 extern google_breakpad::ExceptionHandler* g_elf_breakpad; |
| 33 | 33 |
| 34 #endif // CHROME_ELF_BREAKPAD_H_ | 34 #endif // CHROME_ELF_BREAKPAD_BREAKPAD_H_ |
| OLD | NEW |