OLD | NEW |
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/renderer/p2p/ipc_socket_factory.h" | 5 #include "content/renderer/p2p/ipc_socket_factory.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 error_ = EWOULDBLOCK; | 393 error_ = EWOULDBLOCK; |
394 IncrementDiscardCounters(data_size); | 394 IncrementDiscardCounters(data_size); |
395 return -1; | 395 return -1; |
396 } else { | 396 } else { |
397 current_discard_bytes_sequence_ = 0; | 397 current_discard_bytes_sequence_ = 0; |
398 } | 398 } |
399 | 399 |
400 net::IPEndPoint address_chrome; | 400 net::IPEndPoint address_chrome; |
401 if (!jingle_glue::SocketAddressToIPEndPoint(address, &address_chrome)) { | 401 if (!jingle_glue::SocketAddressToIPEndPoint(address, &address_chrome)) { |
402 VLOG(1) << "Failed to convert remote address to IPEndPoint: address = " | 402 DVLOG(1) << "Failed to convert remote address to IPEndPoint: address = " |
403 << address.ToSensitiveString() << ", remote_address_ = " | 403 << address.ToSensitiveString() << ", remote_address_ = " |
404 << remote_address_.ToSensitiveString(); | 404 << remote_address_.ToSensitiveString(); |
405 NOTREACHED(); | 405 NOTREACHED(); |
406 error_ = EINVAL; | 406 error_ = EINVAL; |
407 return -1; | 407 return -1; |
408 } | 408 } |
409 | 409 |
410 send_bytes_available_ -= data_size; | 410 send_bytes_available_ -= data_size; |
411 in_flight_packet_sizes_.push_back(data_size); | 411 in_flight_packet_sizes_.push_back(data_size); |
412 TraceSendThrottlingState(); | 412 TraceSendThrottlingState(); |
413 | 413 |
414 const char* data_char = reinterpret_cast<const char*>(data); | 414 const char* data_char = reinterpret_cast<const char*>(data); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 } | 740 } |
741 | 741 |
742 rtc::AsyncResolverInterface* | 742 rtc::AsyncResolverInterface* |
743 IpcPacketSocketFactory::CreateAsyncResolver() { | 743 IpcPacketSocketFactory::CreateAsyncResolver() { |
744 scoped_ptr<AsyncAddressResolverImpl> resolver( | 744 scoped_ptr<AsyncAddressResolverImpl> resolver( |
745 new AsyncAddressResolverImpl(socket_dispatcher_)); | 745 new AsyncAddressResolverImpl(socket_dispatcher_)); |
746 return resolver.release(); | 746 return resolver.release(); |
747 } | 747 } |
748 | 748 |
749 } // namespace content | 749 } // namespace content |
OLD | NEW |