Index: base/debug/trace_event.h |
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h |
index e7b3f90066ac8631099d0f39a8558ec517b7f810..61ffebc19170d158054166928f9242b526156ba9 100644 |
--- a/base/debug/trace_event.h |
+++ b/base/debug/trace_event.h |
@@ -141,6 +141,22 @@ |
INTERNAL_TRACE_EVENT_ADD_SCOPED( \ |
category, name, arg1_name, arg1_val, arg2_name, arg2_val) |
+// Same as TRACE_EVENT except that they are not included in official builds. |
+#ifdef OFFICIAL_BUILD |
+#define UNSHIPPED_TRACE_EVENT0(category, name) (void)0 |
+#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) (void)0 |
+#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) (void)0 |
+#else |
+#define UNSHIPPED_TRACE_EVENT0(category, name) \ |
+ TRACE_EVENT0(category, name) |
+#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) \ |
+ TRACE_EVENT1(category, name, arg1_name, arg1_val) |
+#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) \ |
+ TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) |
+#endif |
+ |
// Records a single event called "name" immediately, with 0, 1 or 2 |
// associated arguments. If the category is not enabled, then this |
// does nothing. |
@@ -577,6 +593,9 @@ class BASE_EXPORT TraceLog { |
// Exposed for unittesting: |
+ // Allows deleting our singleton instance. |
+ static void DeleteForTesting(); |
+ |
// Allows resurrecting our singleton instance post-AtExit processing. |
static void Resurrect(); |