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

Side by Side Diff: components/tracing/child_memory_dump_manager_delegate_impl.cc

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/tracing/child_memory_dump_manager_delegate_impl.h" 5 #include "components/tracing/child_memory_dump_manager_delegate_impl.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "components/tracing/child_trace_message_filter.h" 8 #include "components/tracing/child_trace_message_filter.h"
9 9
10 namespace tracing { 10 namespace tracing {
(...skipping 13 matching lines...) Expand all
24 24
25 ChildMemoryDumpManagerDelegateImpl::~ChildMemoryDumpManagerDelegateImpl() { 25 ChildMemoryDumpManagerDelegateImpl::~ChildMemoryDumpManagerDelegateImpl() {
26 } 26 }
27 27
28 void ChildMemoryDumpManagerDelegateImpl::SetChildTraceMessageFilter( 28 void ChildMemoryDumpManagerDelegateImpl::SetChildTraceMessageFilter(
29 ChildTraceMessageFilter* ctmf) { 29 ChildTraceMessageFilter* ctmf) {
30 // Check that we are either registering the CTMF or tearing it down, but not 30 // Check that we are either registering the CTMF or tearing it down, but not
31 // replacing a valid instance with another one (should never happen). 31 // replacing a valid instance with another one (should never happen).
32 DCHECK(ctmf_ == nullptr || (ctmf == nullptr && ctmf_task_runner_ != nullptr)); 32 DCHECK(ctmf_ == nullptr || (ctmf == nullptr && ctmf_task_runner_ != nullptr));
33 ctmf_ = ctmf; 33 ctmf_ = ctmf;
34 ctmf_task_runner_ = ctmf ? (ctmf->ipc_message_loop()) : nullptr; 34 ctmf_task_runner_ = ctmf ? (ctmf->ipc_task_runner()) : nullptr;
35 } 35 }
36 36
37 // Invoked in child processes by the MemoryDumpManager. 37 // Invoked in child processes by the MemoryDumpManager.
38 void ChildMemoryDumpManagerDelegateImpl::RequestGlobalMemoryDump( 38 void ChildMemoryDumpManagerDelegateImpl::RequestGlobalMemoryDump(
39 const base::trace_event::MemoryDumpRequestArgs& args, 39 const base::trace_event::MemoryDumpRequestArgs& args,
40 const base::trace_event::MemoryDumpCallback& callback) { 40 const base::trace_event::MemoryDumpCallback& callback) {
41 // Bail out if we receive a dump request from the manager before the 41 // Bail out if we receive a dump request from the manager before the
42 // ChildTraceMessageFilter has been initialized. 42 // ChildTraceMessageFilter has been initialized.
43 if (!ctmf_task_runner_) { 43 if (!ctmf_task_runner_) {
44 if (!callback.is_null()) 44 if (!callback.is_null())
(...skipping 21 matching lines...) Expand all
66 66
67 // Send the request up to the browser process' MessageDumpmanager. 67 // Send the request up to the browser process' MessageDumpmanager.
68 ctmf_->SendGlobalMemoryDumpRequest(args, callback); 68 ctmf_->SendGlobalMemoryDumpRequest(args, callback);
69 } 69 }
70 70
71 bool ChildMemoryDumpManagerDelegateImpl::IsCoordinatorProcess() const { 71 bool ChildMemoryDumpManagerDelegateImpl::IsCoordinatorProcess() const {
72 return false; 72 return false;
73 } 73 }
74 74
75 } // namespace tracing 75 } // namespace tracing
OLDNEW
« no previous file with comments | « components/printing/test/print_mock_render_thread.cc ('k') | components/tracing/child_trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698