| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 error_ = EINVAL; | 316 error_ = EINVAL; |
| 317 return -1; | 317 return -1; |
| 318 } | 318 } |
| 319 | 319 |
| 320 send_bytes_available_ -= data_size; | 320 send_bytes_available_ -= data_size; |
| 321 in_flight_packet_sizes_.push_back(data_size); | 321 in_flight_packet_sizes_.push_back(data_size); |
| 322 TraceSendThrottlingState(); | 322 TraceSendThrottlingState(); |
| 323 | 323 |
| 324 const char* data_char = reinterpret_cast<const char*>(data); | 324 const char* data_char = reinterpret_cast<const char*>(data); |
| 325 std::vector<char> data_vector(data_char, data_char + data_size); | 325 std::vector<char> data_vector(data_char, data_char + data_size); |
| 326 client_->SendWithDscp(address_chrome, data_vector, | 326 client_->SendWithDscp(address_chrome, data_vector, options); |
| 327 static_cast<net::DiffServCodePoint>(options.dscp)); | |
| 328 | 327 |
| 329 // Fake successful send. The caller ignores result anyway. | 328 // Fake successful send. The caller ignores result anyway. |
| 330 return data_size; | 329 return data_size; |
| 331 } | 330 } |
| 332 | 331 |
| 333 int IpcPacketSocket::Close() { | 332 int IpcPacketSocket::Close() { |
| 334 DCHECK_EQ(base::MessageLoop::current(), message_loop_); | 333 DCHECK_EQ(base::MessageLoop::current(), message_loop_); |
| 335 | 334 |
| 336 client_->Close(); | 335 client_->Close(); |
| 337 state_ = IS_CLOSED; | 336 state_ = IS_CLOSED; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 } | 619 } |
| 621 | 620 |
| 622 talk_base::AsyncResolverInterface* | 621 talk_base::AsyncResolverInterface* |
| 623 IpcPacketSocketFactory::CreateAsyncResolver() { | 622 IpcPacketSocketFactory::CreateAsyncResolver() { |
| 624 scoped_ptr<AsyncAddressResolverImpl> resolver( | 623 scoped_ptr<AsyncAddressResolverImpl> resolver( |
| 625 new AsyncAddressResolverImpl(socket_dispatcher_)); | 624 new AsyncAddressResolverImpl(socket_dispatcher_)); |
| 626 return resolver.release(); | 625 return resolver.release(); |
| 627 } | 626 } |
| 628 | 627 |
| 629 } // namespace content | 628 } // namespace content |
| OLD | NEW |