Index: base/logging.h |
diff --git a/base/logging.h b/base/logging.h |
index 7854e3934e974b4670930d6855f3ab8699a8376f..4f049eea0e97a97285f9851edcb1c02cd6923d1e 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); |
+typedef base::Callback<void(const char* file, |
+ int line, |
+ size_t message_start, |
Paweł Hajdan Jr.
2017/01/27 17:19:44
I'm worried these indexes are a weird API.
Why no
alex-ac
2017/02/11 20:12:19
Done.
|
+ size_t stack_start, |
+ const std::string& str)> |
+ LogAssertHandlerFunction; |
+ |
+// You probably must use ScopedLogAssertHandler instead of this functions. |
Paweł Hajdan Jr.
2017/01/27 17:19:44
nit: "Probably" and "must" don't mix well for me.
alex-ac
2017/02/11 20:12:19
Done.
|
+// see base/test/logging_utils.h. |
BASE_EXPORT void SetLogAssertHandler(LogAssertHandlerFunction handler); |
Paweł Hajdan Jr.
2017/01/27 17:19:44
How about changing the names to more like Push/Pop
alex-ac
2017/02/11 20:12:19
Done.
|
+BASE_EXPORT void ResetLogAssertHandler(); |
// Sets the Log Message Handler that gets passed every log message before |
// it's sent to other log destinations (if any). |