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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 320433002: IPC::Channel: Reduce POSIX specific API surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 3972788772eed771ecc1b3df6250492e4fece7dd..73c06454870eb5506528e8e24f94dc74a98e7ff3 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -177,6 +177,15 @@ void Channel::NotifyProcessForkedForTesting() {
int ChannelPosix::global_pid_ = 0;
#endif // OS_LINUX
+// static
+scoped_ptr<ChannelPosix> ChannelPosix::Create(
+ const IPC::ChannelHandle& channel_handle, Mode mode,
+ Listener* listener) {
+ return make_scoped_ptr(new ChannelPosix(channel_handle,
+ mode,
+ listener));
+}
+
ChannelPosix::ChannelPosix(const IPC::ChannelHandle& channel_handle,
Mode mode, Listener* listener)
: ChannelReader(listener),
@@ -1056,8 +1065,7 @@ base::ProcessId ChannelPosix::GetPeerPID() const {
// static
scoped_ptr<Channel> Channel::Create(
const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
- return scoped_ptr<Channel>(
- new ChannelPosix(channel_handle, mode, listener));
+ return ChannelPosix::Create(channel_handle, mode, listener).PassAs<Channel>();
}
// static

Powered by Google App Engine
This is Rietveld 408576698