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

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

Issue 10815074: Instead of enqueueing SPDY frames, enqueue SPDY streams that are ready to produce data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove logging and cleanup Created 8 years, 5 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_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_io_buffer.h" 5 #include "net/spdy/spdy_io_buffer.h"
6 #include "net/spdy/spdy_stream.h" 6 #include "net/spdy/spdy_stream.h"
7 7
8 namespace net { 8 namespace net {
9 9
10 // static 10 // static
11 uint64 SpdyIOBuffer::order_ = 0; 11 uint64 SpdyIOBuffer::order_ = 0;
12 12
13 SpdyIOBuffer::SpdyIOBuffer( 13 SpdyIOBuffer::SpdyIOBuffer(
14 IOBuffer* buffer, int size, RequestPriority priority, SpdyStream* stream) 14 IOBuffer* buffer, int size, RequestPriority priority, SpdyStream* stream)
15 : buffer_(new DrainableIOBuffer(buffer, size)), 15 : buffer_(new DrainableIOBuffer(buffer, size)),
16 priority_(priority), 16 priority_(priority),
17 position_(++order_), 17 position_(++order_),
18 stream_(stream) {} 18 stream_(stream) {}
19 19
20 SpdyIOBuffer::SpdyIOBuffer() : priority_(HIGHEST), position_(0), stream_(NULL) { 20 SpdyIOBuffer::SpdyIOBuffer() : priority_(HIGHEST), position_(0), stream_(NULL) {
21 } 21 }
22 22
23 SpdyIOBuffer::SpdyIOBuffer(const SpdyIOBuffer& rhs) {
24 buffer_ = rhs.buffer_;
25 priority_ = rhs.priority_;
26 position_ = rhs.position_;
27 stream_ = rhs.stream_;
28 }
29
23 SpdyIOBuffer::~SpdyIOBuffer() {} 30 SpdyIOBuffer::~SpdyIOBuffer() {}
24 31
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;
38 }
39
25 void SpdyIOBuffer::release() { 40 void SpdyIOBuffer::release() {
26 buffer_ = NULL; 41 buffer_ = NULL;
27 stream_ = NULL; 42 stream_ = NULL;
28 } 43 }
29 44
30 } // namespace net 45 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_io_buffer.h ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698