diff options
author | primiano <primiano@chromium.org> | 2015-04-18 06:35:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-18 13:36:02 +0000 |
commit | 34ba094217686108e18600a7e5c45ade7ec39023 (patch) | |
tree | 83a5e958b4dc88a6b567d80c4f1dfc67835ca094 /components/tracing/child_trace_message_filter.cc | |
parent | 727a854fe8f30ceee2fd738572a2cf05dbeeebd3 (diff) | |
download | chromium_src-34ba094217686108e18600a7e5c45ade7ec39023.zip chromium_src-34ba094217686108e18600a7e5c45ade7ec39023.tar.gz chromium_src-34ba094217686108e18600a7e5c45ade7ec39023.tar.bz2 |
[tracing] Prepare for internal async handling of ProcessMemoryDump(s)
So far the internal interface between MemoryDumpManager and its
delegates (TracingControllerImpl on the browser side and
ChildTraceMessageFilter on the child side) has been synchronous,
in the sense that all the MDP.DumpInto() calls were performed
in the current call stack.
The MemoryDumpProviders contract, however, is going to change in the
upcoming CLs to support posting the DumpInto() on other threads.
This requires to change the internal CreateProcessDump() method to
be asynchronous and requires the corresponding bookkeeping.
BUG=478008
Review URL: https://codereview.chromium.org/1089493003
Cr-Commit-Position: refs/heads/master@{#325779}
Diffstat (limited to 'components/tracing/child_trace_message_filter.cc')
-rw-r--r-- | components/tracing/child_trace_message_filter.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc index 87812f1..3dd1223 100644 --- a/components/tracing/child_trace_message_filter.cc +++ b/components/tracing/child_trace_message_filter.cc @@ -182,9 +182,15 @@ void ChildTraceMessageFilter::OnMonitoringTraceDataCollected( // Sent by the Browser's MemoryDumpManager when coordinating a global dump. void ChildTraceMessageFilter::OnProcessMemoryDumpRequest( const base::trace_event::MemoryDumpRequestArgs& args) { - ChildMemoryDumpManagerDelegateImpl::GetInstance()->CreateProcessDump(args); + ChildMemoryDumpManagerDelegateImpl::GetInstance()->CreateProcessDump( + args, + base::Bind(&ChildTraceMessageFilter::OnProcessMemoryDumpDone, this)); +} + +void ChildTraceMessageFilter::OnProcessMemoryDumpDone(uint64 dump_guid, + bool success) { sender_->Send( - new TracingHostMsg_ProcessMemoryDumpResponse(args.dump_guid, true)); + new TracingHostMsg_ProcessMemoryDumpResponse(dump_guid, success)); } // Initiates a dump request, asking the Browser's MemoryDumpManager to |