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

Unified Diff: mojo/system/message_pipe.h

Issue 27060003: Mojo: Abstract out the endpoints of MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 2 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/system/message_pipe.h
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index e4c0c40de686c9ae5f81e1fd8a378d707a629231..d36ef20a8a3ff57356c535a27e16c9d88d442d09 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -5,20 +5,17 @@
#ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_
#define MOJO_SYSTEM_MESSAGE_PIPE_H_
-#include <deque>
-
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/system_export.h"
-#include "mojo/system/waiter_list.h"
namespace mojo {
namespace system {
-class MessageInTransit;
+class MessagePipeEndpoint;
class Waiter;
// |MessagePipe| is the secondary object implementing a message pipe (see the
@@ -55,17 +52,8 @@ class MOJO_SYSTEM_EXPORT MessagePipe :
friend class base::RefCountedThreadSafe<MessagePipe>;
virtual ~MessagePipe();
- MojoWaitFlags SatisfiedFlagsNoLock(unsigned port);
- MojoWaitFlags SatisfiableFlagsNoLock(unsigned port);
-
base::Lock lock_; // Protects the following members.
- bool is_open_[2];
- // These are *incoming* queues for their corresponding ports. It owns its
- // contents.
- // TODO(vtl): When possible (with C++11), convert the plain pointers to
- // scoped_ptr/unique_ptr.
- std::deque<MessageInTransit*> message_queues_[2];
- WaiterList waiter_lists_[2];
+ scoped_ptr<MessagePipeEndpoint> endpoints_[2];
DISALLOW_COPY_AND_ASSIGN(MessagePipe);
};

Powered by Google App Engine
This is Rietveld 408576698