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

Unified Diff: mojo/embedder/platform_channel_utils_posix.h

Issue 292983007: Mojo: Make PlatformChannelRecvmsg() append handles to a deque instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 7 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: mojo/embedder/platform_channel_utils_posix.h
diff --git a/mojo/embedder/platform_channel_utils_posix.h b/mojo/embedder/platform_channel_utils_posix.h
index 044199f84e96cf939829dd9b0c103be68819169f..5146ce5df238509db0290223a7b14506053f80ca 100644
--- a/mojo/embedder/platform_channel_utils_posix.h
+++ b/mojo/embedder/platform_channel_utils_posix.h
@@ -8,11 +8,10 @@
#include <stddef.h>
#include <sys/types.h> // For |ssize_t|.
-#include <vector>
+#include <deque>
#include "base/memory/scoped_ptr.h"
#include "mojo/embedder/platform_handle.h"
-#include "mojo/embedder/platform_handle_vector.h"
#include "mojo/system/system_impl_export.h"
struct iovec; // Declared in <sys/uio.h>.
@@ -48,14 +47,13 @@ MOJO_SYSTEM_IMPL_EXPORT bool PlatformChannelSendHandles(PlatformHandle h,
size_t num_handles);
// Wrapper around |recvmsg()|, which will extract any attached file descriptors
-// (in the control message) to |PlatformHandle|s. (This also handles |EINTR|.)
-// If |*handles| is null and handles are received, a vector will be allocated;
-// otherwise, any handles received will be appended to the existing vector.
+// (in the control message) to |PlatformHandle|s (and append them to
+// |platform_handles|). (This also handles |EINTR|.)
MOJO_SYSTEM_IMPL_EXPORT ssize_t PlatformChannelRecvmsg(
PlatformHandle h,
void* buf,
size_t num_bytes,
- ScopedPlatformHandleVectorPtr* handles);
+ std::deque<PlatformHandle>* platform_handles);
} // namespace embedder
} // namespace mojo
« no previous file with comments | « mojo/embedder/platform_channel_pair_posix_unittest.cc ('k') | mojo/embedder/platform_channel_utils_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698