| 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/protocol_decoder.h" | 5 #include "remoting/base/protocol_decoder.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "remoting/base/multiple_array_input_stream.h" | 8 #include "remoting/base/multiple_array_input_stream.h" |
| 8 #include "talk/base/byteorder.h" | 9 #include "talk/base/byteorder.h" |
| 9 | 10 |
| 10 namespace remoting { | 11 namespace remoting { |
| 11 | 12 |
| 12 ProtocolDecoder::ProtocolDecoder() | 13 ProtocolDecoder::ProtocolDecoder() |
| 13 : last_read_position_(0), | 14 : last_read_position_(0), |
| 14 available_bytes_(0), | 15 available_bytes_(0), |
| 15 next_payload_(0), | 16 next_payload_(0), |
| 16 next_payload_known_(false) { | 17 next_payload_known_(false) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 140 |
| 140 if (header.length() == kHeaderSize) { | 141 if (header.length() == kHeaderSize) { |
| 141 *size = talk_base::GetBE32(header.c_str()); | 142 *size = talk_base::GetBE32(header.c_str()); |
| 142 return true; | 143 return true; |
| 143 } | 144 } |
| 144 NOTREACHED() << "Unable to extract payload size"; | 145 NOTREACHED() << "Unable to extract payload size"; |
| 145 return false; | 146 return false; |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace remoting | 149 } // namespace remoting |
| OLD | NEW |