| OLD | NEW |
| 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/html_viewer/discardable_memory_allocator.h" | 5 #include "components/html_viewer/discardable_memory_allocator.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 9 #include "base/macros.h" |
| 7 #include "base/memory/discardable_memory.h" | 10 #include "base/memory/discardable_memory.h" |
| 8 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 9 #include "base/trace_event/memory_allocator_dump.h" | 12 #include "base/trace_event/memory_allocator_dump.h" |
| 10 #include "base/trace_event/memory_dump_manager.h" | 13 #include "base/trace_event/memory_dump_manager.h" |
| 11 #include "base/trace_event/process_memory_dump.h" | 14 #include "base/trace_event/process_memory_dump.h" |
| 12 | 15 |
| 13 namespace html_viewer { | 16 namespace html_viewer { |
| 14 | 17 |
| 15 // Interface to the rest of the program. These objects are owned outside of the | 18 // Interface to the rest of the program. These objects are owned outside of the |
| 16 // allocator. | 19 // allocator. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 live_unlocked_chunks_.erase(it); | 144 live_unlocked_chunks_.erase(it); |
| 142 } | 145 } |
| 143 | 146 |
| 144 void DiscardableMemoryAllocator::NotifyDestructed( | 147 void DiscardableMemoryAllocator::NotifyDestructed( |
| 145 std::list<DiscardableMemoryChunkImpl*>::iterator it) { | 148 std::list<DiscardableMemoryChunkImpl*>::iterator it) { |
| 146 lock_.AssertAcquired(); | 149 lock_.AssertAcquired(); |
| 147 live_unlocked_chunks_.erase(it); | 150 live_unlocked_chunks_.erase(it); |
| 148 } | 151 } |
| 149 | 152 |
| 150 } // namespace html_viewer | 153 } // namespace html_viewer |
| OLD | NEW |