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

Side by Side Diff: content/browser/tracing/tracing_controller_impl.h

Issue 1165673002: [Startup Tracing] Hook up TraceConfig and remove CategoryFilter & TraceOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_TRACING_TRACING_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 class TracingUI; 24 class TracingUI;
25 25
26 class TracingControllerImpl 26 class TracingControllerImpl
27 : public TracingController, 27 : public TracingController,
28 public base::trace_event::MemoryDumpManagerDelegate { 28 public base::trace_event::MemoryDumpManagerDelegate {
29 public: 29 public:
30 static TracingControllerImpl* GetInstance(); 30 static TracingControllerImpl* GetInstance();
31 31
32 // TracingController implementation. 32 // TracingController implementation.
33 bool GetCategories(const GetCategoriesDoneCallback& callback) override; 33 bool GetCategories(const GetCategoriesDoneCallback& callback) override;
34 bool EnableRecording(const base::trace_event::CategoryFilter& category_filter, 34 bool EnableRecording(const base::trace_event::TraceConfig& trace_config,
35 const base::trace_event::TraceOptions& trace_options,
36 const EnableRecordingDoneCallback& callback) override; 35 const EnableRecordingDoneCallback& callback) override;
37 bool DisableRecording(const scoped_refptr<TraceDataSink>& sink) override; 36 bool DisableRecording(const scoped_refptr<TraceDataSink>& sink) override;
38 bool EnableMonitoring( 37 bool EnableMonitoring(
39 const base::trace_event::CategoryFilter& category_filter, 38 const base::trace_event::TraceConfig& trace_config,
40 const base::trace_event::TraceOptions& trace_options,
41 const EnableMonitoringDoneCallback& callback) override; 39 const EnableMonitoringDoneCallback& callback) override;
42 bool DisableMonitoring( 40 bool DisableMonitoring(
43 const DisableMonitoringDoneCallback& callback) override; 41 const DisableMonitoringDoneCallback& callback) override;
44 void GetMonitoringStatus( 42 void GetMonitoringStatus(
45 bool* out_enabled, 43 bool* out_enabled,
46 base::trace_event::CategoryFilter* out_category_filter, 44 base::trace_event::TraceConfig* out_trace_config) override;
47 base::trace_event::TraceOptions* out_trace_options) override;
48 bool CaptureMonitoringSnapshot( 45 bool CaptureMonitoringSnapshot(
49 const scoped_refptr<TraceDataSink>& sink) override; 46 const scoped_refptr<TraceDataSink>& sink) override;
50 bool GetTraceBufferUsage( 47 bool GetTraceBufferUsage(
51 const GetTraceBufferUsageCallback& callback) override; 48 const GetTraceBufferUsageCallback& callback) override;
52 bool SetWatchEvent(const std::string& category_name, 49 bool SetWatchEvent(const std::string& category_name,
53 const std::string& event_name, 50 const std::string& event_name,
54 const WatchEventCallback& callback) override; 51 const WatchEventCallback& callback) override;
55 bool CancelWatchEvent() override; 52 bool CancelWatchEvent() override;
56 53
57 void RegisterTracingUI(TracingUI* tracing_ui); 54 void RegisterTracingUI(TracingUI* tracing_ui);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bool success); 130 bool success);
134 131
135 // Callback of MemoryDumpManager::CreateProcessDump(). 132 // Callback of MemoryDumpManager::CreateProcessDump().
136 void OnBrowserProcessMemoryDumpDone(uint64 dump_guid, bool success); 133 void OnBrowserProcessMemoryDumpDone(uint64 dump_guid, bool success);
137 134
138 void FinalizeGlobalMemoryDumpIfAllProcessesReplied(); 135 void FinalizeGlobalMemoryDumpIfAllProcessesReplied();
139 136
140 void OnWatchEventMatched(); 137 void OnWatchEventMatched();
141 138
142 void SetEnabledOnFileThread( 139 void SetEnabledOnFileThread(
143 const base::trace_event::CategoryFilter& category_filter, 140 const base::trace_event::TraceConfig& trace_config,
144 int mode, 141 int mode,
145 const base::trace_event::TraceOptions& trace_options,
146 const base::Closure& callback); 142 const base::Closure& callback);
147 void SetDisabledOnFileThread(const base::Closure& callback); 143 void SetDisabledOnFileThread(const base::Closure& callback);
148 void OnEnableRecordingDone( 144 void OnEnableRecordingDone(
149 const base::trace_event::CategoryFilter& category_filter, 145 const base::trace_event::TraceConfig& trace_config,
150 const base::trace_event::TraceOptions& trace_options,
151 const EnableRecordingDoneCallback& callback); 146 const EnableRecordingDoneCallback& callback);
152 void OnDisableRecordingDone(); 147 void OnDisableRecordingDone();
153 void OnEnableMonitoringDone( 148 void OnEnableMonitoringDone(
154 const base::trace_event::CategoryFilter& category_filter, 149 const base::trace_event::TraceConfig& trace_config,
155 const base::trace_event::TraceOptions& trace_options,
156 const EnableMonitoringDoneCallback& callback); 150 const EnableMonitoringDoneCallback& callback);
157 void OnDisableMonitoringDone(const DisableMonitoringDoneCallback& callback); 151 void OnDisableMonitoringDone(const DisableMonitoringDoneCallback& callback);
158 152
159 void OnMonitoringStateChanged(bool is_monitoring); 153 void OnMonitoringStateChanged(bool is_monitoring);
160 154
161 TraceMessageFilterSet trace_message_filters_; 155 TraceMessageFilterSet trace_message_filters_;
162 156
163 // Pending acks for DisableRecording. 157 // Pending acks for DisableRecording.
164 int pending_disable_recording_ack_count_; 158 int pending_disable_recording_ack_count_;
165 TraceMessageFilterSet pending_disable_recording_filters_; 159 TraceMessageFilterSet pending_disable_recording_filters_;
(...skipping 13 matching lines...) Expand all
179 int failed_memory_dump_count_; 173 int failed_memory_dump_count_;
180 TraceMessageFilterSet pending_memory_dump_filters_; 174 TraceMessageFilterSet pending_memory_dump_filters_;
181 uint64 pending_memory_dump_guid_; 175 uint64 pending_memory_dump_guid_;
182 base::trace_event::MemoryDumpCallback pending_memory_dump_callback_; 176 base::trace_event::MemoryDumpCallback pending_memory_dump_callback_;
183 177
184 #if defined(OS_CHROMEOS) || defined(OS_WIN) 178 #if defined(OS_CHROMEOS) || defined(OS_WIN)
185 bool is_system_tracing_; 179 bool is_system_tracing_;
186 #endif 180 #endif
187 bool is_recording_; 181 bool is_recording_;
188 bool is_monitoring_; 182 bool is_monitoring_;
189 base::trace_event::TraceOptions trace_options_;
190 183
191 GetCategoriesDoneCallback pending_get_categories_done_callback_; 184 GetCategoriesDoneCallback pending_get_categories_done_callback_;
192 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_; 185 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_;
193 186
194 std::string watch_category_name_; 187 std::string watch_category_name_;
195 std::string watch_event_name_; 188 std::string watch_event_name_;
196 WatchEventCallback watch_event_callback_; 189 WatchEventCallback watch_event_callback_;
197 190
198 std::set<std::string> known_category_groups_; 191 std::set<std::string> known_category_groups_;
199 std::set<TracingUI*> tracing_uis_; 192 std::set<TracingUI*> tracing_uis_;
200 scoped_refptr<TraceDataSink> trace_data_sink_; 193 scoped_refptr<TraceDataSink> trace_data_sink_;
201 scoped_refptr<TraceDataSink> monitoring_data_sink_; 194 scoped_refptr<TraceDataSink> monitoring_data_sink_;
202 195
203 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); 196 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl);
204 }; 197 };
205 198
206 } // namespace content 199 } // namespace content
207 200
208 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 201 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_controller_browsertest.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698