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

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

Issue 911153002: Moved the TraceUploader to chrome/ and abstracted it for alternative new upload destinations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix TraceUploader ownership Created 5 years, 10 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/trace_uploader.h
diff --git a/content/public/browser/trace_uploader.h b/content/public/browser/trace_uploader.h
new file mode 100644
index 0000000000000000000000000000000000000000..6cc8fa2175eb97b07e3ad7be1764a104cd95c67b
--- /dev/null
+++ b/content/public/browser/trace_uploader.h
@@ -0,0 +1,28 @@
+// 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_TRACE_UPLOADER_H_
+#define CONTENT_PUBLIC_BROWSER_TRACE_UPLOADER_H_
+
+#include "base/callback.h"
+
+namespace content {
+
+class TraceUploader {
Charlie Reis 2015/02/12 17:11:32 Please add a class-level comment, since this is th
oystein (OOO til 10th of July) 2015/02/13 17:02:45 Done.
+ public:
+ typedef base::Callback<void(bool, const std::string&, const std::string&)>
Charlie Reis 2015/02/12 17:11:32 Let's document these callbacks so that embedders k
oystein (OOO til 10th of July) 2015/02/13 17:02:45 Done.
+ UploadDoneCallback;
+ typedef base::Callback<void(int64, int64)> UploadProgressCallback;
+
+ virtual ~TraceUploader() {}
+
+ // Compresses and uploads the given file contents.
+ virtual void DoUpload(const std::string& file_contents,
+ const UploadProgressCallback& progress_callback,
+ const UploadDoneCallback& done_callback) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_TRACE_UPLOADER_H_

Powered by Google App Engine
This is Rietveld 408576698