OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "services/resource_coordinator/memory/coordinator/coordinator_impl.h" | 5 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
14 #include "base/trace_event/memory_dump_manager.h" | 14 #include "base/trace_event/memory_dump_manager.h" |
15 #include "base/trace_event/memory_dump_request_args.h" | 15 #include "base/trace_event/memory_dump_request_args.h" |
16 #include "services/resource_coordinator/public/cpp/memory/process_local_dump_man
ager_impl.h" | 16 #include "services/resource_coordinator/public/cpp/memory/process_local_dump_man
ager_impl.h" |
17 #include "services/resource_coordinator/public/interfaces/memory/constants.mojom
.h" | 17 #include "services/resource_coordinator/public/interfaces/memory/memory_constant
s.mojom.h" |
18 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume
ntation.mojom.h" | 18 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume
ntation.mojom.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 memory_instrumentation::CoordinatorImpl* g_coordinator_impl; | 22 memory_instrumentation::CoordinatorImpl* g_coordinator_impl; |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 namespace memory_instrumentation { | 26 namespace memory_instrumentation { |
27 | 27 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Schedule the next queued dump (if applicable). | 185 // Schedule the next queued dump (if applicable). |
186 if (!queued_memory_dump_requests_.empty()) { | 186 if (!queued_memory_dump_requests_.empty()) { |
187 base::ThreadTaskRunnerHandle::Get()->PostTask( | 187 base::ThreadTaskRunnerHandle::Get()->PostTask( |
188 FROM_HERE, | 188 FROM_HERE, |
189 base::Bind(&CoordinatorImpl::PerformNextQueuedGlobalMemoryDump, | 189 base::Bind(&CoordinatorImpl::PerformNextQueuedGlobalMemoryDump, |
190 base::Unretained(this))); | 190 base::Unretained(this))); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 } // namespace memory_instrumentation | 194 } // namespace memory_instrumentation |
OLD | NEW |