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

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

Issue 7715020: Move P2P code to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/resource_context.h" 10 #include "content/browser/resource_context.h"
11 #include "content/common/p2p_messages.h" 11 #include "content/common/p2p_messages.h"
12 #include "net/base/address_list.h" 12 #include "net/base/address_list.h"
13 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "net/base/net_log.h" 15 #include "net/base/net_log.h"
16 #include "net/base/single_request_host_resolver.h" 16 #include "net/base/single_request_host_resolver.h"
17 #include "net/base/sys_addrinfo.h" 17 #include "net/base/sys_addrinfo.h"
18 18
19 namespace content {
20
19 class P2PSocketDispatcherHost::DnsRequest { 21 class P2PSocketDispatcherHost::DnsRequest {
20 public: 22 public:
21 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback; 23 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback;
22 24
23 DnsRequest(int32 routing_id, int32 request_id, 25 DnsRequest(int32 routing_id, int32 request_id,
24 net::HostResolver* host_resolver) 26 net::HostResolver* host_resolver)
25 : routing_id_(routing_id), 27 : routing_id_(routing_id),
26 request_id_(request_id), 28 request_id_(request_id),
27 resolver_(host_resolver), 29 resolver_(host_resolver),
28 ALLOW_THIS_IN_INITIALIZER_LIST(completion_callback_( 30 ALLOW_THIS_IN_INITIALIZER_LIST(completion_callback_(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 int socket_id) { 276 int socket_id) {
275 SocketsMap::iterator it = sockets_.find( 277 SocketsMap::iterator it = sockets_.find(
276 ExtendedSocketId(msg.routing_id(), socket_id)); 278 ExtendedSocketId(msg.routing_id(), socket_id));
277 if (it != sockets_.end()) { 279 if (it != sockets_.end()) {
278 delete it->second; 280 delete it->second;
279 sockets_.erase(it); 281 sockets_.erase(it);
280 } else { 282 } else {
281 LOG(ERROR) << "Received P2PHostMsg_DestroySocket for invalid socket_id."; 283 LOG(ERROR) << "Received P2PHostMsg_DestroySocket for invalid socket_id.";
282 } 284 }
283 } 285 }
286
287 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/p2p/socket_dispatcher_host.h ('k') | content/browser/renderer_host/p2p/socket_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698