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

Unified Diff: content/browser/tracing/trace_message_filter.cc

Issue 2724793002: Revert of memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/trace_message_filter.cc
diff --git a/content/browser/tracing/trace_message_filter.cc b/content/browser/tracing/trace_message_filter.cc
index a0e97d1b3c13c58ff3b1afbcd9d054d7f7cfd7b4..70089d96101dafd2f90e6fb321a4ca21167f5eb4 100644
--- a/content/browser/tracing/trace_message_filter.cc
+++ b/content/browser/tracing/trace_message_filter.cc
@@ -46,6 +46,10 @@
OnTraceDataCollected)
IPC_MESSAGE_HANDLER(TracingHostMsg_TraceLogStatusReply,
OnTraceLogStatusReply)
+ IPC_MESSAGE_HANDLER(TracingHostMsg_GlobalMemoryDumpRequest,
+ OnGlobalMemoryDumpRequest)
+ IPC_MESSAGE_HANDLER(TracingHostMsg_ProcessMemoryDumpResponse,
+ OnProcessMemoryDumpResponse)
IPC_MESSAGE_HANDLER(TracingHostMsg_TriggerBackgroundTrace,
OnTriggerBackgroundTrace)
IPC_MESSAGE_HANDLER(TracingHostMsg_AbortBackgroundTrace,
@@ -83,6 +87,18 @@
Send(new TracingMsg_GetTraceLogStatus);
}
+// Called by TracingControllerImpl, which handles the multiprocess coordination.
+void TraceMessageFilter::SendProcessMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args) {
+ Send(new TracingMsg_ProcessMemoryDumpRequest(args));
+}
+
+// Called by TracingControllerImpl, which handles the multiprocess coordination.
+void TraceMessageFilter::SendGlobalMemoryDumpResponse(uint64_t dump_guid,
+ bool success) {
+ Send(new TracingMsg_GlobalMemoryDumpResponse(dump_guid, success));
+}
+
void TraceMessageFilter::OnChildSupportsTracing() {
has_child_ = true;
TracingControllerImpl::GetInstance()->AddTraceMessageFilter(this);
@@ -117,6 +133,19 @@
}
}
+void TraceMessageFilter::OnGlobalMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args) {
+ TracingControllerImpl::GetInstance()->RequestGlobalMemoryDump(
+ args,
+ base::Bind(&TraceMessageFilter::SendGlobalMemoryDumpResponse, this));
+}
+
+void TraceMessageFilter::OnProcessMemoryDumpResponse(uint64_t dump_guid,
+ bool success) {
+ TracingControllerImpl::GetInstance()->OnProcessMemoryDumpResponse(
+ this, dump_guid, success);
+}
+
void TraceMessageFilter::OnTriggerBackgroundTrace(const std::string& name) {
BackgroundTracingManagerImpl::GetInstance()->OnHistogramTrigger(name);
}
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698