You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.9 KiB

From f2d560ab2808c87cd60a2962037bf4dabd9781ef Mon Sep 17 00:00:00 2001
From: Hidehiko Abe <hidehiko@chromium.org>
Date: Fri, 14 Jun 2019 14:22:33 +0900
Subject: [PATCH] libchrome: Introduce stub ConvertableToTraceFormat.
BUG=chromium:909719
TEST=Built locally.
Change-Id: I5c849edc2c5e8370bff6a8b1b83a92e5ef5836c8
---
base/trace_event/trace_event.h | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
index 1ce76d9..7385582 100644
--- a/base/trace_event/trace_event.h
+++ b/base/trace_event/trace_event.h
@@ -10,6 +10,9 @@
#include "base/trace_event/common/trace_event_common.h"
#include "base/trace_event/heap_profiler.h"
+// Indirectly included.
+#include "base/strings/string_util.h"
+
// To avoid -Wunused-* errors, eat expression by macro.
namespace libchrome_internal {
template <typename... Args> void Ignore(Args&&... args) {}
@@ -18,8 +21,9 @@ template <typename... Args> void Ignore(Args&&... args) {}
(false ? libchrome_internal::Ignore(__VA_ARGS__) : (void) 0)
// Body is effectively empty.
+#define INTERNAL_TRACE_EVENT_ADD(...) INTERNAL_IGNORE(__VA_ARGS__)
#define INTERNAL_TRACE_EVENT_ADD_SCOPED(...) INTERNAL_IGNORE(__VA_ARGS__)
-#define INTERNAL_TRACE_TASK_EXECUTION(...)
+#define INTERNAL_TRACE_TASK_EXECUTION(...) INTERNAL_IGNORE(__VA_ARGS__)
#define INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(...) \
INTERNAL_IGNORE(__VA_ARGS__)
#define TRACE_ID_MANGLE(val) (val)
@@ -38,6 +42,13 @@ class TraceLog {
void SetCurrentThreadBlocksMessageLoop() {}
};
+class BASE_EXPORT ConvertableToTraceFormat {
+ public:
+ ConvertableToTraceFormat() = default;
+ virtual ~ConvertableToTraceFormat() = default;
+ virtual void AppendAsTraceFormat(std::string* out) const {};
+};
+
} // namespace trace_event
} // namespace base
#else
--
2.22.0.410.gd8fdbe21b5-goog