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

Unified Diff: ipc/mojo/ipc_channel_mojo_host.h

Issue 955813002: Make ChannelMojoHost::ChannelDelegate a RefContedThreadSafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ipc/mojo/ipc_channel_mojo_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo_host.h
diff --git a/ipc/mojo/ipc_channel_mojo_host.h b/ipc/mojo/ipc_channel_mojo_host.h
index 8289515fc3171c7edea95baefc8747ef6c9a22b0..db60b12a4ccab48090e1d8caf331554a1dfc8468 100644
--- a/ipc/mojo/ipc_channel_mojo_host.h
+++ b/ipc/mojo/ipc_channel_mojo_host.h
@@ -12,7 +12,7 @@
#include "ipc/mojo/ipc_channel_mojo.h"
namespace base {
-class TaskRunner;
+class SequencedTaskRunner;
}
namespace IPC {
@@ -23,7 +23,8 @@ namespace IPC {
// instance and call OnClientLaunched().
class IPC_MOJO_EXPORT ChannelMojoHost {
public:
- explicit ChannelMojoHost(scoped_refptr<base::TaskRunner> io_task_runner);
+ explicit ChannelMojoHost(
+ scoped_refptr<base::SequencedTaskRunner> io_task_runner);
~ChannelMojoHost();
void OnClientLaunched(base::ProcessHandle process);
@@ -31,16 +32,10 @@ class IPC_MOJO_EXPORT ChannelMojoHost {
private:
class ChannelDelegate;
+ class ChannelDelegateTraits;
- // Delegate talks to ChannelMojo, whch lives in IO thread, thus
- // the Delegate should also live and dies in the IO thread as well.
- class DelegateDeleter {
- public:
- void operator()(ChannelDelegate* ptr) const;
- };
-
- const scoped_refptr<base::TaskRunner> io_task_runner_;
- scoped_ptr<ChannelDelegate, DelegateDeleter> channel_delegate_;
+ const scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
+ scoped_refptr<ChannelDelegate> channel_delegate_;
base::WeakPtrFactory<ChannelMojoHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ChannelMojoHost);
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ipc/mojo/ipc_channel_mojo_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698