| 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 "remoting/base/compound_buffer.h" |    5 #include "remoting/base/compound_buffer.h" | 
|    6  |    6  | 
|    7 #include <algorithm> |    7 #include <algorithm> | 
|    8 #include <functional> |    8 #include <functional> | 
|    9  |    9  | 
|   10 #include "base/logging.h" |   10 #include "base/logging.h" | 
|   11 #include "net/base/io_buffer.h" |   11 #include "net/base/io_buffer.h" | 
|   12  |   12  | 
|   13 namespace remoting { |   13 namespace remoting { | 
|   14  |   14  | 
|   15 CompoundBuffer::DataChunk::DataChunk( |   15 CompoundBuffer::DataChunk::DataChunk( | 
|   16     net::IOBuffer* buffer_value, const char* start_value, int size_value) |   16     net::IOBuffer* buffer_value, const char* start_value, int size_value) | 
|   17     : buffer(buffer_value), |   17     : buffer(buffer_value), | 
|   18       start(start_value), |   18       start(start_value), | 
|   19       size(size_value) { |   19       size(size_value) { | 
|   20 } |   20 } | 
|   21  |   21  | 
 |   22 CompoundBuffer::DataChunk::DataChunk(const DataChunk& other) = default; | 
 |   23  | 
|   22 CompoundBuffer::DataChunk::~DataChunk() {} |   24 CompoundBuffer::DataChunk::~DataChunk() {} | 
|   23  |   25  | 
|   24 CompoundBuffer::CompoundBuffer() |   26 CompoundBuffer::CompoundBuffer() | 
|   25     : total_bytes_(0), |   27     : total_bytes_(0), | 
|   26       locked_(false) { |   28       locked_(false) { | 
|   27 } |   29 } | 
|   28  |   30  | 
|   29 CompoundBuffer::~CompoundBuffer() { |   31 CompoundBuffer::~CompoundBuffer() { | 
|   30 } |   32 } | 
|   31  |   33  | 
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  270   } |  272   } | 
|  271  |  273  | 
|  272   return count == 0; |  274   return count == 0; | 
|  273 } |  275 } | 
|  274  |  276  | 
|  275 int64_t CompoundBufferInputStream::ByteCount() const { |  277 int64_t CompoundBufferInputStream::ByteCount() const { | 
|  276   return position_; |  278   return position_; | 
|  277 } |  279 } | 
|  278  |  280  | 
|  279 }  // namespace remoting |  281 }  // namespace remoting | 
| OLD | NEW |