Chromium Code Reviews| Index: base/debug/dump_without_crashing.h |
| diff --git a/base/debug/dump_without_crashing.h b/base/debug/dump_without_crashing.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a91a5a798b5952afc0f3484b83f2fd25816ec0e2 |
| --- /dev/null |
| +++ b/base/debug/dump_without_crashing.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
|
Mark Mentovai
2013/12/17 20:12:09
It would be awesome if this showed up as a copy fr
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ |
| +#define BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ |
| + |
| +#include "base/base_export.h" |
| +#include "build/build_config.h" |
| + |
| +namespace base { |
| + |
| +namespace debug { |
| + |
| +// Handler to silently dump the current process without crashing. |
| +BASE_EXPORT void DumpWithoutCrashing(); |
| + |
| +// Sets a function that'll be invoked to dump the current process when |
| +// DumpWithoutCrashing() is called. |
| +#if defined(OS_POSIX) |
| +BASE_EXPORT void SetDumpWithoutCrashingFunction(void (*function)()); |
| +#elif defined(OS_WIN) |
| +BASE_EXPORT void SetDumpWithoutCrashingFunction(void (__cdecl *function)()); |
| +#endif |
| + |
| +} // namespace debug |
| + |
| +} // namespace base |
| + |
| +#endif // BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ |