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

Side by Side Diff: jingle/glue/channel_socket_adapter.cc

Issue 103143004: Update webrtc/libjingle 5268:5288. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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
« no previous file with comments | « jingle/glue/channel_socket_adapter.h ('k') | jingle/glue/channel_socket_adapter_unittest.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 "jingle/glue/channel_socket_adapter.h" 5 #include "jingle/glue/channel_socket_adapter.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 write_callback_.Reset(); 133 write_callback_.Reset();
134 write_buffer_ = NULL; 134 write_buffer_ = NULL;
135 callback.Run(error_code); 135 callback.Run(error_code);
136 } 136 }
137 } 137 }
138 138
139 void TransportChannelSocketAdapter::OnNewPacket( 139 void TransportChannelSocketAdapter::OnNewPacket(
140 cricket::TransportChannel* channel, 140 cricket::TransportChannel* channel,
141 const char* data, 141 const char* data,
142 size_t data_size, 142 size_t data_size,
143 const talk_base::PacketTime& packet_time,
143 int flags) { 144 int flags) {
144 DCHECK_EQ(base::MessageLoop::current(), message_loop_); 145 DCHECK_EQ(base::MessageLoop::current(), message_loop_);
145 DCHECK_EQ(channel, channel_); 146 DCHECK_EQ(channel, channel_);
146 if (!read_callback_.is_null()) { 147 if (!read_callback_.is_null()) {
147 DCHECK(read_buffer_.get()); 148 DCHECK(read_buffer_.get());
148 CHECK_LT(data_size, static_cast<size_t>(std::numeric_limits<int>::max())); 149 CHECK_LT(data_size, static_cast<size_t>(std::numeric_limits<int>::max()));
149 150
150 if (read_buffer_size_ < static_cast<int>(data_size)) { 151 if (read_buffer_size_ < static_cast<int>(data_size)) {
151 LOG(WARNING) << "Data buffer is smaller than the received packet. " 152 LOG(WARNING) << "Data buffer is smaller than the received packet. "
152 << "Dropping the data that doesn't fit."; 153 << "Dropping the data that doesn't fit.";
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 188 }
188 189
189 void TransportChannelSocketAdapter::OnChannelDestroyed( 190 void TransportChannelSocketAdapter::OnChannelDestroyed(
190 cricket::TransportChannel* channel) { 191 cricket::TransportChannel* channel) {
191 DCHECK_EQ(base::MessageLoop::current(), message_loop_); 192 DCHECK_EQ(base::MessageLoop::current(), message_loop_);
192 DCHECK_EQ(channel, channel_); 193 DCHECK_EQ(channel, channel_);
193 Close(net::ERR_CONNECTION_ABORTED); 194 Close(net::ERR_CONNECTION_ABORTED);
194 } 195 }
195 196
196 } // namespace jingle_glue 197 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/channel_socket_adapter.h ('k') | jingle/glue/channel_socket_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698