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

Unified Diff: ipc/ipc_channel_handle.h

Issue 2301103003: Use ChannelMojo for NaCl PPAPI channels. (Closed)
Patch Set: Created 4 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: ipc/ipc_channel_handle.h
diff --git a/ipc/ipc_channel_handle.h b/ipc/ipc_channel_handle.h
index 2e9dc3e57f37f424934ac1a7f832763d1f2a80f1..f609d8808dab35c62f241bd1a5f94143a5323962 100644
--- a/ipc/ipc_channel_handle.h
+++ b/ipc/ipc_channel_handle.h
@@ -50,6 +50,17 @@ struct ChannelHandle {
#endif // defined(OS_POSIX)
ChannelHandle(mojo::MessagePipeHandle h) : mojo_handle(h) {}
+ bool is_mojo_channel_handle() const {
+#if defined(OS_WIN)
+ if (pipe.handle)
+ return false;
+#elif defined(OS_POSIX)
+ if (socket.fd != -1)
+ return false;
+#endif // defined(OS_POSIX)
+ return mojo_handle.is_valid();
Mark Seaborn 2016/10/17 21:28:26 How about also: "&& name.empty()"
Sam McNally 2016/10/17 23:01:17 Done.
+ }
+
std::string name;
#if defined(OS_POSIX)
base::FileDescriptor socket;

Powered by Google App Engine
This is Rietveld 408576698