OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_read_queue.h" | 5 #include "net/spdy/chromium/spdy_read_queue.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "net/spdy/spdy_buffer.h" | 11 #include "net/spdy/chromium/spdy_buffer.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 SpdyReadQueue::SpdyReadQueue() : total_size_(0) {} | 15 SpdyReadQueue::SpdyReadQueue() : total_size_(0) {} |
16 | 16 |
17 SpdyReadQueue::~SpdyReadQueue() { | 17 SpdyReadQueue::~SpdyReadQueue() { |
18 Clear(); | 18 Clear(); |
19 } | 19 } |
20 | 20 |
21 bool SpdyReadQueue::IsEmpty() const { | 21 bool SpdyReadQueue::IsEmpty() const { |
(...skipping 28 matching lines...) Expand all Loading... |
50 total_size_ -= bytes_copied; | 50 total_size_ -= bytes_copied; |
51 return bytes_copied; | 51 return bytes_copied; |
52 } | 52 } |
53 | 53 |
54 void SpdyReadQueue::Clear() { | 54 void SpdyReadQueue::Clear() { |
55 queue_.clear(); | 55 queue_.clear(); |
56 total_size_ = 0; | 56 total_size_ = 0; |
57 } | 57 } |
58 | 58 |
59 } // namespace net | 59 } // namespace net |
OLD | NEW |