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/spdy_buffer_producer.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "net/spdy/spdy_buffer.h" | 10 #include "net/spdy/spdy_buffer.h" |
9 #include "net/spdy/spdy_protocol.h" | 11 #include "net/spdy/spdy_protocol.h" |
10 | 12 |
11 namespace net { | 13 namespace net { |
12 | 14 |
13 SpdyBufferProducer::SpdyBufferProducer() {} | 15 SpdyBufferProducer::SpdyBufferProducer() {} |
14 | 16 |
15 SpdyBufferProducer::~SpdyBufferProducer() {} | 17 SpdyBufferProducer::~SpdyBufferProducer() {} |
16 | 18 |
17 SimpleBufferProducer::SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer) | 19 SimpleBufferProducer::SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer) |
18 : buffer_(buffer.Pass()) {} | 20 : buffer_(std::move(buffer)) {} |
19 | 21 |
20 SimpleBufferProducer::~SimpleBufferProducer() {} | 22 SimpleBufferProducer::~SimpleBufferProducer() {} |
21 | 23 |
22 scoped_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() { | 24 scoped_ptr<SpdyBuffer> SimpleBufferProducer::ProduceBuffer() { |
23 DCHECK(buffer_); | 25 DCHECK(buffer_); |
24 return buffer_.Pass(); | 26 return std::move(buffer_); |
25 } | 27 } |
26 | 28 |
27 } // namespace net | 29 } // namespace net |
OLD | NEW |