Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / content / public / browser / trace_uploader.h
blobdbf245853b7187305598b7f80af0352b3ffe711b
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_UPLOADER_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACE_UPLOADER_H_
8 #include "base/callback.h"
10 namespace content {
12 // Used to implement a trace upload service for use in about://tracing,
13 // which gets requested through the TracingDelegate.
14 class TraceUploader {
15 public:
16 // This should be called when the tracing is complete.
17 // The bool denotes success or failure, the string is feedback
18 // to show in the Tracing UI.
19 typedef base::Callback<void(bool, const std::string&)> UploadDoneCallback;
20 // Call this to update the progress UI with the current bytes uploaded,
21 // as well as the total.
22 typedef base::Callback<void(int64, int64)> UploadProgressCallback;
24 virtual ~TraceUploader() {}
26 // Compresses and uploads the given file contents.
27 virtual void DoUpload(const std::string& file_contents,
28 const UploadProgressCallback& progress_callback,
29 const UploadDoneCallback& done_callback) = 0;
32 } // namespace content
34 #endif // CONTENT_PUBLIC_BROWSER_TRACE_UPLOADER_H_