| 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 #ifndef BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ | 5 #ifndef BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ |
| 6 #define BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ | 6 #define BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ |
| 7 | 7 |
| 8 #include <unordered_map> |
| 9 |
| 8 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| 9 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 10 #include "base/trace_event/memory_dump_provider.h" | 12 #include "base/trace_event/memory_dump_provider.h" |
| 11 | 13 |
| 12 namespace base { | 14 namespace base { |
| 13 | 15 |
| 14 namespace trace_event { | 16 namespace trace_event { |
| 15 class ProcessMemoryDump; | 17 class ProcessMemoryDump; |
| 16 } | 18 } |
| 17 | 19 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 47 // Used to lock when |usages_| is modified or read. | 49 // Used to lock when |usages_| is modified or read. |
| 48 Lock usages_lock_; | 50 Lock usages_lock_; |
| 49 std::unordered_map<const SharedMemory*, Usage> usages_; | 51 std::unordered_map<const SharedMemory*, Usage> usages_; |
| 50 | 52 |
| 51 DISALLOW_COPY_AND_ASSIGN(SharedMemoryTracker); | 53 DISALLOW_COPY_AND_ASSIGN(SharedMemoryTracker); |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace base | 56 } // namespace base |
| 55 | 57 |
| 56 #endif // BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ | 58 #endif // BASE_MEMORY_SHARED_MEMORY_TRACKER_H_ |
| OLD | NEW |