Chromium Code Reviews| 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. |