In compositor priority, run loading tasks only when idle
[chromium-blink-merge.git] / net / test / scoped_disable_exit_on_dfatal.cc
blobf9091261bc56464288820ade1caeb3b90d0bad73
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"
9 namespace net {
10 namespace test {
12 // static
13 ScopedDisableExitOnDFatal* ScopedDisableExitOnDFatal::g_instance_ = NULL;
15 ScopedDisableExitOnDFatal::ScopedDisableExitOnDFatal() {
16 CHECK(!g_instance_);
17 g_instance_ = this;
18 logging::SetLogAssertHandler(LogAssertHandler);
21 ScopedDisableExitOnDFatal::~ScopedDisableExitOnDFatal() {
22 CHECK_EQ(g_instance_, this);
23 logging::SetLogAssertHandler(NULL);
24 g_instance_ = NULL;
27 // static
28 void ScopedDisableExitOnDFatal::LogAssertHandler(const std::string& str) {
29 // Simply swallow the assert.
32 } // namespace test
33 } // namespace net