NaCl: disable TLS check on IRT nexe
[chromium-blink-merge.git] / net / spdy / spdy_io_buffer.cc
blobf0c14b12f6aad8852d194cf8dec673937e60eb3b
1 // Copyright (c) 2012 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.
5 #include "net/spdy/spdy_io_buffer.h"
6 #include "net/spdy/spdy_stream.h"
8 namespace net {
10 // static
11 uint64 SpdyIOBuffer::order_ = 0;
13 SpdyIOBuffer::SpdyIOBuffer(
14 IOBuffer* buffer, int size, RequestPriority priority, SpdyStream* stream)
15 : buffer_(new DrainableIOBuffer(buffer, size)),
16 priority_(priority),
17 position_(++order_),
18 stream_(stream) {}
20 SpdyIOBuffer::SpdyIOBuffer() : priority_(HIGHEST), position_(0), stream_(NULL) {
23 SpdyIOBuffer::SpdyIOBuffer(const SpdyIOBuffer& rhs) {
24 buffer_ = rhs.buffer_;
25 priority_ = rhs.priority_;
26 position_ = rhs.position_;
27 stream_ = rhs.stream_;
30 SpdyIOBuffer::~SpdyIOBuffer() {}
32 SpdyIOBuffer& SpdyIOBuffer::operator=(const SpdyIOBuffer& rhs) {
33 buffer_ = rhs.buffer_;
34 priority_ = rhs.priority_;
35 position_ = rhs.position_;
36 stream_ = rhs.stream_;
37 return *this;
40 void SpdyIOBuffer::release() {
41 buffer_ = NULL;
42 stream_ = NULL;
45 } // namespace net