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

Unified Diff: ipc/ipc_channel_posix_unittest.cc

Issue 621613002: Refactoring: Make IPC::Channel::TakeClientFileDescriptor() a ScopedFD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Mac build Created 6 years, 2 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_unittest.cc
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
index b61b345ced0962e5c27c676547d738e9666e0d8d..d5346b9b7c6b98d68063a23369642fc13be50574 100644
--- a/ipc/ipc_channel_posix_unittest.cc
+++ b/ipc/ipc_channel_posix_unittest.cc
@@ -246,9 +246,8 @@ TEST_F(IPCChannelPosixTest, SendHangTest) {
IPC::ChannelHandle in_handle("IN");
scoped_ptr<IPC::ChannelPosix> in_chan(new IPC::ChannelPosix(
in_handle, IPC::Channel::MODE_SERVER, &in_listener));
- base::FileDescriptor out_fd(
- in_chan->TakeClientFileDescriptor(), false);
- IPC::ChannelHandle out_handle("OUT", out_fd);
+ IPC::ChannelHandle out_handle(
+ "OUT", base::FileDescriptor(in_chan->TakeClientFileDescriptor()));
scoped_ptr<IPC::ChannelPosix> out_chan(new IPC::ChannelPosix(
out_handle, IPC::Channel::MODE_CLIENT, &out_listener));
ASSERT_TRUE(in_chan->Connect());
@@ -272,9 +271,8 @@ TEST_F(IPCChannelPosixTest, AcceptHangTest) {
IPC::ChannelHandle in_handle("IN");
scoped_ptr<IPC::ChannelPosix> in_chan(new IPC::ChannelPosix(
in_handle, IPC::Channel::MODE_SERVER, &in_listener));
- base::FileDescriptor out_fd(
- in_chan->TakeClientFileDescriptor(), false);
- IPC::ChannelHandle out_handle("OUT", out_fd);
+ IPC::ChannelHandle out_handle(
+ "OUT", base::FileDescriptor(in_chan->TakeClientFileDescriptor()));
scoped_ptr<IPC::ChannelPosix> out_chan(new IPC::ChannelPosix(
out_handle, IPC::Channel::MODE_CLIENT, &out_listener));
ASSERT_TRUE(in_chan->Connect());
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_proxy.h » ('j') | ppapi/proxy/proxy_channel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698