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

Unified Diff: content/common/p2p_socket_type.h

Issue 2140693002: Support port range for IPC P2P UDP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove unused constructor from test Created 4 years, 5 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 | « content/common/p2p_messages.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/p2p_socket_type.h
diff --git a/content/common/p2p_socket_type.h b/content/common/p2p_socket_type.h
index 0de0e20acdd8c67e32bef89ce8f0544e8ce03b6a..d8d217274893120315eddb33cb771f44ea05a7c8 100644
--- a/content/common/p2p_socket_type.h
+++ b/content/common/p2p_socket_type.h
@@ -70,6 +70,18 @@ struct P2PSendPacketMetrics {
base::TimeTicks send_time;
};
+// Struct that carries a port range.
+struct P2PPortRange {
+ P2PPortRange() : P2PPortRange(0, 0) {}
+ P2PPortRange(uint16_t min_port, uint16_t max_port)
+ : min_port(min_port), max_port(max_port) {
+ DCHECK_LE(min_port, max_port);
+ DCHECK((min_port == 0 && max_port == 0) || min_port > 0);
+ }
+ uint16_t min_port;
+ uint16_t max_port;
+};
+
} // namespace content
#endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698