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

Side by Side Diff: base/trace_event/memory_dump_manager.cc

Issue 2061903002: Use ThreadTaskRunnerHandle instead of MessageLoop::current() in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR danakj Created 4 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 unified diff | Download patch
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/trace_event/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 MemoryDumpManager::ProcessMemoryDumpAsyncState::ProcessMemoryDumpAsyncState( 749 MemoryDumpManager::ProcessMemoryDumpAsyncState::ProcessMemoryDumpAsyncState(
750 MemoryDumpRequestArgs req_args, 750 MemoryDumpRequestArgs req_args,
751 const MemoryDumpProviderInfo::OrderedSet& dump_providers, 751 const MemoryDumpProviderInfo::OrderedSet& dump_providers,
752 scoped_refptr<MemoryDumpSessionState> session_state, 752 scoped_refptr<MemoryDumpSessionState> session_state,
753 MemoryDumpCallback callback, 753 MemoryDumpCallback callback,
754 scoped_refptr<SingleThreadTaskRunner> dump_thread_task_runner) 754 scoped_refptr<SingleThreadTaskRunner> dump_thread_task_runner)
755 : req_args(req_args), 755 : req_args(req_args),
756 session_state(std::move(session_state)), 756 session_state(std::move(session_state)),
757 callback(callback), 757 callback(callback),
758 dump_successful(true), 758 dump_successful(true),
759 callback_task_runner(MessageLoop::current()->task_runner()), 759 callback_task_runner(ThreadTaskRunnerHandle::Get()),
760 dump_thread_task_runner(std::move(dump_thread_task_runner)) { 760 dump_thread_task_runner(std::move(dump_thread_task_runner)) {
761 pending_dump_providers.reserve(dump_providers.size()); 761 pending_dump_providers.reserve(dump_providers.size());
762 pending_dump_providers.assign(dump_providers.rbegin(), dump_providers.rend()); 762 pending_dump_providers.assign(dump_providers.rbegin(), dump_providers.rend());
763 } 763 }
764 764
765 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() { 765 MemoryDumpManager::ProcessMemoryDumpAsyncState::~ProcessMemoryDumpAsyncState() {
766 } 766 }
767 767
768 ProcessMemoryDump* MemoryDumpManager::ProcessMemoryDumpAsyncState:: 768 ProcessMemoryDump* MemoryDumpManager::ProcessMemoryDumpAsyncState::
769 GetOrCreateMemoryDumpContainerForProcess(ProcessId pid, 769 GetOrCreateMemoryDumpContainerForProcess(ProcessId pid,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 if (heavy_dump_rate_ > 0 && periodic_dumps_count_ % heavy_dump_rate_ == 0) 836 if (heavy_dump_rate_ > 0 && periodic_dumps_count_ % heavy_dump_rate_ == 0)
837 level_of_detail = MemoryDumpLevelOfDetail::DETAILED; 837 level_of_detail = MemoryDumpLevelOfDetail::DETAILED;
838 ++periodic_dumps_count_; 838 ++periodic_dumps_count_;
839 839
840 MemoryDumpManager::GetInstance()->RequestGlobalDump( 840 MemoryDumpManager::GetInstance()->RequestGlobalDump(
841 MemoryDumpType::PERIODIC_INTERVAL, level_of_detail); 841 MemoryDumpType::PERIODIC_INTERVAL, level_of_detail);
842 } 842 }
843 843
844 } // namespace trace_event 844 } // namespace trace_event
845 } // namespace base 845 } // namespace base
OLDNEW
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698