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

Unified Diff: chrome/test/automation/proxy_launcher.cc

Issue 191673003: Implement ScopedFD in terms of ScopedGeneric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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: chrome/test/automation/proxy_launcher.cc
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 6171f28d0e97ac34708b16fb1832ee713da8d390..e49c4d6bdfdb445fce865602ddcb84bb3d8f8426 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"
@@ -489,12 +490,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;
}

Powered by Google App Engine
This is Rietveld 408576698