Index: base/debug/trace_event_impl.h |
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h |
index 7b191b8a403f2bbf7baf25bde779ba691478db26..146ca8f2aa55b545749e4d6cc520c8bc30431ccd 100644 |
--- a/base/debug/trace_event_impl.h |
+++ b/base/debug/trace_event_impl.h |
@@ -64,7 +64,8 @@ namespace debug { |
// For any argument of type TRACE_VALUE_TYPE_CONVERTABLE the provided |
// class must implement this interface. |
-class ConvertableToTraceFormat : public RefCounted<ConvertableToTraceFormat> { |
+class BASE_EXPORT ConvertableToTraceFormat |
+ : public RefCounted<ConvertableToTraceFormat> { |
public: |
// Append the class info to the provided |out| string. The appended |
// data must be a valid JSON object. Strings must be properly quoted, and |
@@ -72,6 +73,12 @@ class ConvertableToTraceFormat : public RefCounted<ConvertableToTraceFormat> { |
// appended. |
virtual void AppendAsTraceFormat(std::string* out) const = 0; |
+ std::string ToString() const { |
+ std::string result; |
+ AppendAsTraceFormat(&result); |
+ return result; |
+ } |
+ |
protected: |
virtual ~ConvertableToTraceFormat() {} |