[email protected] | a164005 | 2009-10-29 21:24:02 | [diff] [blame] | 1 | // Copyright (c) 2009 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 | |||||
[email protected] | dab9c7d | 2010-02-06 21:44:32 | [diff] [blame] | 5 | #include "net/spdy/spdy_io_buffer.h" |
6 | #include "net/spdy/spdy_stream.h" | ||||
[email protected] | a164005 | 2009-10-29 21:24:02 | [diff] [blame] | 7 | |
8 | namespace net { | ||||
9 | |||||
10 | // static | ||||
[email protected] | 955fc2e7 | 2010-02-08 20:37:30 | [diff] [blame] | 11 | uint64 SpdyIOBuffer::order_ = 0; |
[email protected] | a164005 | 2009-10-29 21:24:02 | [diff] [blame] | 12 | |
[email protected] | 955fc2e7 | 2010-02-08 20:37:30 | [diff] [blame] | 13 | SpdyIOBuffer::SpdyIOBuffer( |
14 | IOBuffer* buffer, int size, int priority, SpdyStream* stream) | ||||
[email protected] | bf2491a9 | 2009-11-29 16:39:48 | [diff] [blame] | 15 | : buffer_(new DrainableIOBuffer(buffer, size)), |
[email protected] | a677f2b | 2009-11-22 00:43:00 | [diff] [blame] | 16 | priority_(priority), |
17 | position_(++order_), | ||||
18 | stream_(stream) {} | ||||
[email protected] | a164005 | 2009-10-29 21:24:02 | [diff] [blame] | 19 | |
[email protected] | 955fc2e7 | 2010-02-08 20:37:30 | [diff] [blame] | 20 | SpdyIOBuffer::SpdyIOBuffer() : priority_(0), position_(0), stream_(NULL) {} |
[email protected] | a677f2b | 2009-11-22 00:43:00 | [diff] [blame] | 21 | |
[email protected] | 955fc2e7 | 2010-02-08 20:37:30 | [diff] [blame] | 22 | SpdyIOBuffer::~SpdyIOBuffer() {} |
[email protected] | a677f2b | 2009-11-22 00:43:00 | [diff] [blame] | 23 | |
[email protected] | 955fc2e7 | 2010-02-08 20:37:30 | [diff] [blame] | 24 | void SpdyIOBuffer::release() { |
[email protected] | 9f7c4fd | 2009-11-24 18:50:15 | [diff] [blame] | 25 | buffer_ = NULL; |
26 | stream_ = NULL; | ||||
27 | } | ||||
28 | |||||
[email protected] | a677f2b | 2009-11-22 00:43:00 | [diff] [blame] | 29 | } // namespace net |