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
5 #include "net/spdy/spdy_io_buffer.h"
6 #include "net/spdy/spdy_stream.h"
7
8 namespace net {
9
10 // static
11 uint64 SpdyIOBuffer::order_ = 0;
12
SpdyIOBuffer(IOBuffer * buffer,int size,int priority,SpdyStream * stream)13 SpdyIOBuffer::SpdyIOBuffer(
14 IOBuffer* buffer, int size, int priority, SpdyStream* stream)
15 : buffer_(new DrainableIOBuffer(buffer, size)),
16 priority_(priority),
17 position_(++order_),
18 stream_(stream) {}
19
SpdyIOBuffer()20 SpdyIOBuffer::SpdyIOBuffer() : priority_(0), position_(0), stream_(NULL) {}
21
~SpdyIOBuffer()22 SpdyIOBuffer::~SpdyIOBuffer() {}
23
release()24 void SpdyIOBuffer::release() {
25 buffer_ = NULL;
26 stream_ = NULL;
27 }
28
29 } // namespace net
30