Index: chrome/test/chromedriver/chrome_launcher.cc |
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc |
index 1ca47c355fd2158f26f974b778fe42150f25ca8a..44a4ad822e63668607be6aa9ebbafe204a1ab11f 100644 |
--- a/chrome/test/chromedriver/chrome_launcher.cc |
+++ b/chrome/test/chromedriver/chrome_launcher.cc |
@@ -12,7 +12,6 @@ |
#include "base/command_line.h" |
#include "base/file_util.h" |
#include "base/files/file_path.h" |
-#include "base/files/scoped_file.h" |
#include "base/format_macros.h" |
#include "base/json/json_reader.h" |
#include "base/json/json_writer.h" |
@@ -251,14 +250,15 @@ |
#if defined(OS_POSIX) |
base::FileHandleMappingVector no_stderr; |
- base::ScopedFD devnull; |
+ int devnull = -1; |
+ file_util::ScopedFD scoped_devnull(&devnull); |
if (!CommandLine::ForCurrentProcess()->HasSwitch("verbose")) { |
// Redirect stderr to /dev/null, so that Chrome log spew doesn't confuse |
// users. |
- devnull.reset(open("/dev/null", O_WRONLY)); |
- if (!devnull.is_valid()) |
+ devnull = open("/dev/null", O_WRONLY); |
+ if (devnull == -1) |
return Status(kUnknownError, "couldn't open /dev/null"); |
- no_stderr.push_back(std::make_pair(devnull.get(), STDERR_FILENO)); |
+ no_stderr.push_back(std::make_pair(devnull, STDERR_FILENO)); |
options.fds_to_remap = &no_stderr; |
} |
#endif |