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/socket_dispatcher.h" | 5 #include "content/renderer/p2p/socket_dispatcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "content/child/child_process.h" | 10 #include "content/child/child_process.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 void P2PSocketDispatcher::UnregisterHostAddressRequest(int id) { | 118 void P2PSocketDispatcher::UnregisterHostAddressRequest(int id) { |
119 DCHECK(message_loop_->BelongsToCurrentThread()); | 119 DCHECK(message_loop_->BelongsToCurrentThread()); |
120 host_address_requests_.Remove(id); | 120 host_address_requests_.Remove(id); |
121 } | 121 } |
122 | 122 |
123 void P2PSocketDispatcher::OnNetworkListChanged( | 123 void P2PSocketDispatcher::OnNetworkListChanged( |
124 const net::NetworkInterfaceList& networks) { | 124 const net::NetworkInterfaceList& networks) { |
125 network_list_observers_->Notify( | 125 network_list_observers_->Notify( |
126 &NetworkListObserver::OnNetworkListChanged, networks); | 126 FROM_HERE, &NetworkListObserver::OnNetworkListChanged, networks); |
127 } | 127 } |
128 | 128 |
129 void P2PSocketDispatcher::OnGetHostAddressResult( | 129 void P2PSocketDispatcher::OnGetHostAddressResult( |
130 int32 request_id, | 130 int32 request_id, |
131 const net::IPAddressList& addresses) { | 131 const net::IPAddressList& addresses) { |
132 P2PAsyncAddressResolver* request = host_address_requests_.Lookup(request_id); | 132 P2PAsyncAddressResolver* request = host_address_requests_.Lookup(request_id); |
133 if (!request) { | 133 if (!request) { |
134 DVLOG(1) << "Received P2P message for socket that doesn't exist."; | 134 DVLOG(1) << "Received P2P message for socket that doesn't exist."; |
135 return; | 135 return; |
136 } | 136 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // hasn't processed the close message by the time it sends the | 189 // hasn't processed the close message by the time it sends the |
190 // message to the renderer. | 190 // message to the renderer. |
191 DVLOG(1) << "Received P2P message for socket that doesn't exist."; | 191 DVLOG(1) << "Received P2P message for socket that doesn't exist."; |
192 return NULL; | 192 return NULL; |
193 } | 193 } |
194 | 194 |
195 return client; | 195 return client; |
196 } | 196 } |
197 | 197 |
198 } // namespace content | 198 } // namespace content |
OLD | NEW |