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

Unified Diff: ipc/ipc_channel.h

Issue 1185133006: IPC: Make ChannelReader inherit from SupportsAttachmentBrokering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from tsepez. Created 5 years, 6 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 | « no previous file | ipc/ipc_channel_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 65c678b530dc832262c095b243965c7793ee2d86..c5c46a78048c1df8ce3d2e23bdf5a76a9ac83e24 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -20,6 +20,7 @@
namespace IPC {
+class AttachmentBroker;
class Listener;
//------------------------------------------------------------------------------
@@ -118,11 +119,21 @@ class IPC_EXPORT Channel : public Sender {
//
// TODO(morrita): Replace CreateByModeForProxy() with one of above Create*().
//
- static scoped_ptr<Channel> Create(
- const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener);
-
+ // TODO(erikchen): Remove default parameter for |broker|. It exists only to
+ // make the upcoming refactor decomposable into smaller CLs.
+ // http://crbug.com/493414.
+ static scoped_ptr<Channel> Create(const IPC::ChannelHandle& channel_handle,
+ Mode mode,
+ Listener* listener,
+ AttachmentBroker* broker = nullptr);
+
+ // TODO(erikchen): Remove default parameter for |broker|. It exists only to
+ // make the upcoming refactor decomposable into smaller CLs.
+ // http://crbug.com/493414.
static scoped_ptr<Channel> CreateClient(
- const IPC::ChannelHandle &channel_handle, Listener* listener);
+ const IPC::ChannelHandle& channel_handle,
+ Listener* listener,
+ AttachmentBroker* broker = nullptr);
// Channels on Windows are named by default and accessible from other
// processes. On POSIX channels are anonymous by default and not accessible
@@ -130,18 +141,29 @@ class IPC_EXPORT Channel : public Sender {
// On Windows MODE_NAMED_SERVER is equivalent to MODE_SERVER and
// MODE_NAMED_CLIENT is equivalent to MODE_CLIENT.
static scoped_ptr<Channel> CreateNamedServer(
- const IPC::ChannelHandle &channel_handle, Listener* listener);
+ const IPC::ChannelHandle& channel_handle,
+ Listener* listener,
+ AttachmentBroker* broker);
static scoped_ptr<Channel> CreateNamedClient(
- const IPC::ChannelHandle &channel_handle, Listener* listener);
+ const IPC::ChannelHandle& channel_handle,
+ Listener* listener,
+ AttachmentBroker* broker);
#if defined(OS_POSIX)
// An "open" named server accepts connections from ANY client.
// The caller must then implement their own access-control based on the
// client process' user Id.
static scoped_ptr<Channel> CreateOpenNamedServer(
- const IPC::ChannelHandle &channel_handle, Listener* listener);
+ const IPC::ChannelHandle& channel_handle,
+ Listener* listener,
+ AttachmentBroker* broker);
#endif
+ // TODO(erikchen): Remove default parameter for |broker|. It exists only to
+ // make the upcoming refactor decomposable into smaller CLs.
+ // http://crbug.com/493414.
static scoped_ptr<Channel> CreateServer(
- const IPC::ChannelHandle &channel_handle, Listener* listener);
+ const IPC::ChannelHandle& channel_handle,
+ Listener* listener,
+ AttachmentBroker* broker = nullptr);
~Channel() override;
« no previous file with comments | « no previous file | ipc/ipc_channel_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698