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

Unified Diff: content/public/browser/background_tracing_upload_sink.h

Issue 1089253003: Re-land first pass BackgroundTracingManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review changes. Created 5 years, 7 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: 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_

Powered by Google App Engine
This is Rietveld 408576698