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

Side by Side Diff: content/renderer/p2p/host_address_request.cc

Issue 7715020: Move P2P code to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 3 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 | « content/renderer/p2p/host_address_request.h ('k') | content/renderer/p2p/ipc_network_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/p2p/host_address_request.h" 5 #include "content/renderer/p2p/host_address_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "content/common/p2p_messages.h" 9 #include "content/common/p2p_messages.h"
10 #include "content/renderer/p2p/socket_dispatcher.h" 10 #include "content/renderer/p2p/socket_dispatcher.h"
11 11
12 namespace content {
13
12 P2PHostAddressRequest::P2PHostAddressRequest(P2PSocketDispatcher* dispatcher) 14 P2PHostAddressRequest::P2PHostAddressRequest(P2PSocketDispatcher* dispatcher)
13 : dispatcher_(dispatcher), 15 : dispatcher_(dispatcher),
14 ipc_message_loop_(dispatcher->message_loop()), 16 ipc_message_loop_(dispatcher->message_loop()),
15 delegate_message_loop_(base::MessageLoopProxy::current()), 17 delegate_message_loop_(base::MessageLoopProxy::current()),
16 state_(STATE_CREATED), 18 state_(STATE_CREATED),
17 request_id_(0), 19 request_id_(0),
18 registered_(false) { 20 registered_(false) {
19 } 21 }
20 22
21 P2PHostAddressRequest::~P2PHostAddressRequest() { 23 P2PHostAddressRequest::~P2PHostAddressRequest() {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 71 }
70 72
71 void P2PHostAddressRequest::DeliverResponse( 73 void P2PHostAddressRequest::DeliverResponse(
72 const net::IPAddressNumber& address) { 74 const net::IPAddressNumber& address) {
73 DCHECK(delegate_message_loop_->BelongsToCurrentThread()); 75 DCHECK(delegate_message_loop_->BelongsToCurrentThread());
74 if (state_ == STATE_SENT) { 76 if (state_ == STATE_SENT) {
75 done_callback_.Run(address); 77 done_callback_.Run(address);
76 state_ = STATE_FINISHED; 78 state_ = STATE_FINISHED;
77 } 79 }
78 } 80 }
81
82 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/host_address_request.h ('k') | content/renderer/p2p/ipc_network_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698