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

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

Issue 10071038: RefCounted types should not have public destructors, content/browser part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright bump Created 8 years, 7 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) 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_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "content/common/p2p_messages.h" 10 #include "content/common/p2p_messages.h"
(...skipping 16 matching lines...) Expand all
27 DCHECK(message_loop_->BelongsToCurrentThread()); 27 DCHECK(message_loop_->BelongsToCurrentThread());
28 message_sender_ = NULL; 28 message_sender_ = NULL;
29 } 29 }
30 30
31 void Send(IPC::Message* msg) { 31 void Send(IPC::Message* msg) {
32 message_loop_->PostTask(FROM_HERE, 32 message_loop_->PostTask(FROM_HERE,
33 base::Bind(&AsyncMessageSender::DoSend, this, msg)); 33 base::Bind(&AsyncMessageSender::DoSend, this, msg));
34 } 34 }
35 35
36 private: 36 private:
37 friend class base::RefCountedThreadSafe<AsyncMessageSender>;
38 ~AsyncMessageSender() {}
39
37 void DoSend(IPC::Message* msg) { 40 void DoSend(IPC::Message* msg) {
38 DCHECK(message_loop_->BelongsToCurrentThread()); 41 DCHECK(message_loop_->BelongsToCurrentThread());
39 if (message_sender_) 42 if (message_sender_)
40 message_sender_->Send(msg); 43 message_sender_->Send(msg);
41 } 44 }
42 45
43 scoped_refptr<base::MessageLoopProxy> message_loop_; 46 scoped_refptr<base::MessageLoopProxy> message_loop_;
44 IPC::Message::Sender* message_sender_; 47 IPC::Message::Sender* message_sender_;
45 48
46 DISALLOW_COPY_AND_ASSIGN(AsyncMessageSender); 49 DISALLOW_COPY_AND_ASSIGN(AsyncMessageSender);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // hasn't processed the close message by the time it sends the 179 // hasn't processed the close message by the time it sends the
177 // message to the renderer. 180 // message to the renderer.
178 VLOG(1) << "Received P2P message for socket that doesn't exist."; 181 VLOG(1) << "Received P2P message for socket that doesn't exist.";
179 return NULL; 182 return NULL;
180 } 183 }
181 184
182 return client; 185 return client;
183 } 186 }
184 187
185 } // namespace content 188 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl_unittest.cc ('k') | content/renderer/pepper/pepper_platform_audio_input_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698