OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/common/host_discardable_shared_memory_manager.h" | 5 #include "content/common/host_discardable_shared_memory_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" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/debug/crash_logging.h" | 13 #include "base/debug/crash_logging.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/discardable_memory.h" | 16 #include "base/memory/discardable_memory.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
18 #include "base/numerics/safe_math.h" | 18 #include "base/numerics/safe_math.h" |
19 #include "base/process/memory.h" | 19 #include "base/process/memory.h" |
20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "base/sys_info.h" | 22 #include "base/sys_info.h" |
23 #include "base/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
24 #include "base/trace_event/memory_allocator_dump.h" | 24 #include "base/trace_event/memory_allocator_dump.h" |
25 #include "base/trace_event/memory_dump_manager.h" | 25 #include "base/trace_event/memory_dump_manager.h" |
26 #include "base/trace_event/process_memory_dump.h" | 26 #include "base/trace_event/process_memory_dump.h" |
27 #include "base/trace_event/trace_event.h" | 27 #include "base/trace_event/trace_event.h" |
28 #include "build/build_config.h" | 28 #include "build/build_config.h" |
29 #include "content/common/child_process_host_impl.h" | 29 #include "content/common/child_process_host_impl.h" |
30 #include "content/common/discardable_shared_memory_heap.h" | 30 #include "content/common/discardable_shared_memory_heap.h" |
31 #include "content/public/common/child_process_host.h" | 31 #include "content/public/common/child_process_host.h" |
32 | 32 |
33 #if defined(OS_LINUX) | 33 #if defined(OS_LINUX) |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 return; | 540 return; |
541 | 541 |
542 enforce_memory_policy_pending_ = true; | 542 enforce_memory_policy_pending_ = true; |
543 DCHECK(enforce_memory_policy_task_runner_); | 543 DCHECK(enforce_memory_policy_task_runner_); |
544 enforce_memory_policy_task_runner_->PostDelayedTask( | 544 enforce_memory_policy_task_runner_->PostDelayedTask( |
545 FROM_HERE, enforce_memory_policy_callback_, | 545 FROM_HERE, enforce_memory_policy_callback_, |
546 base::TimeDelta::FromMilliseconds(kEnforceMemoryPolicyDelayMs)); | 546 base::TimeDelta::FromMilliseconds(kEnforceMemoryPolicyDelayMs)); |
547 } | 547 } |
548 | 548 |
549 } // namespace content | 549 } // namespace content |
OLD | NEW |