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

Unified Diff: webrtc/rtc_base/trace_event.h

Issue 3002663002: Make it possible for tests to set up trace event handlers. (Closed)
Patch Set: Actually fix it. Created 3 years, 4 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
« webrtc/BUILD.gn ('K') | « webrtc/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/trace_event.h
diff --git a/webrtc/rtc_base/trace_event.h b/webrtc/rtc_base/trace_event.h
index 98f6afae943f3a2095e2bf0d6fcaeea3ba6f9a8e..6f679aceee066ed91e939cd33075c6abb597fbfe 100644
--- a/webrtc/rtc_base/trace_event.h
+++ b/webrtc/rtc_base/trace_event.h
@@ -575,9 +575,17 @@
#define INTERNAL_TRACE_EVENT_UID(name_prefix) \
INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__)
+#ifdef WEBRTC_NON_CONST_TRACE_EVENT_HANDLERS
kwiberg-webrtc 2017/08/16 13:11:41 Should this be named _NON_STATIC_ instead of _NON_
ehmaldonado_webrtc 2017/08/16 13:40:57 Done.
+#define INTERNAL_TRACE_EVENT_INFO_TYPE \
+ const unsigned char*
+#else
+#define INTERNAL_TRACE_EVENT_INFO_TYPE \
+ static const unsigned char*
+#endif // WEBRTC_IS_TEST
kjellander_webrtc 2017/08/16 11:58:57 // WEBRTC_NON_CONST_TRACE_EVENT_HANDLERS ?
ehmaldonado_webrtc 2017/08/16 12:00:45 Right, sorry.
ehmaldonado_webrtc 2017/08/16 13:40:57 Done.
+
// Implementation detail: internal macro to create static category.
#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category) \
- static const unsigned char* INTERNAL_TRACE_EVENT_UID(catstatic) = \
+ INTERNAL_TRACE_EVENT_INFO_TYPE INTERNAL_TRACE_EVENT_UID(catstatic) = \
TRACE_EVENT_API_GET_CATEGORY_ENABLED(category);
// Implementation detail: internal macro to create static category and add
« webrtc/BUILD.gn ('K') | « webrtc/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698