Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(771)

Unified Diff: base/debug/stack_trace.cc

Issue 8206015: Add StackTrace::ToString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace.cc
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
index 94ce145dfa18ef1ba00b330874b4c651a649c415..1919abcef1fc9930c71c62b0a2529089d98edbb6 100644
--- a/base/debug/stack_trace.cc
+++ b/base/debug/stack_trace.cc
@@ -9,6 +9,7 @@
#include <string.h>
#include <algorithm>
+#include <sstream>
namespace base {
namespace debug {
@@ -30,5 +31,11 @@ const void *const *StackTrace::Addresses(size_t* count) const {
return NULL;
}
+std::string StackTrace::ToString() const {
+ std::stringstream stream;
+ OutputToStream(&stream);
+ return stream.str();
+}
+
} // namespace debug
} // namespace base
« no previous file with comments | « base/debug/stack_trace.h ('k') | base/debug/stack_trace_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698