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

Unified Diff: third_party/WebKit/Source/platform/TracedValue.h

Issue 2341333003: Use chromium trace_event implementation in blink (Closed)
Patch Set: Created 4 years, 3 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
Index: third_party/WebKit/Source/platform/TracedValue.h
diff --git a/third_party/WebKit/Source/platform/TracedValue.h b/third_party/WebKit/Source/platform/TracedValue.h
index f3b315b00a1d1fc0bd6ca754c635ab305675fcb1..4f60e2f9b5222cc795362ba03bc673274240255f 100644
--- a/third_party/WebKit/Source/platform/TracedValue.h
+++ b/third_party/WebKit/Source/platform/TracedValue.h
@@ -5,21 +5,14 @@
#ifndef TracedValue_h
#define TracedValue_h
-#include "base/memory/ref_counted.h"
-#include "platform/EventTracer.h"
+#include "base/trace_event/trace_event_argument.h"
+#include "platform/PlatformExport.h"
#include "wtf/text/WTFString.h"
-#include <memory>
-
-namespace base {
-namespace trace_event {
-class TracedValue;
-}
-}
namespace blink {
// TracedValue copies all passed names and values and doesn't retain references.
-class PLATFORM_EXPORT TracedValue final {
+class PLATFORM_EXPORT TracedValue final : public base::trace_event::ConvertableToTraceFormat {
WTF_MAKE_NONCOPYABLE(TracedValue);
public:
@@ -49,11 +42,12 @@ public:
private:
TracedValue();
- // This will be moved (and become null) when TracedValue is passed to
- // EventTracer::addTraceEvent().
- std::unique_ptr<base::trace_event::TracedValue> m_tracedValue;
+ // ConvertableToTraceFormat
+ using base::trace_event::ConvertableToTraceFormat::ToString; // Hide this method from blink code.
+ void AppendAsTraceFormat(std::string*) const final;
+ void EstimateTraceMemoryOverhead(base::trace_event::TraceEventMemoryOverhead*) final;
- friend class EventTracer;
+ base::trace_event::TracedValue m_tracedValue;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEventCommon.h ('k') | third_party/WebKit/Source/platform/TracedValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698