Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / public / browser / tracing_delegate.h
blob2d5ba9570d9d592b9681fe6d3f2a2172bb3337c6
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_TRACING_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
11 namespace base {
12 class Time;
15 namespace net {
16 class URLRequestContextGetter;
19 namespace content {
20 class BackgroundTracingConfig;
21 class TraceUploader;
23 // This can be implemented by the embedder to provide functionality for the
24 // about://tracing WebUI.
25 class CONTENT_EXPORT TracingDelegate {
26 public:
27 virtual ~TracingDelegate() {}
29 // Provide trace uploading functionality; see trace_uploader.h.
30 virtual scoped_ptr<TraceUploader> GetTraceUploader(
31 net::URLRequestContextGetter* request_context) = 0;
33 // This can be used to veto a particular background tracing scenario.
34 virtual bool IsAllowedToBeginBackgroundScenario(
35 const BackgroundTracingConfig& config,
36 bool requires_anonymized_data);
38 virtual bool IsAllowedToEndBackgroundScenario(
39 const content::BackgroundTracingConfig& config,
40 bool requires_anonymized_data);
43 } // namespace content
45 #endif // CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_