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

Side by Side Diff: content/browser/renderer_host/p2p/socket_dispatcher_host.cc

Issue 213423004: Detect IPv6 interface is temporary or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 | « no previous file | net/base/net_util.h » ('j') | net/base/net_util.h » ('J')
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 "content/browser/renderer_host/p2p/socket_dispatcher_host.h" 5 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/browser/renderer_host/p2p/socket_host.h" 9 #include "content/browser/renderer_host/p2p/socket_host.h"
10 #include "content/common/p2p_messages.h" 10 #include "content/common/p2p_messages.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (it != sockets_.end()) { 269 if (it != sockets_.end()) {
270 delete it->second; 270 delete it->second;
271 sockets_.erase(it); 271 sockets_.erase(it);
272 } else { 272 } else {
273 LOG(ERROR) << "Received P2PHostMsg_DestroySocket for invalid socket_id."; 273 LOG(ERROR) << "Received P2PHostMsg_DestroySocket for invalid socket_id.";
274 } 274 }
275 } 275 }
276 276
277 void P2PSocketDispatcherHost::DoGetNetworkList() { 277 void P2PSocketDispatcherHost::DoGetNetworkList() {
278 net::NetworkInterfaceList list; 278 net::NetworkInterfaceList list;
279 net::GetNetworkList(&list, net::EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES); 279 net::GetNetworkList(&list, net::EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES |
280 net::INCLUDE_ONLY_TEMP_IPV6_ADDRESS_IF_POSSIBLE);
280 BrowserThread::PostTask( 281 BrowserThread::PostTask(
281 BrowserThread::IO, FROM_HERE, base::Bind( 282 BrowserThread::IO, FROM_HERE, base::Bind(
282 &P2PSocketDispatcherHost::SendNetworkList, this, list)); 283 &P2PSocketDispatcherHost::SendNetworkList, this, list));
283 } 284 }
284 285
285 void P2PSocketDispatcherHost::SendNetworkList( 286 void P2PSocketDispatcherHost::SendNetworkList(
286 const net::NetworkInterfaceList& list) { 287 const net::NetworkInterfaceList& list) {
287 Send(new P2PMsg_NetworkListChanged(list)); 288 Send(new P2PMsg_NetworkListChanged(list));
288 } 289 }
289 290
290 void P2PSocketDispatcherHost::OnAddressResolved( 291 void P2PSocketDispatcherHost::OnAddressResolved(
291 DnsRequest* request, 292 DnsRequest* request,
292 const net::IPAddressList& addresses) { 293 const net::IPAddressList& addresses) {
293 Send(new P2PMsg_GetHostAddressResult(request->request_id(), addresses)); 294 Send(new P2PMsg_GetHostAddressResult(request->request_id(), addresses));
294 295
295 dns_requests_.erase(request); 296 dns_requests_.erase(request);
296 delete request; 297 delete request;
297 } 298 }
298 299
299 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | net/base/net_util.h » ('j') | net/base/net_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698