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

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

Issue 12302036: Add a mode flag to the tracing framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TRACE_CONTROLLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
7 7
8 #include "base/debug/trace_event.h"
8 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 class TraceSubscriber; 13 class TraceSubscriber;
13 14
14 // TraceController is used on the browser processes to enable/disable 15 // TraceController is used on the browser processes to enable/disable
15 // trace status and collect trace data. Only the browser UI thread is allowed 16 // trace status and collect trace data. Only the browser UI thread is allowed
16 // to interact with the TraceController object. All calls on the TraceSubscriber 17 // to interact with the TraceController object. All calls on the TraceSubscriber
17 // happen on the UI thread. 18 // happen on the UI thread.
(...skipping 10 matching lines...) Expand all
28 // If BeginTracing was already called previously, 29 // If BeginTracing was already called previously,
29 // or if an EndTracingAsync is pending, 30 // or if an EndTracingAsync is pending,
30 // or if another subscriber is tracing, 31 // or if another subscriber is tracing,
31 // BeginTracing will return false meaning it failed. 32 // BeginTracing will return false meaning it failed.
32 // 33 //
33 // |categories| is a comma-delimited list of category wildcards. 34 // |categories| is a comma-delimited list of category wildcards.
34 // A category can have an optional '-' prefix to make it an excluded category. 35 // A category can have an optional '-' prefix to make it an excluded category.
35 // All the same rules apply above, so for example, having both included and 36 // All the same rules apply above, so for example, having both included and
36 // excluded categories in the same list would not be supported. 37 // excluded categories in the same list would not be supported.
37 // 38 //
39 // |mode| is the tracing mode begin used.
Jói 2013/02/22 15:11:30 begin -> being
dsinclair 2013/02/22 15:16:00 Done.
40 //
38 // Example: BeginTracing("test_MyTest*"); 41 // Example: BeginTracing("test_MyTest*");
39 // Example: BeginTracing("test_MyTest*,test_OtherStuff"); 42 // Example: BeginTracing("test_MyTest*,test_OtherStuff");
40 // Example: BeginTracing("-excluded_category1,-excluded_category2"); 43 // Example: BeginTracing("-excluded_category1,-excluded_category2");
41 virtual bool BeginTracing(TraceSubscriber* subscriber, 44 virtual bool BeginTracing(TraceSubscriber* subscriber,
42 const std::string& categories) = 0; 45 const std::string& categories,
46 int options) = 0;
43 47
44 // Called by browser process to stop tracing events on all processes. 48 // Called by browser process to stop tracing events on all processes.
45 // 49 //
46 // Child processes typically are caching trace data and only rarely flush 50 // Child processes typically are caching trace data and only rarely flush
47 // and send trace data back to the browser process. That is because it may be 51 // and send trace data back to the browser process. That is because it may be
48 // an expensive operation to send the trace data over IPC, and we would like 52 // an expensive operation to send the trace data over IPC, and we would like
49 // to avoid much runtime overhead of tracing. So, to end tracing, we must 53 // to avoid much runtime overhead of tracing. So, to end tracing, we must
50 // asynchronously ask all child processes to flush any pending trace data. 54 // asynchronously ask all child processes to flush any pending trace data.
51 // 55 //
52 // Once all child processes have acked the EndTracing request, 56 // Once all child processes have acked the EndTracing request,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0; 89 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0;
86 90
87 protected: 91 protected:
88 virtual ~TraceController() {} 92 virtual ~TraceController() {}
89 }; 93 };
90 94
91 } // namespace content 95 } // namespace content
92 96
93 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ 97 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
94 98
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698