| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 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. | |
| 4 | |
| 5 #ifndef BASE_DEBUG_UTIL_H_ | |
| 6 #define BASE_DEBUG_UTIL_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "build/build_config.h" | |
| 10 | |
| 11 class DebugUtil { | |
| 12 public: | |
| 13 #if defined(OS_MACOSX) | |
| 14 // On Mac OS X, it can take a really long time for the OS crash handler to | |
| 15 // process a Chrome crash when debugging symbols are available. This | |
| 16 // translates into a long wait until the process actually dies. This call | |
| 17 // disables Apple Crash Reporter entirely. | |
| 18 static void DisableOSCrashDumps(); | |
| 19 #endif // defined(OS_MACOSX) | |
| 20 | |
| 21 // This should be used only in test code. | |
| 22 static void SuppressDialogs() { | |
| 23 suppress_dialogs_ = true; | |
| 24 } | |
| 25 | |
| 26 static bool AreDialogsSuppressed() { | |
| 27 return suppress_dialogs_; | |
| 28 } | |
| 29 | |
| 30 private: | |
| 31 // If true, avoid displaying any dialogs that could cause problems | |
| 32 // in non-interactive environments. | |
| 33 static bool suppress_dialogs_; | |
| 34 }; | |
| 35 | |
| 36 #endif // BASE_DEBUG_UTIL_H_ | |
| OLD | NEW |