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

Unified Diff: ipc/ipc_channel.h

Issue 6334061: Clean up channel modes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up agl's comments Created 9 years, 11 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 | « chrome/plugin/plugin_channel_base.cc ('k') | ipc/ipc_channel_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 3b8afd8b8f9cc6f95f7f22d55ebfd37361fc50bf..91d9f2b26b31c01ab976464738b8cd85f6cbbe3b 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -62,17 +62,26 @@ class Channel : public Message::Sender {
#endif // OS_POSIX
};
+ // Flags to test modes
+ enum ModeFlags {
+ MODE_NO_FLAG = 0x0,
+ MODE_SERVER_FLAG = 0x1,
+ MODE_CLIENT_FLAG = 0x2,
+ MODE_NAMED_FLAG = 0x4
+ };
+
+ // Some Standard Modes
enum Mode {
- MODE_NONE,
- MODE_SERVER,
- MODE_CLIENT,
+ MODE_NONE = MODE_NO_FLAG,
+ MODE_SERVER = MODE_SERVER_FLAG,
+ MODE_CLIENT = MODE_CLIENT_FLAG,
// Channels on Windows are named by default and accessible from other
// processes. On POSIX channels are anonymous by default and not accessible
// from other processes. Named channels work via named unix domain sockets.
- // On Windows MODE_NAMED_SERVER == MODE_SERVER and
- // MODE_NAMED_CLIENT == MODE_CLIENT.
- MODE_NAMED_SERVER,
- MODE_NAMED_CLIENT,
+ // On Windows MODE_NAMED_SERVER is equivalent to MODE_SERVER and
+ // MODE_NAMED_CLIENT is equivalent to MODE_CLIENT.
+ MODE_NAMED_SERVER = MODE_SERVER_FLAG | MODE_NAMED_FLAG,
+ MODE_NAMED_CLIENT = MODE_CLIENT_FLAG | MODE_NAMED_FLAG,
};
enum {
« no previous file with comments | « chrome/plugin/plugin_channel_base.cc ('k') | ipc/ipc_channel_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698