Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1416)

Side by Side Diff: chrome/profiling/memlog_stream_receiver.h

Issue 2940003002: Add pipe implementation for OOP memory logging (Closed)
Patch Set: Comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/profiling/memlog_receiver_pipe_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_STREAM_RECEIVER_H_
6 #define CHROME_PROFILING_MEMLOG_STREAM_RECEIVER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12
13 namespace profiling {
14
15 // A stream receiver is a sink for unparsed bytes. See also LogReceiver.
16 class MemlogStreamReceiver
17 : public base::RefCountedThreadSafe<MemlogStreamReceiver> {
18 public:
19 MemlogStreamReceiver() {}
20 virtual ~MemlogStreamReceiver() {}
21
22 // Returns true on success, false on unrecoverable error (in which case no
23 // more blocks will be sent). May take a ref to the block, so the caller
24 // should not modify it later.
25 virtual void OnStreamData(std::unique_ptr<char[]> data, size_t sz) = 0;
26
27 virtual void OnStreamComplete() = 0;
28 };
29
30 } // namespace profiling
31
32 #endif // CHROME_PROFILING_MEMLOG_STREAM_RECEIVER_H_
OLDNEW
« no previous file with comments | « chrome/profiling/memlog_receiver_pipe_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698