Index: content/public/browser/background_tracing_upload_sink.h |
diff --git a/content/public/browser/background_tracing_upload_sink.h b/content/public/browser/background_tracing_upload_sink.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..192e4a39d74b105f880936d16f5a7736f274c32e |
--- /dev/null |
+++ b/content/public/browser/background_tracing_upload_sink.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_UPLOAD_SINK_H_ |
+#define CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_UPLOAD_SINK_H_ |
+ |
+#include "base/memory/ref_counted_memory.h" |
+#include "base/trace_event/trace_event_impl.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+// Interface for trace data consumer. An implementation of this interface |
+// is passed to SetActiveScenario() and receives the trace data. |
+// This may happen on any thread. |
+class BackgroundTracingUploadSink |
+ : public base::RefCountedThreadSafe<BackgroundTracingUploadSink> { |
no sievers
2015/05/19 19:52:22
So this is for the embedder to implement?
Being Re
shatch
2015/05/20 18:23:16
Spoke offline, liked your suggestion to just boil
|
+ public: |
+ virtual void Upload(const std::string& contents, |
+ base::Callback<void()> done_callback) = 0; |
+ virtual bool RequiresAnonymizedData() const = 0; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<BackgroundTracingUploadSink>; |
+ virtual ~BackgroundTracingUploadSink() {} |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_TRACING_UPLOAD_SINK_H_ |