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

Unified Diff: base/debug/trace_event.cc

Issue 7778033: Add trace code to track all posted tasks in message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed file/line merge from Location Created 9 years, 3 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
Index: base/debug/trace_event.cc
diff --git a/base/debug/trace_event.cc b/base/debug/trace_event.cc
index 879f3a978f9361900a8658b61c4ead4ef5f75f0b..8d5e6c0b5aa0e6dc14ccce6ee33a69599256543f 100644
--- a/base/debug/trace_event.cc
+++ b/base/debug/trace_event.cc
@@ -20,6 +20,14 @@
#define USE_UNRELIABLE_NOW
+class DeleteTraceLogForTesting {
+ public:
+ static void Delete() {
+ Singleton<base::debug::TraceLog,
+ StaticMemorySingletonTraits<base::debug::TraceLog> >::OnExit(0);
+ }
+};
+
namespace base {
namespace debug {
@@ -547,6 +555,10 @@ void TraceLog::AddCurrentMetadataEvents() {
}
}
+void TraceLog::DeleteForTesting() {
+ DeleteTraceLogForTesting::Delete();
+}
+
void TraceLog::Resurrect() {
StaticMemorySingletonTraits<TraceLog>::Resurrect();
}

Powered by Google App Engine
This is Rietveld 408576698