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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host.cc

Issue 1669023004: Roll WebRTC 11486:11495, Libjingle 11485:11495 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update includes in content and remoting Created 4 years, 10 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
« no previous file with comments | « DEPS ('k') | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/renderer_host/p2p/socket_host.h" 5 #include "content/browser/renderer_host/p2p/socket_host.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/sys_byteorder.h" 8 #include "base/sys_byteorder.h"
9 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" 9 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
10 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h" 10 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h"
11 #include "content/browser/renderer_host/p2p/socket_host_udp.h" 11 #include "content/browser/renderer_host/p2p/socket_host_udp.h"
12 #include "content/browser/renderer_host/render_process_host_impl.h" 12 #include "content/browser/renderer_host/render_process_host_impl.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "third_party/libjingle/source/talk/media/base/rtputils.h" 14 #include "third_party/webrtc/media/base/rtputils.h"
15 #include "third_party/libjingle/source/talk/media/base/turnutils.h" 15 #include "third_party/webrtc/media/base/turnutils.h"
16 16
17 namespace { 17 namespace {
18 18
19 const uint32_t kStunMagicCookie = 0x2112A442; 19 const uint32_t kStunMagicCookie = 0x2112A442;
20 const size_t kMinRtcpHeaderLength = 8; 20 const size_t kMinRtcpHeaderLength = 8;
21 const size_t kDtlsRecordHeaderLength = 13; 21 const size_t kDtlsRecordHeaderLength = 13;
22 22
23 bool IsDtlsPacket(const char* data, size_t length) { 23 bool IsDtlsPacket(const char* data, size_t length) {
24 const uint8_t* u = reinterpret_cast<const uint8_t*>(data); 24 const uint8_t* u = reinterpret_cast<const uint8_t*>(data);
25 return (length >= kDtlsRecordHeaderLength && (u[0] > 19 && u[0] < 64)); 25 return (length >= kDtlsRecordHeaderLength && (u[0] > 19 && u[0] < 64));
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 send_bytes_delayed_max_ = send_bytes_delayed_cur_; 267 send_bytes_delayed_max_ = send_bytes_delayed_cur_;
268 } 268 }
269 } 269 }
270 270
271 void P2PSocketHost::DecrementDelayedBytes(uint32_t size) { 271 void P2PSocketHost::DecrementDelayedBytes(uint32_t size) {
272 send_bytes_delayed_cur_ -= size; 272 send_bytes_delayed_cur_ -= size;
273 DCHECK_GE(send_bytes_delayed_cur_, 0); 273 DCHECK_GE(send_bytes_delayed_cur_, 0);
274 } 274 }
275 275
276 } // namespace content 276 } // namespace content
OLDNEW
« no previous file with comments | « DEPS ('k') | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698