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

Unified Diff: content/common/p2p_messages.h

Issue 149193002: Apply automatic range checking for enums across p2p_messages IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | content/public/common/p2p_socket_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/p2p_messages.h
diff --git a/content/common/p2p_messages.h b/content/common/p2p_messages.h
index d65a10b50a05c26e07228d63e85ba2f144656acd..814adc11936f283322ac65f259f58d9171b9beeb 100644
--- a/content/common/p2p_messages.h
+++ b/content/common/p2p_messages.h
@@ -16,9 +16,13 @@
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START P2PMsgStart
-IPC_ENUM_TRAITS(content::P2PSocketType)
-IPC_ENUM_TRAITS(net::DiffServCodePoint)
-IPC_ENUM_TRAITS(content::P2PSocketOption)
+IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType,
+ content::P2P_SOCKET_TYPE_LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption,
+ content::P2P_SOCKET_OPT_MAX - 1)
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(net::DiffServCodePoint,
+ net::DSCP_FIRST,
+ net::DSCP_LAST)
IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
IPC_STRUCT_TRAITS_MEMBER(name)
« no previous file with comments | « no previous file | content/public/common/p2p_socket_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698