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

Unified Diff: base/debug/trace_event.h

Issue 5527004: Access singletons with a new GetInstance() method instead of Singleton<T>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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.h
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
index 49ba4bd77623639ff89839e62abdf41a58d44f07..160bbc86f4152bd8c24e961d3f5a3809dfe6e32b 100644
--- a/base/debug/trace_event.h
+++ b/base/debug/trace_event.h
@@ -52,7 +52,7 @@
// Record that an event (of name, id) has begun. All BEGIN events should have
// corresponding END events with a matching (name, id).
#define TRACE_EVENT_BEGIN(name, id, extra) \
- Singleton<base::debug::TraceLog>::get()->Trace( \
+ base::debug::TraceLog::GetInstance()->Trace( \
name, \
base::debug::TraceLog::EVENT_BEGIN, \
reinterpret_cast<const void*>(id), \
@@ -63,7 +63,7 @@
// Record that an event (of name, id) has ended. All END events should have
// corresponding BEGIN events with a matching (name, id).
#define TRACE_EVENT_END(name, id, extra) \
- Singleton<base::debug::TraceLog>::get()->Trace( \
+ base::debug::TraceLog::GetInstance()->Trace( \
name, \
base::debug::TraceLog::EVENT_END, \
reinterpret_cast<const void*>(id), \
@@ -73,7 +73,7 @@
// Record that an event (of name, id) with no duration has happened.
#define TRACE_EVENT_INSTANT(name, id, extra) \
- Singleton<base::debug::TraceLog>::get()->Trace( \
+ base::debug::TraceLog::GetInstance()->Trace( \
name, \
base::debug::TraceLog::EVENT_INSTANT, \
reinterpret_cast<const void*>(id), \
@@ -96,6 +96,8 @@ class TraceLog {
EVENT_INSTANT
};
+ static TraceLog* GetInstance();
+
// Is tracing currently enabled.
static bool IsTracing();
// Start logging trace events.

Powered by Google App Engine
This is Rietveld 408576698