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

Unified Diff: base/trace_event/trace_event.h

Issue 1645853003: base: Add scope support to context trace events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 4 years, 11 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/trace_event/common/trace_event_common.h ('k') | base/trace_event/trace_event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event.h
diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
index e9507f7871b30423ca603b3693f09204b5166943..311f73cc0d8ddc13fdfc58144d6a1b81b37905a3 100644
--- a/base/trace_event/trace_event.h
+++ b/base/trace_event/trace_event.h
@@ -940,13 +940,13 @@ class TraceEventSamplingStateScope {
const char* previous_state_;
};
-using TraceContext = const void*;
+using TraceContext = trace_event_internal::TraceID;
class TraceScopedContext {
public:
TraceScopedContext(const char* category_group,
const char* name,
- TraceContext context)
+ trace_event_internal::TraceID::DontMangle context)
: category_group_(category_group), name_(name), context_(context) {
TRACE_EVENT_ENTER_CONTEXT(category_group_, name_, context_);
}
@@ -958,7 +958,7 @@ class TraceScopedContext {
private:
const char* category_group_;
const char* name_;
- TraceContext context_;
+ trace_event_internal::TraceID::DontMangle context_;
DISALLOW_COPY_AND_ASSIGN(TraceScopedContext);
};
@@ -967,8 +967,6 @@ class TraceScopedContext {
namespace base {
namespace trace_event {
-using trace_event_internal::TraceContext;
-
template<typename IDType> class TraceScopedTrackableObject {
public:
TraceScopedTrackableObject(const char* category_group, const char* name,
« no previous file with comments | « base/trace_event/common/trace_event_common.h ('k') | base/trace_event/trace_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698