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

Unified Diff: mojo/system/message_pipe.cc

Issue 262093003: Mojo: Add/use |typedef std::vector<scoped_refptr<Dispatcher> > DispatcherVector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « mojo/system/message_pipe.h ('k') | mojo/system/message_pipe_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe.cc
diff --git a/mojo/system/message_pipe.cc b/mojo/system/message_pipe.cc
index e25ac1c3b3c50448752d0c0e4dfa38e822a0269b..1df652737f626441e5370985327c2b5e835187aa 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -82,13 +82,12 @@ MojoResult MessagePipe::WriteMessage(
transports);
}
-MojoResult MessagePipe::ReadMessage(
- unsigned port,
- void* bytes,
- uint32_t* num_bytes,
- std::vector<scoped_refptr<Dispatcher> >* dispatchers,
- uint32_t* num_dispatchers,
- MojoReadMessageFlags flags) {
+MojoResult MessagePipe::ReadMessage(unsigned port,
+ void* bytes,
+ uint32_t* num_bytes,
+ DispatcherVector* dispatchers,
+ uint32_t* num_dispatchers,
+ MojoReadMessageFlags flags) {
DCHECK(port == 0 || port == 1);
base::AutoLock locker(lock_);
@@ -259,8 +258,7 @@ MojoResult MessagePipe::AttachTransportsNoLock(
// Clone the dispatchers and attach them to the message. (This must be done as
// a separate loop, since we want to leave the dispatchers alone on failure.)
- scoped_ptr<std::vector<scoped_refptr<Dispatcher> > >
- dispatchers(new std::vector<scoped_refptr<Dispatcher> >());
+ scoped_ptr<DispatcherVector> dispatchers(new DispatcherVector());
dispatchers->reserve(transports->size());
for (size_t i = 0; i < transports->size(); i++) {
if ((*transports)[i].is_valid()) {
« no previous file with comments | « mojo/system/message_pipe.h ('k') | mojo/system/message_pipe_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698