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

Unified Diff: net/websockets/websocket_throttle.h

Issue 12033072: Include destination port for websocket throttling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix things caught by toyoshim. Created 7 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 | « net/websockets/websocket_job_spdy3_unittest.cc ('k') | net/websockets/websocket_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_throttle.h
diff --git a/net/websockets/websocket_throttle.h b/net/websockets/websocket_throttle.h
index 1c646588e1f2ec3d55ae7793569157cc05d6df12..713e8f829c291b9e0855efa06770cbc8706af2b2 100644
--- a/net/websockets/websocket_throttle.h
+++ b/net/websockets/websocket_throttle.h
@@ -6,9 +6,10 @@
#define NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_
#include <deque>
+#include <map>
#include <string>
-#include "base/hash_tables.h"
+#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"
template <typename T> struct DefaultSingletonTraits;
@@ -48,10 +49,10 @@ class NET_EXPORT_PRIVATE WebSocketThrottle {
private:
typedef std::deque<WebSocketJob*> ConnectingQueue;
- typedef base::hash_map<std::string, ConnectingQueue*> ConnectingAddressMap;
+ typedef std::map<IPEndPoint, ConnectingQueue*> ConnectingAddressMap;
WebSocketThrottle();
- virtual ~WebSocketThrottle();
+ ~WebSocketThrottle();
friend struct DefaultSingletonTraits<WebSocketThrottle>;
// Key: string of host's address. Value: queue of sockets for the address.
@@ -59,6 +60,8 @@ class NET_EXPORT_PRIVATE WebSocketThrottle {
// Queue of sockets for websockets in opening state.
ConnectingQueue queue_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebSocketThrottle);
};
} // namespace net
« no previous file with comments | « net/websockets/websocket_job_spdy3_unittest.cc ('k') | net/websockets/websocket_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698