Chromium Code Reviews| Index: net/test/scoped_disable_exit_on_dfatal.h |
| diff --git a/net/test/scoped_disable_exit_on_dfatal.h b/net/test/scoped_disable_exit_on_dfatal.h |
| index 33f06e3bc59ce534f786ba33ef58284938d6be83..50a8a169ad1fcfdcef9866051bdba6f791fec2ca 100644 |
| --- a/net/test/scoped_disable_exit_on_dfatal.h |
| +++ b/net/test/scoped_disable_exit_on_dfatal.h |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "base/macros.h" |
| +#include "base/test/logging_utils.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| @@ -17,18 +18,19 @@ namespace test { |
| // program when we encounter a LOG(DFATAL) within the current block. |
| // After we leave the current block, the default behavior is |
| // restored. |
| -class ScopedDisableExitOnDFatal { |
| +class ScopedDisableExitOnDFatal : public logging::ScopedLogAssertHandler { |
|
Paweł Hajdan Jr.
2017/01/27 17:19:44
Should we use composition instead of inheritance?
alex-ac
2017/02/11 20:12:20
Done.
|
| public: |
| ScopedDisableExitOnDFatal(); |
| ~ScopedDisableExitOnDFatal(); |
| private: |
| - // Currently active instance. |
| - static ScopedDisableExitOnDFatal* g_instance_; |
| - |
| // Static function which is set as the logging assert handler. |
| // Called when there is a check failure. |
| - static void LogAssertHandler(const std::string& msg); |
| + static void LogAssertHandler(const char* file, |
| + int line, |
| + size_t message_start, |
| + size_t stack_start, |
| + const std::string& msg); |
| DISALLOW_COPY_AND_ASSIGN(ScopedDisableExitOnDFatal); |
| }; |