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/browser/renderer_host/p2p/socket_dispatcher_host.h" | 5 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Add period at the end to make sure that we only resolve | 68 // Add period at the end to make sure that we only resolve |
69 // fully-qualified names. | 69 // fully-qualified names. |
70 if (host_name_.back() != '.') | 70 if (host_name_.back() != '.') |
71 host_name_ += '.'; | 71 host_name_ += '.'; |
72 | 72 |
73 net::HostResolver::RequestInfo info(net::HostPortPair(host_name_, 0)); | 73 net::HostResolver::RequestInfo info(net::HostPortPair(host_name_, 0)); |
74 int result = resolver_->Resolve( | 74 int result = resolver_->Resolve( |
75 info, net::DEFAULT_PRIORITY, &addresses_, | 75 info, net::DEFAULT_PRIORITY, &addresses_, |
76 base::Bind(&P2PSocketDispatcherHost::DnsRequest::OnDone, | 76 base::Bind(&P2PSocketDispatcherHost::DnsRequest::OnDone, |
77 base::Unretained(this)), | 77 base::Unretained(this)), |
78 &request_, net::BoundNetLog()); | 78 &request_, net::NetLogWithSource()); |
79 if (result != net::ERR_IO_PENDING) | 79 if (result != net::ERR_IO_PENDING) |
80 OnDone(result); | 80 OnDone(result); |
81 } | 81 } |
82 | 82 |
83 int32_t request_id() { return request_id_; } | 83 int32_t request_id() { return request_id_; } |
84 | 84 |
85 private: | 85 private: |
86 void OnDone(int result) { | 86 void OnDone(int result) { |
87 net::IPAddressList list; | 87 net::IPAddressList list; |
88 if (result != net::OK) { | 88 if (result != net::OK) { |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 415 |
416 if (!dump_incoming_rtp_packet_ && !dump_outgoing_rtp_packet_) | 416 if (!dump_incoming_rtp_packet_ && !dump_outgoing_rtp_packet_) |
417 packet_callback_.Reset(); | 417 packet_callback_.Reset(); |
418 | 418 |
419 for (SocketsMap::iterator it = sockets_.begin(); it != sockets_.end(); ++it) | 419 for (SocketsMap::iterator it = sockets_.begin(); it != sockets_.end(); ++it) |
420 it->second->StopRtpDump(incoming, outgoing); | 420 it->second->StopRtpDump(incoming, outgoing); |
421 } | 421 } |
422 } | 422 } |
423 | 423 |
424 } // namespace content | 424 } // namespace content |
OLD | NEW |