1From f2d560ab2808c87cd60a2962037bf4dabd9781ef Mon Sep 17 00:00:00 2001 2From: Hidehiko Abe <hidehiko@chromium.org> 3Date: Fri, 14 Jun 2019 14:22:33 +0900 4Subject: [PATCH] libchrome: Introduce stub ConvertableToTraceFormat. 5 6BUG=chromium:909719 7TEST=Built locally. 8 9Change-Id: I5c849edc2c5e8370bff6a8b1b83a92e5ef5836c8 10--- 11 base/trace_event/trace_event.h | 13 ++++++++++++- 12 1 file changed, 12 insertions(+), 1 deletion(-) 13 14diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h 15index 1ce76d9..7385582 100644 16--- a/base/trace_event/trace_event.h 17+++ b/base/trace_event/trace_event.h 18@@ -10,6 +10,9 @@ 19 #include "base/trace_event/common/trace_event_common.h" 20 #include "base/trace_event/heap_profiler.h" 21 22+// Indirectly included. 23+#include "base/strings/string_util.h" 24+ 25 // To avoid -Wunused-* errors, eat expression by macro. 26 namespace libchrome_internal { 27 template <typename... Args> void Ignore(Args&&... args) {} 28@@ -18,8 +21,9 @@ template <typename... Args> void Ignore(Args&&... args) {} 29 (false ? libchrome_internal::Ignore(__VA_ARGS__) : (void) 0) 30 31 // Body is effectively empty. 32+#define INTERNAL_TRACE_EVENT_ADD(...) INTERNAL_IGNORE(__VA_ARGS__) 33 #define INTERNAL_TRACE_EVENT_ADD_SCOPED(...) INTERNAL_IGNORE(__VA_ARGS__) 34-#define INTERNAL_TRACE_TASK_EXECUTION(...) 35+#define INTERNAL_TRACE_TASK_EXECUTION(...) INTERNAL_IGNORE(__VA_ARGS__) 36 #define INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(...) \ 37 INTERNAL_IGNORE(__VA_ARGS__) 38 #define TRACE_ID_MANGLE(val) (val) 39@@ -38,6 +42,13 @@ class TraceLog { 40 void SetCurrentThreadBlocksMessageLoop() {} 41 }; 42 43+class BASE_EXPORT ConvertableToTraceFormat { 44+ public: 45+ ConvertableToTraceFormat() = default; 46+ virtual ~ConvertableToTraceFormat() = default; 47+ virtual void AppendAsTraceFormat(std::string* out) const {}; 48+}; 49+ 50 } // namespace trace_event 51 } // namespace base 52 #else 53-- 542.22.0.410.gd8fdbe21b5-goog 55 56