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

Unified Diff: sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc

Issue 1508213002: Replace ScopedVector<ScopedFD> with std::vector<ScopedFD> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: danakj feedback Created 5 years 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
« no previous file with comments | « extensions/shell/app/shell_main_delegate.h ('k') | sandbox/linux/syscall_broker/broker_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
diff --git a/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc b/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
index 9d79bff1c6afe7e6b8d4ab233afcf5cff3bb34f8..5e8a239a965fa1c63722f1f21252a02444e2b4a5 100644
--- a/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
+++ b/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
@@ -10,11 +10,11 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <utility>
#include <vector>
#include "base/files/scoped_file.h"
#include "base/logging.h"
-#include "base/memory/scoped_vector.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/unix_domain_socket_linux.h"
#include "base/process/process.h"
@@ -95,14 +95,14 @@ void RecvHello(int fd,
// Extra receiving buffer space to make sure we really received only
// sizeof(kHello) bytes and it wasn't just truncated to fit the buffer.
char buf[sizeof(kHello) + 1];
- ScopedVector<base::ScopedFD> message_fds;
+ std::vector<base::ScopedFD> message_fds;
ssize_t n = base::UnixDomainSocket::RecvMsgWithPid(
fd, buf, sizeof(buf), &message_fds, sender_pid);
CHECK_EQ(sizeof(kHello), static_cast<size_t>(n));
CHECK_EQ(0, memcmp(buf, kHello, sizeof(kHello)));
CHECK_EQ(1U, message_fds.size());
if (write_pipe)
- write_pipe->swap(*message_fds[0]);
+ std::swap(*write_pipe, message_fds[0]);
}
// Check that receiving PIDs works across a fork().
« no previous file with comments | « extensions/shell/app/shell_main_delegate.h ('k') | sandbox/linux/syscall_broker/broker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698