| Index: ipc/ipc_channel_posix.cc
|
| diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
|
| index 20c73e2c6be5fac4bd385b8d478d4f59338c9898..6c0393b929f66a302f89e99db9c632395d292b59 100644
|
| --- a/ipc/ipc_channel_posix.cc
|
| +++ b/ipc/ipc_channel_posix.cc
|
| @@ -182,7 +182,9 @@ int ChannelPosix::global_pid_ = 0;
|
| #endif // OS_LINUX
|
|
|
| ChannelPosix::ChannelPosix(const IPC::ChannelHandle& channel_handle,
|
| - Mode mode, Listener* listener)
|
| + Mode mode,
|
| + Listener* listener,
|
| + AttachmentBroker* broker)
|
| : ChannelReader(listener),
|
| mode_(mode),
|
| peer_pid_(base::kNullProcessId),
|
| @@ -191,7 +193,8 @@ ChannelPosix::ChannelPosix(const IPC::ChannelHandle& channel_handle,
|
| message_send_bytes_written_(0),
|
| pipe_name_(channel_handle.name),
|
| in_dtor_(false),
|
| - must_unlink_(false) {
|
| + must_unlink_(false),
|
| + broker_(broker) {
|
| if (!CreatePipe(channel_handle)) {
|
| // The pipe may have been closed already.
|
| const char *modestr = (mode_ & MODE_SERVER_FLAG) ? "server" : "client";
|
| @@ -517,6 +520,10 @@ bool ChannelPosix::Send(Message* message) {
|
| return true;
|
| }
|
|
|
| +AttachmentBroker* ChannelPosix::GetAttachmentBroker() {
|
| + return broker_;
|
| +}
|
| +
|
| int ChannelPosix::GetClientFileDescriptor() const {
|
| base::AutoLock lock(client_pipe_lock_);
|
| return client_pipe_.get();
|
| @@ -995,9 +1002,12 @@ void ChannelPosix::ResetSafely(base::ScopedFD* fd) {
|
| // Channel's methods
|
|
|
| // static
|
| -scoped_ptr<Channel> Channel::Create(
|
| - const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
|
| - return make_scoped_ptr(new ChannelPosix(channel_handle, mode, listener));
|
| +scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle,
|
| + Mode mode,
|
| + Listener* listener,
|
| + AttachmentBroker* broker) {
|
| + return make_scoped_ptr(
|
| + new ChannelPosix(channel_handle, mode, listener, broker));
|
| }
|
|
|
| // static
|
|
|