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

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

Issue 2440443002: tracing: remove WatchEvent feature (Closed)
Patch Set: Created 4 years, 2 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // TracingController implementation. 67 // TracingController implementation.
68 bool GetCategories(const GetCategoriesDoneCallback& callback) override; 68 bool GetCategories(const GetCategoriesDoneCallback& callback) override;
69 bool StartTracing(const base::trace_event::TraceConfig& trace_config, 69 bool StartTracing(const base::trace_event::TraceConfig& trace_config,
70 const StartTracingDoneCallback& callback) override; 70 const StartTracingDoneCallback& callback) override;
71 bool StopTracing(const scoped_refptr<TraceDataSink>& sink) override; 71 bool StopTracing(const scoped_refptr<TraceDataSink>& sink) override;
72 bool GetTraceBufferUsage( 72 bool GetTraceBufferUsage(
73 const GetTraceBufferUsageCallback& callback) override; 73 const GetTraceBufferUsageCallback& callback) override;
74 void AddMetadata(const base::DictionaryValue& metadata) override; 74 void AddMetadata(const base::DictionaryValue& metadata) override;
75 75
76 bool SetWatchEvent(const std::string& category_name,
77 const std::string& event_name,
78 const WatchEventCallback& callback) override;
79 bool CancelWatchEvent() override;
80 bool IsTracing() const override; 76 bool IsTracing() const override;
81 77
82 void RegisterTracingUI(TracingUI* tracing_ui); 78 void RegisterTracingUI(TracingUI* tracing_ui);
83 void UnregisterTracingUI(TracingUI* tracing_ui); 79 void UnregisterTracingUI(TracingUI* tracing_ui);
84 80
85 // base::trace_event::TracingAgent implementation. 81 // base::trace_event::TracingAgent implementation.
86 std::string GetTracingAgentName() override; 82 std::string GetTracingAgentName() override;
87 std::string GetTraceEventLabel() override; 83 std::string GetTraceEventLabel() override;
88 void StartAgentTracing(const base::trace_event::TraceConfig& trace_config, 84 void StartAgentTracing(const base::trace_event::TraceConfig& trace_config,
89 const StartAgentTracingCallback& callback) override; 85 const StartAgentTracingCallback& callback) override;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 133 }
138 134
139 bool can_stop_monitoring() const { 135 bool can_stop_monitoring() const {
140 return is_monitoring_ && !monitoring_data_sink_.get(); 136 return is_monitoring_ && !monitoring_data_sink_.get();
141 } 137 }
142 138
143 bool can_get_trace_buffer_usage() const { 139 bool can_get_trace_buffer_usage() const {
144 return pending_trace_buffer_usage_callback_.is_null(); 140 return pending_trace_buffer_usage_callback_.is_null();
145 } 141 }
146 142
147 bool can_cancel_watch_event() const {
148 return !watch_event_callback_.is_null();
149 }
150
151 void PerformNextQueuedGlobalMemoryDump(); 143 void PerformNextQueuedGlobalMemoryDump();
152 144
153 // Methods for use by TraceMessageFilter. 145 // Methods for use by TraceMessageFilter.
154 void AddTraceMessageFilter(TraceMessageFilter* trace_message_filter); 146 void AddTraceMessageFilter(TraceMessageFilter* trace_message_filter);
155 void RemoveTraceMessageFilter(TraceMessageFilter* trace_message_filter); 147 void RemoveTraceMessageFilter(TraceMessageFilter* trace_message_filter);
156 148
157 void OnTraceDataCollected( 149 void OnTraceDataCollected(
158 const scoped_refptr<base::RefCountedString>& events_str_ptr); 150 const scoped_refptr<base::RefCountedString>& events_str_ptr);
159 151
160 // Callback of TraceLog::Flush() for the local trace. 152 // Callback of TraceLog::Flush() for the local trace.
(...skipping 20 matching lines...) Expand all
181 const base::trace_event::TraceLogStatus& status); 173 const base::trace_event::TraceLogStatus& status);
182 void OnProcessMemoryDumpResponse(TraceMessageFilter* trace_message_filter, 174 void OnProcessMemoryDumpResponse(TraceMessageFilter* trace_message_filter,
183 uint64_t dump_guid, 175 uint64_t dump_guid,
184 bool success); 176 bool success);
185 177
186 // Callback of MemoryDumpManager::CreateProcessDump(). 178 // Callback of MemoryDumpManager::CreateProcessDump().
187 void OnBrowserProcessMemoryDumpDone(uint64_t dump_guid, bool success); 179 void OnBrowserProcessMemoryDumpDone(uint64_t dump_guid, bool success);
188 180
189 void FinalizeGlobalMemoryDumpIfAllProcessesReplied(); 181 void FinalizeGlobalMemoryDumpIfAllProcessesReplied();
190 182
191 void OnWatchEventMatched();
192
193 void SetEnabledOnFileThread( 183 void SetEnabledOnFileThread(
194 const base::trace_event::TraceConfig& trace_config, 184 const base::trace_event::TraceConfig& trace_config,
195 int mode, 185 int mode,
196 const base::Closure& callback); 186 const base::Closure& callback);
197 void SetDisabledOnFileThread(const base::Closure& callback); 187 void SetDisabledOnFileThread(const base::Closure& callback);
198 void OnAllTracingAgentsStarted(); 188 void OnAllTracingAgentsStarted();
199 void StopTracingAfterClockSync(); 189 void StopTracingAfterClockSync();
200 void OnStopTracingDone(); 190 void OnStopTracingDone();
201 191
202 // Issue clock sync markers to the tracing agents. 192 // Issue clock sync markers to the tracing agents.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 std::vector<base::trace_event::TracingAgent*> additional_tracing_agents_; 228 std::vector<base::trace_event::TracingAgent*> additional_tracing_agents_;
239 int pending_clock_sync_ack_count_; 229 int pending_clock_sync_ack_count_;
240 base::OneShotTimer clock_sync_timer_; 230 base::OneShotTimer clock_sync_timer_;
241 231
242 bool is_tracing_; 232 bool is_tracing_;
243 bool is_monitoring_; 233 bool is_monitoring_;
244 234
245 GetCategoriesDoneCallback pending_get_categories_done_callback_; 235 GetCategoriesDoneCallback pending_get_categories_done_callback_;
246 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_; 236 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_;
247 237
248 std::string watch_category_name_;
249 std::string watch_event_name_;
250 WatchEventCallback watch_event_callback_;
251
252 base::ObserverList<TraceMessageFilterObserver> 238 base::ObserverList<TraceMessageFilterObserver>
253 trace_message_filter_observers_; 239 trace_message_filter_observers_;
254 240
255 std::set<std::string> known_category_groups_; 241 std::set<std::string> known_category_groups_;
256 std::set<TracingUI*> tracing_uis_; 242 std::set<TracingUI*> tracing_uis_;
257 scoped_refptr<TraceDataSink> trace_data_sink_; 243 scoped_refptr<TraceDataSink> trace_data_sink_;
258 scoped_refptr<TraceDataSink> monitoring_data_sink_; 244 scoped_refptr<TraceDataSink> monitoring_data_sink_;
259 std::unique_ptr<base::DictionaryValue> metadata_; 245 std::unique_ptr<base::DictionaryValue> metadata_;
260 246
261 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); 247 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl);
262 }; 248 };
263 249
264 } // namespace content 250 } // namespace content
265 251
266 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 252 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698