diff options
Diffstat (limited to 'chrome/common/ipc_tests.cc')
-rw-r--r-- | chrome/common/ipc_tests.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/common/ipc_tests.cc b/chrome/common/ipc_tests.cc index c2e0baa..d347fb5 100644 --- a/chrome/common/ipc_tests.cc +++ b/chrome/common/ipc_tests.cc @@ -21,16 +21,11 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug_on_start.h" -#if defined(OS_POSIX) -#include "base/at_exit.h" -#include "base/global_descriptors_posix.h" -#endif #include "base/perftimer.h" #include "base/perf_test_suite.h" #include "base/test_suite.h" #include "base/thread.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/chrome_descriptors.h" #include "chrome/common/ipc_channel.h" #include "chrome/common/ipc_channel_proxy.h" #include "chrome/common/ipc_message_utils.h" @@ -91,9 +86,11 @@ base::ProcessHandle IPCChannelTest::SpawnChild(ChildType child_type, CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugChildren); base::file_handle_mapping_vector fds_to_map; - const int ipcfd = channel->GetClientFileDescriptor(); - if (ipcfd > -1) { - fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3)); + int src_fd; + int dest_fd; + channel->GetClientFileDescriptorMapping(&src_fd, &dest_fd); + if (src_fd > -1) { + fds_to_map.push_back(std::pair<int,int>(src_fd, dest_fd)); } base::ProcessHandle ret = NULL; @@ -261,9 +258,11 @@ TEST_F(IPCChannelTest, ChannelProxyTest) { bool debug_on_start = CommandLine::ForCurrentProcess()->HasSwitch( switches::kDebugChildren); base::file_handle_mapping_vector fds_to_map; - const int ipcfd = chan.GetClientFileDescriptor(); - if (ipcfd > -1) { - fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3)); + int src_fd; + int dest_fd; + chan.GetClientFileDescriptorMapping(&src_fd, &dest_fd); + if (src_fd > -1) { + fds_to_map.push_back(std::pair<int,int>(src_fd, dest_fd)); } base::ProcessHandle process_handle = MultiProcessTest::SpawnChild( |