Chromium Code Reviews| Index: chrome/profiling/memlog_receiver.h |
| diff --git a/chrome/profiling/memlog_receiver.h b/chrome/profiling/memlog_receiver.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f5adf43f859a97ff94608d39f7f44305abaca36 |
| --- /dev/null |
| +++ b/chrome/profiling/memlog_receiver.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_PROFILING_MEMLOG_RECEIVER_H_ |
| +#define CHROME_PROFILING_MEMLOG_RECEIVER_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "chrome/common/profiling/memlog_stream.h" |
| +#include "chrome/profiling/address.h" |
| +#include "chrome/profiling/stack.h" |
| + |
| +namespace profiling { |
| + |
| +class Stack; |
| + |
| +// A log receiver is a sink for parsed allocation events. See also |
| +// MemlogStreamReceiver which is for the unparsed data blocks. |
| +class MemlogReceiver { |
| + public: |
| + MemlogReceiver() {} |
|
awong
2017/06/19 20:00:13
Why do we need to declare the default constructor?
brettw
2017/06/19 23:29:45
Because of mistake.
brettw
2017/06/19 23:33:45
Sorry, forgot to update after our conversation. I
|
| + virtual ~MemlogReceiver() {} |
| + |
| + virtual void OnHeader(const StreamHeader& header) = 0; |
| + virtual void OnAlloc(const AllocPacket& alloc_packet, Stack&& stack) = 0; |
| + virtual void OnFree(const FreePacket& free_packet) = 0; |
| + virtual void OnComplete() = 0; |
| +}; |
| + |
| +} // namespace profiling |
| + |
| +#endif // CHROME_PROFILING_MEMLOG_RECEIVER_H_ |