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 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ | 5 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ |
6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ | 6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 21 matching lines...) Expand all Loading... |
32 bool empty() const { return guid_ == 0u; } | 32 bool empty() const { return guid_ == 0u; } |
33 | 33 |
34 bool operator==(const MemoryAllocatorDumpGuid& other) const { | 34 bool operator==(const MemoryAllocatorDumpGuid& other) const { |
35 return guid_ == other.guid_; | 35 return guid_ == other.guid_; |
36 } | 36 } |
37 | 37 |
38 bool operator!=(const MemoryAllocatorDumpGuid& other) const { | 38 bool operator!=(const MemoryAllocatorDumpGuid& other) const { |
39 return !(*this == other); | 39 return !(*this == other); |
40 } | 40 } |
41 | 41 |
| 42 bool operator<(const MemoryAllocatorDumpGuid& other) const { |
| 43 return guid_ < other.guid_; |
| 44 } |
| 45 |
42 private: | 46 private: |
43 uint64_t guid_; | 47 uint64_t guid_; |
44 | 48 |
45 // Deliberately copy-able. | 49 // Deliberately copy-able. |
46 }; | 50 }; |
47 | 51 |
48 } // namespace trace_event | 52 } // namespace trace_event |
49 } // namespace base | 53 } // namespace base |
50 | 54 |
51 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ | 55 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_GUID_H_ |
OLD | NEW |