summaryrefslogtreecommitdiff
path: root/libchrome_tools/patches/libchrome-Introduce-stub-ConvertableToTraceFormat.patch
blob: bd68077cc79eace24a6bc6a15ccb29e580e20f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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