OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_CURVECP_RECEIVED_BLOCK_LIST_H_ | 4 #ifndef NET_CURVECP_RECEIVED_BLOCK_LIST_H_ |
5 #define NET_CURVECP_RECEIVED_BLOCK_LIST_H_ | 5 #define NET_CURVECP_RECEIVED_BLOCK_LIST_H_ |
6 #pragma once | 6 #pragma once |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 class DrainableIOBuffer; | 14 class DrainableIOBuffer; |
15 class IOBuffer; | 15 class IOBuffer; |
16 class IOBufferWithSize; | |
17 | 16 |
18 // A ReceivedBlockList manages everything needed to track a set of of incoming | 17 // A ReceivedBlockList manages everything needed to track a set of of incoming |
19 // blocks. It can coalesce continuous blocks and locate holes in the received | 18 // blocks. It can coalesce continuous blocks and locate holes in the received |
20 // data. | 19 // data. |
21 // Note: this list does not expect to receive overlapping blocks such as: | 20 // Note: this list does not expect to receive overlapping blocks such as: |
22 // Block 1: bytes 10-20 | 21 // Block 1: bytes 10-20 |
23 // Block 2: bytes 15-25 | 22 // Block 2: bytes 15-25 |
24 class ReceivedBlockList { | 23 class ReceivedBlockList { |
25 public: | 24 public: |
26 ReceivedBlockList(); | 25 ReceivedBlockList(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 int64 current_position_; | 60 int64 current_position_; |
62 int64 bytes_received_; | 61 int64 bytes_received_; |
63 BlockList list_; | 62 BlockList list_; |
64 | 63 |
65 DISALLOW_COPY_AND_ASSIGN(ReceivedBlockList); | 64 DISALLOW_COPY_AND_ASSIGN(ReceivedBlockList); |
66 }; | 65 }; |
67 | 66 |
68 } // namespace net | 67 } // namespace net |
69 | 68 |
70 #endif // NET_CURVECP_RECEIVED_BLOCK_LIST_H_ | 69 #endif // NET_CURVECP_RECEIVED_BLOCK_LIST_H_ |
OLD | NEW |