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

Side by Side Diff: content/public/browser/tracing_delegate.h

Issue 1502583003: [Tracing] Add metadata filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile failure on win Created 5 years 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 unified diff | Download patch
« no previous file with comments | « content/public/browser/tracing_controller.h ('k') | content/public/browser/tracing_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string>
9
10 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
10 13
11 namespace base { 14 namespace base {
12 class DictionaryValue; 15 class DictionaryValue;
13 class Time; 16 class Time;
14 } 17 }
15 18
16 namespace net { 19 namespace net {
17 class URLRequestContextGetter; 20 class URLRequestContextGetter;
18 } 21 }
19 22
20 namespace content { 23 namespace content {
21 class BackgroundTracingConfig; 24 class BackgroundTracingConfig;
22 class TraceUploader; 25 class TraceUploader;
23 26
27 typedef base::Callback<bool(const std::string& metadata_name)>
28 MetadataFilterPredicate;
29
24 // This can be implemented by the embedder to provide functionality for the 30 // This can be implemented by the embedder to provide functionality for the
25 // about://tracing WebUI. 31 // about://tracing WebUI.
26 class CONTENT_EXPORT TracingDelegate { 32 class CONTENT_EXPORT TracingDelegate {
27 public: 33 public:
28 virtual ~TracingDelegate() {} 34 virtual ~TracingDelegate() {}
29 35
30 // Provide trace uploading functionality; see trace_uploader.h. 36 // Provide trace uploading functionality; see trace_uploader.h.
31 virtual scoped_ptr<TraceUploader> GetTraceUploader( 37 virtual scoped_ptr<TraceUploader> GetTraceUploader(
32 net::URLRequestContextGetter* request_context) = 0; 38 net::URLRequestContextGetter* request_context) = 0;
33 39
34 // This can be used to veto a particular background tracing scenario. 40 // This can be used to veto a particular background tracing scenario.
35 virtual bool IsAllowedToBeginBackgroundScenario( 41 virtual bool IsAllowedToBeginBackgroundScenario(
36 const BackgroundTracingConfig& config, 42 const BackgroundTracingConfig& config,
37 bool requires_anonymized_data); 43 bool requires_anonymized_data);
38 44
39 virtual bool IsAllowedToEndBackgroundScenario( 45 virtual bool IsAllowedToEndBackgroundScenario(
40 const content::BackgroundTracingConfig& config, 46 const content::BackgroundTracingConfig& config,
41 bool requires_anonymized_data); 47 bool requires_anonymized_data);
42 48
43 // Used to add any additional metadata to traces. 49 // Used to add any additional metadata to traces.
44 virtual void GenerateMetadataDict(base::DictionaryValue* metadata_dict) {} 50 virtual void GenerateMetadataDict(base::DictionaryValue* metadata_dict) {}
51
52 virtual MetadataFilterPredicate GetMetadataFilterPredicate();
45 }; 53 };
46 54
47 } // namespace content 55 } // namespace content
48 56
49 #endif // CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_ 57 #endif // CONTENT_PUBLIC_BROWSER_TRACING_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/tracing_controller.h ('k') | content/public/browser/tracing_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698