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

Unified Diff: ipc/ipc_channel_win.cc

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 | « ipc/ipc_channel_win.h ('k') | ipc/ipc_fuzzing_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_win.cc
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index edba83a7045ec99e1bef769b7d5f30c6b4830f0c..cd12cad0a37145b09bcb09f7dc7c39134faba098 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -34,8 +34,10 @@ ChannelWin::State::~State() {
"member.");
}
-ChannelWin::ChannelWin(const IPC::ChannelHandle &channel_handle,
- Mode mode, Listener* listener)
+ChannelWin::ChannelWin(const IPC::ChannelHandle& channel_handle,
+ Mode mode,
+ Listener* listener,
+ AttachmentBroker* broker)
: ChannelReader(listener),
input_state_(this),
output_state_(this),
@@ -44,7 +46,8 @@ ChannelWin::ChannelWin(const IPC::ChannelHandle &channel_handle,
processing_incoming_(false),
validate_client_(false),
client_secret_(0),
- weak_factory_(this) {
+ weak_factory_(this),
+ broker_(broker) {
CreatePipe(channel_handle, mode);
}
@@ -101,6 +104,10 @@ bool ChannelWin::Send(Message* message) {
return true;
}
+AttachmentBroker* ChannelWin::GetAttachmentBroker() {
+ return broker_;
+}
+
base::ProcessId ChannelWin::GetPeerPID() const {
return peer_pid_;
}
@@ -476,10 +483,12 @@ void ChannelWin::OnIOCompleted(
// Channel's methods
// static
-scoped_ptr<Channel> Channel::Create(
- const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
+scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle,
+ Mode mode,
+ Listener* listener,
+ AttachmentBroker* broker) {
return scoped_ptr<Channel>(
- new ChannelWin(channel_handle, mode, listener));
+ new ChannelWin(channel_handle, mode, listener, broker));
}
// static
« no previous file with comments | « ipc/ipc_channel_win.h ('k') | ipc/ipc_fuzzing_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698