| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_PROFILING_MEMLOG_RECEIVER_H_ |
| 6 #define CHROME_PROFILING_MEMLOG_RECEIVER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/common/profiling/memlog_stream.h" |
| 10 #include "chrome/profiling/address.h" |
| 11 #include "chrome/profiling/stack.h" |
| 12 |
| 13 namespace profiling { |
| 14 |
| 15 class Stack; |
| 16 |
| 17 // A log receiver is a sink for parsed allocation events. See also |
| 18 // MemlogStreamReceiver which is for the unparsed data blocks. |
| 19 class MemlogReceiver { |
| 20 public: |
| 21 MemlogReceiver() {} |
| 22 virtual ~MemlogReceiver() {} |
| 23 |
| 24 virtual void OnHeader(const StreamHeader& header) = 0; |
| 25 virtual void OnAlloc(const AllocPacket& alloc_packet, Stack&& stack) = 0; |
| 26 virtual void OnFree(const FreePacket& free_packet) = 0; |
| 27 virtual void OnComplete() = 0; |
| 28 }; |
| 29 |
| 30 } // namespace profiling |
| 31 |
| 32 #endif // CHROME_PROFILING_MEMLOG_RECEIVER_H_ |
| OLD | NEW |