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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 10008108: RefCounted types should not have public destructors, ipc/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('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) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "ipc/ipc_channel_proxy.h" 11 #include "ipc/ipc_channel_proxy.h"
12 #include "ipc/ipc_logging.h" 12 #include "ipc/ipc_logging.h"
13 #include "ipc/ipc_message_utils.h" 13 #include "ipc/ipc_message_utils.h"
14 14
15 namespace IPC { 15 namespace IPC {
16 16
17 // This helper ensures the message is deleted if the task is deleted without 17 // This helper ensures the message is deleted if the task is deleted without
18 // having been run. 18 // having been run.
19 class SendCallbackHelper 19 class SendCallbackHelper
jam 2012/04/13 18:16:41 oh, looks like we don't even need this class anymo
20 : public base::RefCountedThreadSafe<SendCallbackHelper> { 20 : public base::RefCountedThreadSafe<SendCallbackHelper> {
21 public: 21 public:
22 SendCallbackHelper(ChannelProxy::Context* context, Message* message) 22 SendCallbackHelper(ChannelProxy::Context* context, Message* message)
23 : context_(context), 23 : context_(context),
24 message_(message) { 24 message_(message) {
25 } 25 }
26 26
27 void Send() { 27 void Send() {
28 context_->OnSendMessage(message_.release()); 28 context_->OnSendMessage(message_.release());
29 } 29 }
30 30
31 private: 31 private:
32 friend class base::RefCountedThreadSafe<SendCallbackHelper>;
33 ~SendCallbackHelper() {}
34
32 scoped_refptr<ChannelProxy::Context> context_; 35 scoped_refptr<ChannelProxy::Context> context_;
33 scoped_ptr<Message> message_; 36 scoped_ptr<Message> message_;
34 37
35 DISALLOW_COPY_AND_ASSIGN(SendCallbackHelper); 38 DISALLOW_COPY_AND_ASSIGN(SendCallbackHelper);
36 }; 39 };
37 40
38 //------------------------------------------------------------------------------ 41 //------------------------------------------------------------------------------
39 42
40 ChannelProxy::MessageFilter::MessageFilter() {} 43 ChannelProxy::MessageFilter::MessageFilter() {}
41 44
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 Channel* channel = context_.get()->channel_.get(); 411 Channel* channel = context_.get()->channel_.get();
409 // Channel must have been created first. 412 // Channel must have been created first.
410 DCHECK(channel) << context_.get()->channel_id_; 413 DCHECK(channel) << context_.get()->channel_id_;
411 return channel->GetClientEuid(client_euid); 414 return channel->GetClientEuid(client_euid);
412 } 415 }
413 #endif 416 #endif
414 417
415 //----------------------------------------------------------------------------- 418 //-----------------------------------------------------------------------------
416 419
417 } // namespace IPC 420 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698