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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 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 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 46cdf336fe2d9120f9dab6a84e01201dcf2b1da6..3df0f7075fc60171e4ed54b112299db42ccea893 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -15,16 +15,16 @@ namespace tracing {
ChildTraceMessageFilter::ChildTraceMessageFilter(
base::MessageLoopProxy* ipc_message_loop)
- : channel_(NULL),
+ : sender_(NULL),
ipc_message_loop_(ipc_message_loop) {}
-void ChildTraceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
- channel_ = channel;
- channel_->Send(new TracingHostMsg_ChildSupportsTracing());
+void ChildTraceMessageFilter::OnFilterAdded(IPC::Sender* sender) {
+ sender_ = sender;
+ sender_->Send(new TracingHostMsg_ChildSupportsTracing());
}
void ChildTraceMessageFilter::OnFilterRemoved() {
- channel_ = NULL;
+ sender_ = NULL;
}
bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
@@ -105,7 +105,7 @@ void ChildTraceMessageFilter::OnCaptureMonitoringSnapshot() {
void ChildTraceMessageFilter::OnGetTraceBufferPercentFull() {
float bpf = TraceLog::GetInstance()->GetBufferPercentFull();
- channel_->Send(new TracingHostMsg_TraceBufferPercentFullReply(bpf));
+ sender_->Send(new TracingHostMsg_TraceBufferPercentFullReply(bpf));
}
void ChildTraceMessageFilter::OnSetWatchEvent(const std::string& category_name,
@@ -125,7 +125,7 @@ void ChildTraceMessageFilter::OnWatchEventMatched() {
base::Bind(&ChildTraceMessageFilter::OnWatchEventMatched, this));
return;
}
- channel_->Send(new TracingHostMsg_WatchEventMatched);
+ sender_->Send(new TracingHostMsg_WatchEventMatched);
}
void ChildTraceMessageFilter::OnTraceDataCollected(
@@ -138,13 +138,13 @@ void ChildTraceMessageFilter::OnTraceDataCollected(
return;
}
if (events_str_ptr->data().size()) {
- channel_->Send(new TracingHostMsg_TraceDataCollected(
+ sender_->Send(new TracingHostMsg_TraceDataCollected(
events_str_ptr->data()));
}
if (!has_more_events) {
std::vector<std::string> category_groups;
TraceLog::GetInstance()->GetKnownCategoryGroups(&category_groups);
- channel_->Send(new TracingHostMsg_EndTracingAck(category_groups));
+ sender_->Send(new TracingHostMsg_EndTracingAck(category_groups));
}
}
@@ -160,11 +160,11 @@ void ChildTraceMessageFilter::OnMonitoringTraceDataCollected(
has_more_events));
return;
}
- channel_->Send(new TracingHostMsg_MonitoringTraceDataCollected(
+ sender_->Send(new TracingHostMsg_MonitoringTraceDataCollected(
events_str_ptr->data()));
if (!has_more_events)
- channel_->Send(new TracingHostMsg_CaptureMonitoringSnapshotAck());
+ sender_->Send(new TracingHostMsg_CaptureMonitoringSnapshotAck());
}
} // namespace tracing
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | content/browser/dom_storage/dom_storage_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698