| Index: chrome/test/automation/proxy_launcher.cc
|
| diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
|
| index da9eba9bcd07725def4751ebeb323ebd1714e5df..250c1783e07ffaa7ea0d6166b98cb03891f0da45 100644
|
| --- a/chrome/test/automation/proxy_launcher.cc
|
| +++ b/chrome/test/automation/proxy_launcher.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/environment.h"
|
| #include "base/file_util.h"
|
| #include "base/files/file_enumerator.h"
|
| +#include "base/files/scoped_file.h"
|
| #include "base/process/kill.h"
|
| #include "base/process/launch.h"
|
| #include "base/strings/string_number_conversions.h"
|
| @@ -493,12 +494,11 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state,
|
| #if defined(OS_WIN)
|
| options.start_hidden = !state.show_window;
|
| #elif defined(OS_POSIX)
|
| - int ipcfd = -1;
|
| - file_util::ScopedFD ipcfd_closer(&ipcfd);
|
| + base::ScopedFD ipcfd;
|
| base::FileHandleMappingVector fds;
|
| if (main_launch && automation_proxy_.get()) {
|
| - ipcfd = automation_proxy_->channel()->TakeClientFileDescriptor();
|
| - fds.push_back(std::make_pair(ipcfd,
|
| + ipcfd.reset(automation_proxy_->channel()->TakeClientFileDescriptor());
|
| + fds.push_back(std::make_pair(ipcfd.get(),
|
| kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor));
|
| options.fds_to_remap = &fds;
|
| }
|
|
|