summaryrefslogtreecommitdiffstats
path: root/base/logging.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 04:07:50 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 04:07:50 +0000
commit58580359a452cb7c3b9580edc0843c3ab3d158df (patch)
tree964dbcc1505f4b9c2bbb5e7a64720861d604c8f3 /base/logging.cc
parent23872906817de5d402b0c2da6d5f7ee6026378e6 (diff)
downloadchromium_src-58580359a452cb7c3b9580edc0843c3ab3d158df.zip
chromium_src-58580359a452cb7c3b9580edc0843c3ab3d158df.tar.gz
chromium_src-58580359a452cb7c3b9580edc0843c3ab3d158df.tar.bz2
Move debug-related stuff from base to the base/debug directory and use the
base::debug namespace. This splits apart debug_util into base/debugger and base/stack_trace There are still two functions in debug_util that I'm not sure what to do with. Since this uses the base::debug namespace, I removed the functions in debugger.h from the static class and just made them free functions in the namespace. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3945002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.cc')
-rw-r--r--base/logging.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/base/logging.cc b/base/logging.cc
index 273162f..a6b52a7 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -42,7 +42,8 @@ typedef pthread_mutex_t* MutexHandle;
#include "base/base_switches.h"
#include "base/command_line.h"
-#include "base/debug_util.h"
+#include "base/debug/debugger.h"
+#include "base/debug/stack_trace.h"
#include "base/eintr_wrapper.h"
#include "base/lock_impl.h"
#if defined(OS_POSIX)
@@ -220,7 +221,7 @@ class LoggingLock {
#if DEBUG
// Keep the error code for debugging
int error = GetLastError(); // NOLINT
- DebugUtil::BreakDebugger();
+ base::debug::BreakDebugger();
#endif
// Return nicely without putting initialized to true.
return;
@@ -580,7 +581,7 @@ LogMessage::~LogMessage() {
#ifndef NDEBUG
if (severity_ == LOG_FATAL) {
// Include a stack trace on a fatal.
- StackTrace trace;
+ base::debug::StackTrace trace;
stream_ << std::endl; // Newline to separate from log message.
trace.OutputToStream(&stream_);
}
@@ -637,8 +638,8 @@ LogMessage::~LogMessage() {
if (severity_ == LOG_FATAL) {
// display a message or break into the debugger on a fatal error
- if (DebugUtil::BeingDebugged()) {
- DebugUtil::BreakDebugger();
+ if (base::debug::BeingDebugged()) {
+ base::debug::BreakDebugger();
} else {
if (log_assert_handler) {
// make a copy of the string for the handler out of paranoia
@@ -653,7 +654,7 @@ LogMessage::~LogMessage() {
DisplayDebugMessageInDialog(stream_.str());
#endif
// Crash the process to generate a dump.
- DebugUtil::BreakDebugger();
+ base::debug::BreakDebugger();
}
}
} else if (severity_ == LOG_ERROR_REPORT) {
@@ -792,7 +793,7 @@ void RawLog(int level, const char* message) {
}
if (level == LOG_FATAL)
- DebugUtil::BreakDebugger();
+ base::debug::BreakDebugger();
}
} // namespace logging