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

Unified Diff: mojo/edk/system/dispatcher.h

Issue 1942423002: EDK: Move DispatcherTransport to handle_transport.*. (Closed) Base URL: https://github.com/domokit/mojo.git@work789_edk_handle_9
Patch Set: rebased Created 4 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/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.h
diff --git a/mojo/edk/system/dispatcher.h b/mojo/edk/system/dispatcher.h
index fc72390402088d7e92ccb8a3dddbc975648b92a8..1078bdd4c6b9399a88f0e6906d0fd9264d07e089 100644
--- a/mojo/edk/system/dispatcher.h
+++ b/mojo/edk/system/dispatcher.h
@@ -444,43 +444,6 @@ class Dispatcher : public util::RefCountedThreadSafe<Dispatcher> {
MOJO_DISALLOW_COPY_AND_ASSIGN(Dispatcher);
};
-// Wrapper around a |Dispatcher| pointer, while it's being processed to be
-// passed in a message pipe. See the comment about
-// |Dispatcher::HandleTableAccess| for more details.
-//
-// Note: This class is deliberately "thin" -- no more expensive than a
-// |Dispatcher*|.
-class DispatcherTransport final {
- public:
- DispatcherTransport() : dispatcher_(nullptr) {}
-
- void End() MOJO_NOT_THREAD_SAFE;
-
- Dispatcher::Type GetType() const { return dispatcher_->GetType(); }
- bool IsBusy() const MOJO_NOT_THREAD_SAFE {
- return dispatcher_->IsBusyNoLock();
- }
- void Close() MOJO_NOT_THREAD_SAFE { dispatcher_->CloseNoLock(); }
- util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndClose(
- MessagePipe* message_pipe,
- unsigned port) MOJO_NOT_THREAD_SAFE {
- return dispatcher_->CreateEquivalentDispatcherAndCloseNoLock(message_pipe,
- port);
- }
-
- bool is_valid() const { return !!dispatcher_; }
-
- private:
- friend class Dispatcher::HandleTableAccess;
-
- explicit DispatcherTransport(Dispatcher* dispatcher)
- : dispatcher_(dispatcher) {}
-
- Dispatcher* dispatcher_;
-
- // Copy and assign allowed.
-};
-
// So logging macros and |DCHECK_EQ()|, etc. work.
inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) {
return out << static_cast<int>(type);
« no previous file with comments | « mojo/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698