spdy_buffer_producer.cc 854 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2013 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. #include "net/spdy/spdy_buffer_producer.h"
  5. #include <utility>
  6. #include "base/check.h"
  7. #include "base/trace_event/memory_usage_estimator.h"
  8. #include "net/spdy/spdy_buffer.h"
  9. #include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
  10. namespace net {
  11. SpdyBufferProducer::SpdyBufferProducer() = default;
  12. SpdyBufferProducer::~SpdyBufferProducer() = default;
  13. SimpleBufferProducer::SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer)
  14. : buffer_(std::move(buffer)) {}
  15. SimpleBufferProducer::~SimpleBufferProducer() = default;
  16. std::unique_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() {
  17. DCHECK(buffer_);
  18. return std::move(buffer_);
  19. }
  20. } // namespace net