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

Unified Diff: chrome/test/chromedriver/chrome_launcher.cc

Issue 197873014: Revert of 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/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
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/utility/importer/firefox_importer_unittest_utils_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698