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

Side by Side Diff: content/browser/trace_controller_impl.h

Issue 10855062: Allow use of the chrome trace categories string from the tracing ui internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update DEPS for trace-viewer changes. Created 8 years, 4 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 | « chrome/browser/ui/webui/tracing_ui.cc ('k') | content/browser/trace_controller_impl.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 (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_BROWSER_TRACE_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_TRACE_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_TRACE_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_TRACE_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 class TraceControllerImpl : public TraceController { 21 class TraceControllerImpl : public TraceController {
22 public: 22 public:
23 static TraceControllerImpl* GetInstance(); 23 static TraceControllerImpl* GetInstance();
24 24
25 // Called on the main thread of the browser process to initialize 25 // Called on the main thread of the browser process to initialize
26 // startup tracing. 26 // startup tracing.
27 void InitStartupTracing(const CommandLine& command_line); 27 void InitStartupTracing(const CommandLine& command_line);
28 28
29 // Get set of known categories. This can change as new code paths are reached. 29 // Get set of known categories. This can change as new code paths are reached.
30 // If true is returned, subscriber->OnKnownCategoriesCollected will be called 30 // If true is returned, subscriber->OnKnownCategoriesCollected will be called
31 // when once the categories are retrieved from child processes. 31 // once the categories are retrieved from child processes.
32 bool GetKnownCategoriesAsync(TraceSubscriber* subscriber); 32 bool GetKnownCategoriesAsync(TraceSubscriber* subscriber);
33 33
34 // Same as above, but specifies which categories to trace. 34 // Same as above, but specifies which categories to trace.
35 // If both included_categories and excluded_categories are empty, 35 // If both included_categories and excluded_categories are empty,
36 // all categories are traced. 36 // all categories are traced.
37 // Else if included_categories is non-empty, only those are traced. 37 // Else if included_categories is non-empty, only those are traced.
38 // Else if excluded_categories is non-empty, everything but those are traced. 38 // Else if excluded_categories is non-empty, everything but those are traced.
39 bool BeginTracing(TraceSubscriber* subscriber, 39 bool BeginTracing(TraceSubscriber* subscriber,
40 const std::vector<std::string>& included_categories, 40 const std::vector<std::string>& included_categories,
41 const std::vector<std::string>& excluded_categories); 41 const std::vector<std::string>& excluded_categories);
42 42
43 // TraceController implementation: 43 // TraceController implementation:
44 virtual bool BeginTracing(TraceSubscriber* subscriber) OVERRIDE;
45 virtual bool BeginTracing(TraceSubscriber* subscriber, 44 virtual bool BeginTracing(TraceSubscriber* subscriber,
46 const std::string& categories) OVERRIDE; 45 const std::string& categories) OVERRIDE;
47 virtual bool EndTracingAsync(TraceSubscriber* subscriber) OVERRIDE; 46 virtual bool EndTracingAsync(TraceSubscriber* subscriber) OVERRIDE;
48 virtual bool GetTraceBufferPercentFullAsync( 47 virtual bool GetTraceBufferPercentFullAsync(
49 TraceSubscriber* subscriber) OVERRIDE; 48 TraceSubscriber* subscriber) OVERRIDE;
50 virtual void CancelSubscriber(TraceSubscriber* subscriber) OVERRIDE; 49 virtual void CancelSubscriber(TraceSubscriber* subscriber) OVERRIDE;
51 50
52 private: 51 private:
53 typedef std::set<scoped_refptr<TraceMessageFilter> > FilterMap; 52 typedef std::set<scoped_refptr<TraceMessageFilter> > FilterMap;
54 53
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 std::vector<std::string> included_categories_; 101 std::vector<std::string> included_categories_;
103 std::vector<std::string> excluded_categories_; 102 std::vector<std::string> excluded_categories_;
104 103
105 DISALLOW_COPY_AND_ASSIGN(TraceControllerImpl); 104 DISALLOW_COPY_AND_ASSIGN(TraceControllerImpl);
106 }; 105 };
107 106
108 } // namespace content 107 } // namespace content
109 108
110 #endif // CONTENT_BROWSER_TRACE_CONTROLLER_IMPL_H_ 109 #endif // CONTENT_BROWSER_TRACE_CONTROLLER_IMPL_H_
111 110
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.cc ('k') | content/browser/trace_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698