blob: f7120c8125ece3f7737d77c235f38890d8cb6a51 [file] [log] [blame]
[email protected]a1640052009-10-29 21:24:021// 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]dab9c7d2010-02-06 21:44:325#include "net/spdy/spdy_io_buffer.h"
6#include "net/spdy/spdy_stream.h"
[email protected]a1640052009-10-29 21:24:027
8namespace net {
9
10// static
[email protected]955fc2e72010-02-08 20:37:3011uint64 SpdyIOBuffer::order_ = 0;
[email protected]a1640052009-10-29 21:24:0212
[email protected]955fc2e72010-02-08 20:37:3013SpdyIOBuffer::SpdyIOBuffer(
14 IOBuffer* buffer, int size, int priority, SpdyStream* stream)
[email protected]bf2491a92009-11-29 16:39:4815 : buffer_(new DrainableIOBuffer(buffer, size)),
[email protected]a677f2b2009-11-22 00:43:0016 priority_(priority),
17 position_(++order_),
18 stream_(stream) {}
[email protected]a1640052009-10-29 21:24:0219
[email protected]955fc2e72010-02-08 20:37:3020SpdyIOBuffer::SpdyIOBuffer() : priority_(0), position_(0), stream_(NULL) {}
[email protected]a677f2b2009-11-22 00:43:0021
[email protected]955fc2e72010-02-08 20:37:3022SpdyIOBuffer::~SpdyIOBuffer() {}
[email protected]a677f2b2009-11-22 00:43:0023
[email protected]955fc2e72010-02-08 20:37:3024void SpdyIOBuffer::release() {
[email protected]9f7c4fd2009-11-24 18:50:1525 buffer_ = NULL;
26 stream_ = NULL;
27}
28
[email protected]a677f2b2009-11-22 00:43:0029} // namespace net