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

Side by Side Diff: ipc/mojo/ipc_channel_mojo_host.h

Issue 645123004: Fix WeakPtrFactory member placement in ipc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build issue Created 6 years, 2 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
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo_host.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef IPC_IPC_CHANNEL_MOJO_HOST_H_ 5 #ifndef IPC_IPC_CHANNEL_MOJO_HOST_H_
6 #define IPC_IPC_CHANNEL_MOJO_HOST_H_ 6 #define IPC_IPC_CHANNEL_MOJO_HOST_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 21 matching lines...) Expand all
32 private: 32 private:
33 class ChannelDelegate; 33 class ChannelDelegate;
34 34
35 // Delegate talks to ChannelMojo, whch lives in IO thread, thus 35 // Delegate talks to ChannelMojo, whch lives in IO thread, thus
36 // the Delegate should also live and dies in the IO thread as well. 36 // the Delegate should also live and dies in the IO thread as well.
37 class DelegateDeleter { 37 class DelegateDeleter {
38 public: 38 public:
39 void operator()(ChannelDelegate* ptr) const; 39 void operator()(ChannelDelegate* ptr) const;
40 }; 40 };
41 41
42 base::WeakPtrFactory<ChannelMojoHost> weak_factory_;
43 const scoped_refptr<base::TaskRunner> io_task_runner_; 42 const scoped_refptr<base::TaskRunner> io_task_runner_;
44 scoped_ptr<ChannelDelegate, DelegateDeleter> channel_delegate_; 43 scoped_ptr<ChannelDelegate, DelegateDeleter> channel_delegate_;
44 base::WeakPtrFactory<ChannelMojoHost> weak_factory_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ChannelMojoHost); 46 DISALLOW_COPY_AND_ASSIGN(ChannelMojoHost);
47 }; 47 };
48 48
49 } // namespace IPC 49 } // namespace IPC
50 50
51 #endif // IPC_IPC_CHANNEL_MOJO_HOST_H_ 51 #endif // IPC_IPC_CHANNEL_MOJO_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698