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

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: revert gratuitous .at(0) change back to [0] 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
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..b9cef926a6ced0e42da005ba5b1011cc26e39222 100644
--- a/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
+++ b/sandbox/linux/integration_tests/namespace_unix_domain_socket_unittest.cc
@@ -14,7 +14,6 @@
#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 +94,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]);
+ write_pipe->swap(message_fds.at(0));
danakj 2015/12/08 23:44:48 more at() paranoia? or wanna drop a comment why at
mdempsky 2015/12/09 00:45:37 Reverted.
}
// Check that receiving PIDs works across a fork().

Powered by Google App Engine
This is Rietveld 408576698