summaryrefslogtreecommitdiffstats
path: root/base/debug
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 01:59:38 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 01:59:38 +0000
commit5ddbf1ce50b4686179a5c248112c2dca1f46f301 (patch)
treed4ac4a688930d4c23ff915c7a92dc260ca34ddf5 /base/debug
parent692ffe872c7b16bb2b55f48834fb90e14ab39644 (diff)
downloadchromium_src-5ddbf1ce50b4686179a5c248112c2dca1f46f301.zip
chromium_src-5ddbf1ce50b4686179a5c248112c2dca1f46f301.tar.gz
chromium_src-5ddbf1ce50b4686179a5c248112c2dca1f46f301.tar.bz2
Rename base::debug::StackTrace::PrintBacktrace() to Print().
The inconsistency in naming and capitalization are annoying, and the name can be shortened. This is most commonly used like so: base::debug::StackTrace().PrintBacktrace(); With this change, the usage becomes: base::debug::StackTrace().Print(); TBR=darin@chromium.org Review URL: https://chromiumcodereview.appspot.com/23155005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug')
-rw-r--r--base/debug/leak_tracker.h2
-rw-r--r--base/debug/stack_trace.h4
-rw-r--r--base/debug/stack_trace_android.cc2
-rw-r--r--base/debug/stack_trace_posix.cc4
-rw-r--r--base/debug/stack_trace_unittest.cc2
-rw-r--r--base/debug/stack_trace_win.cc4
6 files changed, 9 insertions, 9 deletions
diff --git a/base/debug/leak_tracker.h b/base/debug/leak_tracker.h
index 93cea39..e5f0cb1 100644
--- a/base/debug/leak_tracker.h
+++ b/base/debug/leak_tracker.h
@@ -103,7 +103,7 @@ class LeakTracker : public LinkNode<LeakTracker<T> > {
// doesn't optimize it out, and it will appear in mini-dumps).
if (count == 0x1234) {
for (size_t i = 0; i < kMaxStackTracesToCopyOntoStack; ++i)
- stacktraces[i].PrintBacktrace();
+ stacktraces[i].Print();
}
}
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index 53bed3c..b0883c1 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -55,8 +55,8 @@ class BASE_EXPORT StackTrace {
// number of elements in the returned array.
const void* const* Addresses(size_t* count) const;
- // Prints a backtrace to stderr
- void PrintBacktrace() const;
+ // Prints the stack trace to stderr.
+ void Print() const;
// Resolves backtrace to symbols and write to stream.
void OutputToStream(std::ostream* os) const;
diff --git a/base/debug/stack_trace_android.cc b/base/debug/stack_trace_android.cc
index 4c53d4a..ec0508a 100644
--- a/base/debug/stack_trace_android.cc
+++ b/base/debug/stack_trace_android.cc
@@ -75,7 +75,7 @@ StackTrace::StackTrace() {
count_ = state.frame_count;
}
-void StackTrace::PrintBacktrace() const {
+void StackTrace::Print() const {
std::string backtrace = ToString();
__android_log_write(ANDROID_LOG_ERROR, "chromium", backtrace.c_str());
}
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 8a8ae47..eb5ee08 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -253,7 +253,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
}
PrintToStderr("\n");
- debug::StackTrace().PrintBacktrace();
+ debug::StackTrace().Print();
#if defined(OS_LINUX)
#if ARCH_CPU_X86_FAMILY
@@ -474,7 +474,7 @@ StackTrace::StackTrace() {
count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
}
-void StackTrace::PrintBacktrace() const {
+void StackTrace::Print() const {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
diff --git a/base/debug/stack_trace_unittest.cc b/base/debug/stack_trace_unittest.cc
index b676327..701ebc4 100644
--- a/base/debug/stack_trace_unittest.cc
+++ b/base/debug/stack_trace_unittest.cc
@@ -128,7 +128,7 @@ TEST_F(StackTraceTest, DebugOutputToStream) {
// The test is used for manual testing, e.g., to see the raw output.
TEST_F(StackTraceTest, DebugPrintBacktrace) {
- StackTrace().PrintBacktrace();
+ StackTrace().Print();
}
#if defined(OS_POSIX) && !defined(OS_ANDROID)
diff --git a/base/debug/stack_trace_win.cc b/base/debug/stack_trace_win.cc
index 986241b..eb35b6a 100644
--- a/base/debug/stack_trace_win.cc
+++ b/base/debug/stack_trace_win.cc
@@ -30,7 +30,7 @@ LPTOP_LEVEL_EXCEPTION_FILTER g_previous_filter = NULL;
// Prints the exception call stack.
// This is the unit tests exception filter.
long WINAPI StackDumpExceptionFilter(EXCEPTION_POINTERS* info) {
- debug::StackTrace(info).PrintBacktrace();
+ debug::StackTrace(info).Print();
if (g_previous_filter)
return g_previous_filter(info);
return EXCEPTION_CONTINUE_SEARCH;
@@ -248,7 +248,7 @@ StackTrace::StackTrace(EXCEPTION_POINTERS* exception_pointers) {
trace_[i] = NULL;
}
-void StackTrace::PrintBacktrace() const {
+void StackTrace::Print() const {
OutputToStream(&std::cerr);
}