Index: base/trace_event/heap_profiler_allocation_context.cc |
diff --git a/base/trace_event/heap_profiler_allocation_context.cc b/base/trace_event/heap_profiler_allocation_context.cc |
index 374d5043d19e3bc74f44b88f7bcab45eff02c095..0f330a817ed6da977012ccb71afb975abaacc83f 100644 |
--- a/base/trace_event/heap_profiler_allocation_context.cc |
+++ b/base/trace_event/heap_profiler_allocation_context.cc |
@@ -31,12 +31,23 @@ bool operator==(const Backtrace& lhs, const Backtrace& rhs) { |
return std::equal(lhs.frames, lhs.frames + lhs.frame_count, rhs.frames); |
} |
+bool operator!=(const Backtrace& lhs, const Backtrace& rhs) { |
+ return !(lhs == rhs); |
+} |
+ |
AllocationContext::AllocationContext(): type_name(nullptr) {} |
+AllocationContext::AllocationContext(const Backtrace& backtrace, |
+ const char* type_name) |
+ : backtrace(backtrace), type_name(type_name) {} |
+ |
bool operator==(const AllocationContext& lhs, const AllocationContext& rhs) { |
return (lhs.backtrace == rhs.backtrace) && (lhs.type_name == rhs.type_name); |
} |
+bool operator!=(const AllocationContext& lhs, const AllocationContext& rhs) { |
+ return !(lhs == rhs); |
+} |
} // namespace trace_event |
} // namespace base |