OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/spdy/spdy_buffer_producer.h" | 5 #include "net/spdy/chromium/spdy_buffer_producer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/spdy/chromium/spdy_buffer.h" |
| 11 #include "net/spdy/core/spdy_protocol.h" |
10 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" | 12 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" |
11 #include "net/spdy/spdy_buffer.h" | |
12 #include "net/spdy/spdy_protocol.h" | |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 SpdyBufferProducer::SpdyBufferProducer() {} | 16 SpdyBufferProducer::SpdyBufferProducer() {} |
17 | 17 |
18 SpdyBufferProducer::~SpdyBufferProducer() {} | 18 SpdyBufferProducer::~SpdyBufferProducer() {} |
19 | 19 |
20 SimpleBufferProducer::SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer) | 20 SimpleBufferProducer::SimpleBufferProducer(std::unique_ptr<SpdyBuffer> buffer) |
21 : buffer_(std::move(buffer)) {} | 21 : buffer_(std::move(buffer)) {} |
22 | 22 |
23 SimpleBufferProducer::~SimpleBufferProducer() {} | 23 SimpleBufferProducer::~SimpleBufferProducer() {} |
24 | 24 |
25 std::unique_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() { | 25 std::unique_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() { |
26 DCHECK(buffer_); | 26 DCHECK(buffer_); |
27 return std::move(buffer_); | 27 return std::move(buffer_); |
28 } | 28 } |
29 | 29 |
30 size_t SimpleBufferProducer::EstimateMemoryUsage() const { | 30 size_t SimpleBufferProducer::EstimateMemoryUsage() const { |
31 return SpdyEstimateMemoryUsage(buffer_); | 31 return SpdyEstimateMemoryUsage(buffer_); |
32 } | 32 } |
33 | 33 |
34 } // namespace net | 34 } // namespace net |
OLD | NEW |