Index: base/logging.h |
diff --git a/base/logging.h b/base/logging.h |
index 7854e3934e974b4670930d6855f3ab8699a8376f..4ed66cc7388aa6b641257b7a88aa634141b3f39d 100644 |
--- a/base/logging.h |
+++ b/base/logging.h |
@@ -15,6 +15,7 @@ |
#include <utility> |
#include "base/base_export.h" |
+#include "base/callback_forward.h" |
#include "base/compiler_specific.h" |
#include "base/debug/debugger.h" |
#include "base/macros.h" |
@@ -277,8 +278,17 @@ BASE_EXPORT void SetShowErrorDialogs(bool enable_dialogs); |
// The default handler shows a dialog box and then terminate the process, |
// however clients can use this function to override with their own handling |
// (e.g. a silent one for Unit Tests) |
-typedef void (*LogAssertHandlerFunction)(const std::string& str); |
-BASE_EXPORT void SetLogAssertHandler(LogAssertHandlerFunction handler); |
+typedef base::Callback<void(const char* file, |
+ int line, |
+ const std::string& message, |
+ const std::string& stack_trace)> |
+ LogAssertHandlerFunction; |
+ |
+// Counsider to use ScopedLogAssertHandler instead of this functions. |
Paweł Hajdan Jr.
2017/02/13 17:17:24
nit: counsider -> consider ; this -> these
alex-ac
2017/02/14 10:34:27
Done.
|
+// see base/test/logging_utils.h. |
+BASE_EXPORT void PushLogAssertHandler(LogAssertHandlerFunction handler); |
+BASE_EXPORT void PopLogAssertHandler(); |
+BASE_EXPORT LogAssertHandlerFunction GetLogAssertHandler(); |
// Sets the Log Message Handler that gets passed every log message before |
// it's sent to other log destinations (if any). |