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
3 // found in the LICENSE file.
5 #include "net/test/scoped_disable_exit_on_dfatal.h"
7 #include "base/logging.h"
13 ScopedDisableExitOnDFatal
* ScopedDisableExitOnDFatal::g_instance_
= NULL
;
15 ScopedDisableExitOnDFatal::ScopedDisableExitOnDFatal() {
18 logging::SetLogAssertHandler(LogAssertHandler
);
21 ScopedDisableExitOnDFatal::~ScopedDisableExitOnDFatal() {
22 CHECK_EQ(g_instance_
, this);
23 logging::SetLogAssertHandler(NULL
);
28 void ScopedDisableExitOnDFatal::LogAssertHandler(const std::string
& str
) {
29 // Simply swallow the assert.