OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 | 9 |
10 namespace base { | |
11 class Time; | |
12 } | |
13 | |
10 namespace net { | 14 namespace net { |
11 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
12 } | 16 } |
13 | 17 |
14 namespace content { | 18 namespace content { |
19 struct BackgroundTracingConfig; | |
15 class TraceUploader; | 20 class TraceUploader; |
16 | 21 |
17 // This can be implemented by the embedder to provide functionality for the | 22 // This can be implemented by the embedder to provide functionality for the |
18 // about://tracing WebUI. | 23 // about://tracing WebUI. |
19 class TracingDelegate { | 24 class TracingDelegate { |
20 public: | 25 public: |
21 virtual ~TracingDelegate() {} | 26 virtual ~TracingDelegate() {} |
22 | 27 |
23 // Provide trace uploading functionality; see trace_uploader.h. | 28 // Provide trace uploading functionality; see trace_uploader.h. |
24 virtual scoped_ptr<TraceUploader> GetTraceUploader( | 29 virtual scoped_ptr<TraceUploader> GetTraceUploader( |
25 net::URLRequestContextGetter* request_context) = 0; | 30 net::URLRequestContextGetter* request_context) = 0; |
31 | |
32 // This can be used to veto a particular background tracing scenario. | |
33 virtual bool IsAllowedToBeginBackgroundScenario( | |
34 const BackgroundTracingConfig& config, | |
35 bool requires_anonymized_data) = 0; | |
no sievers
2015/06/04 22:55:34
nit: Usually the interfaces to be implemented by t
oystein (OOO til 10th of July)
2015/06/05 21:14:42
Fair point; I've made them default to false, as a
| |
36 | |
37 virtual bool IsAllowedToEndBackgroundScenario( | |
38 const content::BackgroundTracingConfig& config, | |
39 bool requires_anonymized_data) = 0; | |
26 }; | 40 }; |
27 | 41 |
28 } // namespace content | 42 } // namespace content |
29 | 43 |
30 #endif // CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ | 44 #endif // CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ |
OLD | NEW |