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

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

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 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 "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/tracing/child_trace_message_filter.h" 9 #include "components/tracing/child_trace_message_filter.h"
10 #include "components/tracing/process_metrics_memory_dump_provider.h" 10 #include "components/tracing/process_metrics_memory_dump_provider.h"
(...skipping 22 matching lines...) Expand all
33 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId) { 33 base::trace_event::MemoryDumpManager::kInvalidTracingProcessId) {
34 } 34 }
35 35
36 ChildMemoryDumpManagerDelegateImpl::~ChildMemoryDumpManagerDelegateImpl() {} 36 ChildMemoryDumpManagerDelegateImpl::~ChildMemoryDumpManagerDelegateImpl() {}
37 37
38 void ChildMemoryDumpManagerDelegateImpl::SetChildTraceMessageFilter( 38 void ChildMemoryDumpManagerDelegateImpl::SetChildTraceMessageFilter(
39 ChildTraceMessageFilter* ctmf) { 39 ChildTraceMessageFilter* ctmf) {
40 const auto& task_runner = ctmf ? (ctmf->ipc_task_runner()) : nullptr; 40 const auto& task_runner = ctmf ? (ctmf->ipc_task_runner()) : nullptr;
41 // Check that we are either registering the CTMF or tearing it down, but not 41 // Check that we are either registering the CTMF or tearing it down, but not
42 // replacing a valid instance with another one (should never happen). 42 // replacing a valid instance with another one (should never happen).
43 DCHECK(ctmf_ == nullptr || (ctmf == nullptr && ctmf_task_runner_ != nullptr)); 43 DCHECK(!ctmf_ || (!ctmf && ctmf_task_runner_));
44 ctmf_ = ctmf; 44 ctmf_ = ctmf;
45 45
46 { 46 {
47 base::AutoLock lock(lock_); 47 base::AutoLock lock(lock_);
48 ctmf_task_runner_ = task_runner; 48 ctmf_task_runner_ = task_runner;
49 } 49 }
50 50
51 if (ctmf) { 51 if (ctmf) {
52 base::trace_event::MemoryDumpManager::GetInstance()->Initialize( 52 base::trace_event::MemoryDumpManager::GetInstance()->Initialize(
53 this /* delegate */, false /* is_coordinator */); 53 this /* delegate */, false /* is_coordinator */);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Send the request up to the browser process' MessageDumpmanager. 98 // Send the request up to the browser process' MessageDumpmanager.
99 ctmf_->SendGlobalMemoryDumpRequest(args, callback); 99 ctmf_->SendGlobalMemoryDumpRequest(args, callback);
100 } 100 }
101 101
102 uint64_t ChildMemoryDumpManagerDelegateImpl::GetTracingProcessId() const { 102 uint64_t ChildMemoryDumpManagerDelegateImpl::GetTracingProcessId() const {
103 return tracing_process_id_; 103 return tracing_process_id_;
104 } 104 }
105 105
106 } // namespace tracing 106 } // namespace tracing
OLDNEW
« no previous file with comments | « components/suggestions/image_manager_unittest.cc ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698