Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: net/spdy/spdy_io_buffer.cc

Issue 13990005: [SPDY] Replace SpdyIOBuffer with new SpdyBuffer class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_io_buffer.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "net/spdy/spdy_io_buffer.h"
6 #include "net/spdy/spdy_stream.h"
7
8 namespace net {
9
10 SpdyIOBuffer::SpdyIOBuffer() {}
11
12 SpdyIOBuffer::SpdyIOBuffer(IOBuffer* buffer, int size, SpdyStream* stream)
13 : buffer_(new DrainableIOBuffer(buffer, size)), stream_(stream) {}
14
15 SpdyIOBuffer::SpdyIOBuffer(const SpdyIOBuffer& rhs) {
16 buffer_ = rhs.buffer_;
17 stream_ = rhs.stream_;
18 }
19
20 SpdyIOBuffer::~SpdyIOBuffer() {}
21
22 SpdyIOBuffer& SpdyIOBuffer::operator=(const SpdyIOBuffer& rhs) {
23 buffer_ = rhs.buffer_;
24 stream_ = rhs.stream_;
25 return *this;
26 }
27
28 void SpdyIOBuffer::Swap(SpdyIOBuffer* other) {
29 buffer_.swap(other->buffer_);
30 stream_.swap(other->stream_);
31 }
32
33 void SpdyIOBuffer::Release() {
34 buffer_ = NULL;
35 stream_ = NULL;
36 }
37
38 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_io_buffer.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698