From 873bdffc0792f4026ec9dfe6efbc130a11c9fd52 Mon Sep 17 00:00:00 2001 From: zhenw Date: Wed, 11 Nov 2015 14:16:55 -0800 Subject: [Tracing] Rename TracingController APIs We want to refactor TracingController to follow the clock sync architecture. And StartTracing and StopTracing are the APIs shared by all tracing methods. This CL renames current TracingController's APIs in Chrome so that they are consistent with other tracing methods. Rename: EnableRecording -> StartTracing DisableRecording -> StopTracing EnableMonitoring -> StartMonitoring DisableMonitoring -> StopMonitoring IsRecording -> IsTracing Design doc: https://docs.google.com/document/d/1uzN-Q9HNNl3hOirmhPwKzmeNBK17rQsPQxhlqlAeIJI/edit?usp=sharing BUG=542390 Review URL: https://codereview.chromium.org/1410703007 Cr-Commit-Position: refs/heads/master@{#359171} --- components/tracing/child_trace_message_filter.cc | 8 ++++---- components/tracing/child_trace_message_filter.h | 4 ++-- components/tracing/tracing_messages.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'components/tracing') diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc index 537f6e8..5d08734 100644 --- a/components/tracing/child_trace_message_filter.cc +++ b/components/tracing/child_trace_message_filter.cc @@ -46,8 +46,8 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(TracingMsg_BeginTracing, OnBeginTracing) IPC_MESSAGE_HANDLER(TracingMsg_EndTracing, OnEndTracing) IPC_MESSAGE_HANDLER(TracingMsg_CancelTracing, OnCancelTracing) - IPC_MESSAGE_HANDLER(TracingMsg_EnableMonitoring, OnEnableMonitoring) - IPC_MESSAGE_HANDLER(TracingMsg_DisableMonitoring, OnDisableMonitoring) + IPC_MESSAGE_HANDLER(TracingMsg_StartMonitoring, OnStartMonitoring) + IPC_MESSAGE_HANDLER(TracingMsg_StopMonitoring, OnStopMonitoring) IPC_MESSAGE_HANDLER(TracingMsg_CaptureMonitoringSnapshot, OnCaptureMonitoringSnapshot) IPC_MESSAGE_HANDLER(TracingMsg_GetTraceLogStatus, OnGetTraceLogStatus) @@ -103,14 +103,14 @@ void ChildTraceMessageFilter::OnCancelTracing() { base::Bind(&ChildTraceMessageFilter::OnTraceDataCollected, this)); } -void ChildTraceMessageFilter::OnEnableMonitoring( +void ChildTraceMessageFilter::OnStartMonitoring( const std::string& trace_config_str, base::TimeTicks browser_time) { TraceLog::GetInstance()->SetEnabled( base::trace_event::TraceConfig(trace_config_str), base::trace_event::TraceLog::MONITORING_MODE); } -void ChildTraceMessageFilter::OnDisableMonitoring() { +void ChildTraceMessageFilter::OnStopMonitoring() { TraceLog::GetInstance()->SetDisabled(); } diff --git a/components/tracing/child_trace_message_filter.h b/components/tracing/child_trace_message_filter.h index dff2648d..9f7755c 100644 --- a/components/tracing/child_trace_message_filter.h +++ b/components/tracing/child_trace_message_filter.h @@ -48,9 +48,9 @@ class TRACING_EXPORT ChildTraceMessageFilter : public IPC::MessageFilter { uint64 tracing_process_id); void OnEndTracing(); void OnCancelTracing(); - void OnEnableMonitoring(const std::string& trace_config_str, + void OnStartMonitoring(const std::string& trace_config_str, base::TimeTicks browser_time); - void OnDisableMonitoring(); + void OnStopMonitoring(); void OnCaptureMonitoringSnapshot(); void OnGetTraceLogStatus(); void OnSetWatchEvent(const std::string& category_name, diff --git a/components/tracing/tracing_messages.h b/components/tracing/tracing_messages.h index 658972f..26dd9d1 100644 --- a/components/tracing/tracing_messages.h +++ b/components/tracing/tracing_messages.h @@ -56,12 +56,12 @@ IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) IPC_MESSAGE_CONTROL0(TracingMsg_CancelTracing) // Sent to all child processes to start monitoring. -IPC_MESSAGE_CONTROL2(TracingMsg_EnableMonitoring, +IPC_MESSAGE_CONTROL2(TracingMsg_StartMonitoring, std::string /* trace_config_str */, base::TimeTicks /* browser_time */) // Sent to all child processes to stop monitoring. -IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring) +IPC_MESSAGE_CONTROL0(TracingMsg_StopMonitoring) // Sent to all child processes to capture the current monitorint snapshot. IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot) -- cgit v1.1