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

Unified Diff: net/quic/core/quic_protocol.h

Issue 2509033004: Move QuicBufferAllocator into its own .cc/.h. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_buffer_allocator.cc ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_protocol.h
diff --git a/net/quic/core/quic_protocol.h b/net/quic/core/quic_protocol.h
index 7d88cad679e162dff818b651a5a77b6b9fa60365..3b7e68d4698ee41b7bf9e7e659c7a6171b469c7c 100644
--- a/net/quic/core/quic_protocol.h
+++ b/net/quic/core/quic_protocol.h
@@ -29,6 +29,7 @@
#include "net/base/net_export.h"
#include "net/quic/core/interval_set.h"
#include "net/quic/core/quic_bandwidth.h"
+#include "net/quic/core/quic_buffer_allocator.h"
#include "net/quic/core/quic_constants.h"
#include "net/quic/core/quic_time.h"
#include "net/quic/core/quic_types.h"
@@ -563,26 +564,6 @@ struct NET_EXPORT_PRIVATE QuicPingFrame {};
// frame.
struct NET_EXPORT_PRIVATE QuicMtuDiscoveryFrame {};
-class NET_EXPORT_PRIVATE QuicBufferAllocator {
- public:
- virtual ~QuicBufferAllocator();
-
- // Returns or allocates a new buffer of |size|. Never returns null.
- virtual char* New(size_t size) = 0;
-
- // Returns or allocates a new buffer of |size| if |flag_enable| is true.
- // Otherwise, returns a buffer that is compatible with this class directly
- // with operator new. Never returns null.
- virtual char* New(size_t size, bool flag_enable) = 0;
-
- // Releases a buffer.
- virtual void Delete(char* buffer) = 0;
-
- // Marks the allocator as being idle. Serves as a hint to notify the allocator
- // that it should release any resources it's still holding on to.
- virtual void MarkAllocatorIdle() {}
-};
-
// Deleter for stream buffers. Copyable to support platforms where the deleter
// of a unique_ptr must be copyable. Otherwise it would be nice for this to be
// move-only.
« no previous file with comments | « net/quic/core/quic_buffer_allocator.cc ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698