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

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: 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
Index: net/websockets/websocket_throttle.h
diff --git a/net/websockets/websocket_throttle.h b/net/websockets/websocket_throttle.h
index 1c646588e1f2ec3d55ae7793569157cc05d6df12..7da1513f8d189303d90eff7931afdd3f6d000f41 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,12 @@ class NET_EXPORT_PRIVATE WebSocketThrottle {
private:
typedef std::deque<WebSocketJob*> ConnectingQueue;
- typedef base::hash_map<std::string, ConnectingQueue*> ConnectingAddressMap;
+ // hash_map<> specifies custom hashing functions differently on Windows and
+ // elsewhere, so we use map<> for portability.
Takashi Toyoshima 2013/01/24 09:51:00 As far as I know, comments on something removed is
Adam Rice 2013/01/25 04:07:36 Yes. I removed the comment.
+ typedef std::map<IPEndPoint, ConnectingQueue*> ConnectingAddressMap;
WebSocketThrottle();
- virtual ~WebSocketThrottle();
+ ~WebSocketThrottle();
Takashi Toyoshima 2013/01/24 09:51:00 Right. Also this class missed DISALLOW_COPY_AND_AS
Adam Rice 2013/01/25 04:07:36 I didn't notice that! Fixed.
friend struct DefaultSingletonTraits<WebSocketThrottle>;
// Key: string of host's address. Value: queue of sockets for the address.

Powered by Google App Engine
This is Rietveld 408576698