summaryrefslogtreecommitdiffstats
path: root/components/tracing
diff options
context:
space:
mode:
authorzhenw <zhenw@chromium.org>2015-11-11 14:16:55 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-11 22:17:38 +0000
commit873bdffc0792f4026ec9dfe6efbc130a11c9fd52 (patch)
tree442f30946d85c8ab90c28b0a216e2d00e27bb9b5 /components/tracing
parentd4f9637d51829c0d779e7ce07b945e8b7813397d (diff)
downloadchromium_src-873bdffc0792f4026ec9dfe6efbc130a11c9fd52.zip
chromium_src-873bdffc0792f4026ec9dfe6efbc130a11c9fd52.tar.gz
chromium_src-873bdffc0792f4026ec9dfe6efbc130a11c9fd52.tar.bz2
[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}
Diffstat (limited to 'components/tracing')
-rw-r--r--components/tracing/child_trace_message_filter.cc8
-rw-r--r--components/tracing/child_trace_message_filter.h4
-rw-r--r--components/tracing/tracing_messages.h4
3 files changed, 8 insertions, 8 deletions
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)