1 // Copyright 2013 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "net/spdy/spdy_buffer_producer.h" 6 7 #include <utility> 8 9 #include "base/check.h" 10 #include "base/trace_event/memory_usage_estimator.h" 11 #include "net/spdy/spdy_buffer.h" 12 #include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h" 13 14 namespace net { 15 16 SpdyBufferProducer::SpdyBufferProducer() = default; 17 18 SpdyBufferProducer::~SpdyBufferProducer() = default; 19 SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer)20SimpleBufferProducer::SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer) 21 : buffer_(std::move(buffer)) {} 22 23 SimpleBufferProducer::~SimpleBufferProducer() = default; 24 ProduceBuffer()25std::unique_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() { 26 DCHECK(buffer_); 27 return std::move(buffer_); 28 } 29 30 } // namespace net 31