Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: remoting/protocol/message_decoder.cc

Issue 429113002: Webrtc deps roll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use webrtc version 6825 and rebase and switch back to original workspace. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/protocol/message_decoder.h" 5 #include "remoting/protocol/message_decoder.h"
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 #include "remoting/proto/internal.pb.h" 10 #include "remoting/proto/internal.pb.h"
11 #include "third_party/libjingle/source/talk/base/byteorder.h" 11 #include "third_party/webrtc/base/byteorder.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 namespace protocol { 14 namespace protocol {
15 15
16 MessageDecoder::MessageDecoder() 16 MessageDecoder::MessageDecoder()
17 : next_payload_(0), 17 : next_payload_(0),
18 next_payload_known_(false) { 18 next_payload_known_(false) {
19 } 19 }
20 20
21 MessageDecoder::~MessageDecoder() {} 21 MessageDecoder::~MessageDecoder() {}
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // The header has a size of 4 bytes. 54 // The header has a size of 4 bytes.
55 const int kHeaderSize = sizeof(int32); 55 const int kHeaderSize = sizeof(int32);
56 56
57 if (buffer_.total_bytes() < kHeaderSize) 57 if (buffer_.total_bytes() < kHeaderSize)
58 return false; 58 return false;
59 59
60 CompoundBuffer header_buffer; 60 CompoundBuffer header_buffer;
61 char header[kHeaderSize]; 61 char header[kHeaderSize];
62 header_buffer.CopyFrom(buffer_, 0, kHeaderSize); 62 header_buffer.CopyFrom(buffer_, 0, kHeaderSize);
63 header_buffer.CopyTo(header, kHeaderSize); 63 header_buffer.CopyTo(header, kHeaderSize);
64 *size = talk_base::GetBE32(header); 64 *size = rtc::GetBE32(header);
65 buffer_.CropFront(kHeaderSize); 65 buffer_.CropFront(kHeaderSize);
66 return true; 66 return true;
67 } 67 }
68 68
69 } // namespace protocol 69 } // namespace protocol
70 } // namespace remoting 70 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/libjingle_transport_factory.cc ('k') | remoting/protocol/message_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698