| Index: content/public/browser/tracing_controller.h
|
| diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
|
| index 0cbed7018d64edb5e6a0c9e3b8f40cf5179fc723..37ac2f75551b9cab659d1955b3495d6b9fe3ce02 100644
|
| --- a/content/public/browser/tracing_controller.h
|
| +++ b/content/public/browser/tracing_controller.h
|
| @@ -45,11 +45,29 @@ class TracingController {
|
| virtual ~TraceDataSink() {}
|
| };
|
|
|
| + // An implementation of this interface is passed when constructing a
|
| + // TraceDataSink, and receives chunks of the final trace data as it's being
|
| + // constructed.
|
| + // Methods may be called from any thread.
|
| + class CONTENT_EXPORT TraceDataEndpoint
|
| + : public base::RefCountedThreadSafe<TraceDataEndpoint> {
|
| + public:
|
| + virtual void ReceiveTraceChunk(const std::string& chunk) {}
|
| + virtual void ReceiveTraceFinalContents(const std::string& contents) {}
|
| +
|
| + protected:
|
| + friend class base::RefCountedThreadSafe<TraceDataEndpoint>;
|
| + virtual ~TraceDataEndpoint() {}
|
| + };
|
| +
|
| // Create a trace sink that may be supplied to DisableRecording or
|
| // CaptureMonitoringSnapshot to capture the trace data as a string.
|
| CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateStringSink(
|
| const base::Callback<void(base::RefCountedString*)>& callback);
|
|
|
| + CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateCompressedStringSink(
|
| + scoped_refptr<TraceDataEndpoint> endpoint);
|
| +
|
| // Create a trace sink that may be supplied to DisableRecording or
|
| // CaptureMonitoringSnapshot to dump the trace data to a file.
|
| CONTENT_EXPORT static scoped_refptr<TraceDataSink> CreateFileSink(
|
|
|