OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |