Index: components/nacl/loader/nacl_helper_linux.cc |
diff --git a/components/nacl/loader/nacl_helper_linux.cc b/components/nacl/loader/nacl_helper_linux.cc |
index 010239aaa467eb986c7d65d3b9e5eb21de9cf5d0..9822f24c611964341c8aea36b0ef2f627dbecd45 100644 |
--- a/components/nacl/loader/nacl_helper_linux.cc |
+++ b/components/nacl/loader/nacl_helper_linux.cc |
@@ -16,6 +16,7 @@ |
#include <sys/types.h> |
#include <string> |
+#include <utility> |
#include <vector> |
#include "base/at_exit.h" |
@@ -23,7 +24,6 @@ |
#include "base/files/scoped_file.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/memory/scoped_vector.h" |
#include "base/message_loop/message_loop.h" |
#include "base/posix/eintr_wrapper.h" |
#include "base/posix/global_descriptors.h" |
@@ -132,7 +132,7 @@ void BecomeNaClLoader(base::ScopedFD browser_fd, |
} |
// Start the NaCl loader in a child created by the NaCl loader Zygote. |
-void ChildNaClLoaderInit(ScopedVector<base::ScopedFD> child_fds, |
+void ChildNaClLoaderInit(std::vector<base::ScopedFD> child_fds, |
const NaClLoaderSystemInfo& system_info, |
bool uses_nonsfi_mode, |
nacl::NaClSandbox* nacl_sandbox, |
@@ -143,25 +143,25 @@ void ChildNaClLoaderInit(ScopedVector<base::ScopedFD> child_fds, |
// Ping the PID oracle socket. |
CHECK(content::SendZygoteChildPing( |
- child_fds[content::ZygoteForkDelegate::kPIDOracleFDIndex]->get())); |
+ child_fds[content::ZygoteForkDelegate::kPIDOracleFDIndex].get())); |
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
switches::kProcessChannelID, channel_id); |
// Save the browser socket and close the rest. |
base::ScopedFD browser_fd( |
- child_fds[content::ZygoteForkDelegate::kBrowserFDIndex]->Pass()); |
+ std::move(child_fds[content::ZygoteForkDelegate::kBrowserFDIndex])); |
child_fds.clear(); |
BecomeNaClLoader( |
- browser_fd.Pass(), system_info, uses_nonsfi_mode, nacl_sandbox); |
+ std::move(browser_fd), system_info, uses_nonsfi_mode, nacl_sandbox); |
_exit(1); |
} |
// Handle a fork request from the Zygote. |
// Some of this code was lifted from |
// content/browser/zygote_main_linux.cc:ForkWithRealPid() |
-bool HandleForkRequest(ScopedVector<base::ScopedFD> child_fds, |
+bool HandleForkRequest(std::vector<base::ScopedFD> child_fds, |
const NaClLoaderSystemInfo& system_info, |
nacl::NaClSandbox* nacl_sandbox, |
base::PickleIterator* input_iter, |
@@ -207,7 +207,7 @@ bool HandleForkRequest(ScopedVector<base::ScopedFD> child_fds, |
// is fine. |
sandbox::NamespaceSandbox::InstallDefaultTerminationSignalHandlers(); |
} |
- ChildNaClLoaderInit(child_fds.Pass(), |
+ ChildNaClLoaderInit(std::move(child_fds), |
system_info, |
uses_nonsfi_mode, |
nacl_sandbox, |
@@ -261,7 +261,7 @@ bool HandleGetTerminationStatusRequest(base::PickleIterator* input_iter, |
// Reply to the command on |reply_fds|. |
bool HonorRequestAndReply(int reply_fd, |
int command_type, |
- ScopedVector<base::ScopedFD> attached_fds, |
+ std::vector<base::ScopedFD> attached_fds, |
const NaClLoaderSystemInfo& system_info, |
nacl::NaClSandbox* nacl_sandbox, |
base::PickleIterator* input_iter) { |
@@ -270,7 +270,7 @@ bool HonorRequestAndReply(int reply_fd, |
// Commands must write anything to send back to |write_pickle|. |
switch (command_type) { |
case nacl::kNaClForkRequest: |
- have_to_reply = HandleForkRequest(attached_fds.Pass(), |
+ have_to_reply = HandleForkRequest(std::move(attached_fds), |
system_info, |
nacl_sandbox, |
input_iter, |
@@ -300,7 +300,7 @@ bool HonorRequestAndReply(int reply_fd, |
bool HandleZygoteRequest(int zygote_ipc_fd, |
const NaClLoaderSystemInfo& system_info, |
nacl::NaClSandbox* nacl_sandbox) { |
- ScopedVector<base::ScopedFD> fds; |
+ std::vector<base::ScopedFD> fds; |
char buf[kNaClMaxIPCMessageLength]; |
const ssize_t msglen = base::UnixDomainSocket::RecvMsg(zygote_ipc_fd, |
&buf, sizeof(buf), &fds); |
@@ -329,7 +329,7 @@ bool HandleZygoteRequest(int zygote_ipc_fd, |
} |
return HonorRequestAndReply(zygote_ipc_fd, |
command_type, |
- fds.Pass(), |
+ std::move(fds), |
system_info, |
nacl_sandbox, |
&read_iter); |