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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 83483007: Expose synthetic delays through the GPU benchmarking extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 8a0e414c088b8e8f9adc643b3a54bb1e2560185b..c779de43328ed03caa3b49874d61ea8820a39e8c 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -42,6 +42,8 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnGetTraceBufferPercentFull)
IPC_MESSAGE_HANDLER(TracingMsg_SetWatchEvent, OnSetWatchEvent)
IPC_MESSAGE_HANDLER(TracingMsg_CancelWatchEvent, OnCancelWatchEvent)
+ IPC_MESSAGE_HANDLER(TracingMsg_ConfigureSyntheticDelay,
+ OnConfigureSyntheticDelay)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -118,6 +120,15 @@ void ChildTraceMessageFilter::OnCancelWatchEvent() {
TraceLog::GetInstance()->CancelWatchEvent();
}
+void ChildTraceMessageFilter::OnConfigureSyntheticDelay(
+ const TracingMsg_ConfigureSyntheticDelay_Params& params) {
+ base::debug::TraceEventSyntheticDelay* delay =
+ base::debug::TraceEventSyntheticDelay::Lookup(params.name);
+ delay->SetTargetDuration(params.target_duration);
+ delay->SetMode(params.mode);
+ channel_->Send(new TracingHostMsg_ConfigureSyntheticDelayAck());
+}
+
void ChildTraceMessageFilter::OnTraceDataCollected(
const scoped_refptr<base::RefCountedString>& events_str_ptr,
bool has_more_events) {

Powered by Google App Engine
This is Rietveld 408576698