OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <functional> | 5 #include <functional> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
9 #include "remoting/base/compound_buffer.h" | 9 #include "remoting/base/compound_buffer.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 CompoundBuffer::DataChunk::DataChunk( | 13 CompoundBuffer::DataChunk::DataChunk( |
14 net::IOBuffer* buffer_value, const char* start_value, int size_value) | 14 net::IOBuffer* buffer_value, const char* start_value, int size_value) |
15 : buffer(buffer_value), | 15 : buffer(buffer_value), |
16 start(start_value), | 16 start(start_value), |
17 size(size_value) { | 17 size(size_value) { |
18 } | 18 } |
19 | 19 |
| 20 CompoundBuffer::DataChunk::~DataChunk() {} |
| 21 |
20 CompoundBuffer::CompoundBuffer() | 22 CompoundBuffer::CompoundBuffer() |
21 : total_bytes_(0), | 23 : total_bytes_(0), |
22 locked_(false) { | 24 locked_(false) { |
23 } | 25 } |
24 | 26 |
25 CompoundBuffer::~CompoundBuffer() { | 27 CompoundBuffer::~CompoundBuffer() { |
26 } | 28 } |
27 | 29 |
28 void CompoundBuffer::Clear() { | 30 void CompoundBuffer::Clear() { |
29 CHECK(!locked_); | 31 CHECK(!locked_); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 268 } |
267 | 269 |
268 return count == 0; | 270 return count == 0; |
269 } | 271 } |
270 | 272 |
271 int64 CompoundBufferInputStream::ByteCount() const { | 273 int64 CompoundBufferInputStream::ByteCount() const { |
272 return position_; | 274 return position_; |
273 } | 275 } |
274 | 276 |
275 } // namespace remoting | 277 } // namespace remoting |
OLD | NEW |