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

Unified Diff: chrome/browser/extensions/api/messaging/native_process_launcher_posix.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/browser/extensions/api/messaging/native_process_launcher_posix.cc
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
index 70353d3b3859c700df85426e8f6986c6fee852c4..f4523fc024c1c35443295156ae4300bef93d493b 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
@@ -6,7 +6,6 @@
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/posix/eintr_wrapper.h"
@@ -59,18 +58,18 @@
LOG(ERROR) << "Bad read pipe";
return false;
}
- base::ScopedFD read_pipe_read_fd(read_pipe_fds[0]);
- base::ScopedFD read_pipe_write_fd(read_pipe_fds[1]);
- fd_map.push_back(std::make_pair(read_pipe_write_fd.get(), STDOUT_FILENO));
+ file_util::ScopedFD read_pipe_read_fd(&read_pipe_fds[0]);
+ file_util::ScopedFD read_pipe_write_fd(&read_pipe_fds[1]);
+ fd_map.push_back(std::make_pair(*read_pipe_write_fd, STDOUT_FILENO));
int write_pipe_fds[2] = {0};
if (HANDLE_EINTR(pipe(write_pipe_fds)) != 0) {
LOG(ERROR) << "Bad write pipe";
return false;
}
- base::ScopedFD write_pipe_read_fd(write_pipe_fds[0]);
- base::ScopedFD write_pipe_write_fd(write_pipe_fds[1]);
- fd_map.push_back(std::make_pair(write_pipe_read_fd.get(), STDIN_FILENO));
+ file_util::ScopedFD write_pipe_read_fd(&write_pipe_fds[0]);
+ file_util::ScopedFD write_pipe_write_fd(&write_pipe_fds[1]);
+ fd_map.push_back(std::make_pair(*write_pipe_read_fd, STDIN_FILENO));
base::LaunchOptions options;
options.fds_to_remap = &fd_map;
@@ -83,8 +82,8 @@
write_pipe_read_fd.reset();
read_pipe_write_fd.reset();
- *read_file = read_pipe_read_fd.release();
- *write_file = write_pipe_write_fd.release();
+ *read_file = *read_pipe_read_fd.release();
+ *write_file = *write_pipe_write_fd.release();
return true;
}
« no previous file with comments | « chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc ('k') | chrome/browser/mac/relauncher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698