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

Side by Side Diff: net/websockets/websocket_throttle.h

Issue 14145003: Fix typo in net/websockets/websocket_throttle.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_ 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_ 6 #define NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 // of |job|. 36 // of |job|.
37 // If other job is using the same destination address, set |job| waiting. 37 // If other job is using the same destination address, set |job| waiting.
38 void PutInQueue(WebSocketJob* job); 38 void PutInQueue(WebSocketJob* job);
39 39
40 // Removes |job| from |queue_| and queues for the destination addresses 40 // Removes |job| from |queue_| and queues for the destination addresses
41 // of |job|. 41 // of |job|.
42 void RemoveFromQueue(WebSocketJob* job); 42 void RemoveFromQueue(WebSocketJob* job);
43 43
44 // Checks sockets waiting in |queue_| and check the socket is the front of 44 // Checks sockets waiting in |queue_| and check the socket is the front of
45 // every queue for the destination addresses of |socket|. 45 // every queue for the destination addresses of |socket|.
46 // If so, the socket can resume estabilshing connection, so wake up 46 // If so, the socket can resume establishing connection, so wake up
47 // the socket. 47 // the socket.
48 void WakeupSocketIfNecessary(); 48 void WakeupSocketIfNecessary();
49 49
50 private: 50 private:
51 typedef std::deque<WebSocketJob*> ConnectingQueue; 51 typedef std::deque<WebSocketJob*> ConnectingQueue;
52 typedef std::map<IPEndPoint, ConnectingQueue*> ConnectingAddressMap; 52 typedef std::map<IPEndPoint, ConnectingQueue*> ConnectingAddressMap;
53 53
54 WebSocketThrottle(); 54 WebSocketThrottle();
55 ~WebSocketThrottle(); 55 ~WebSocketThrottle();
56 friend struct DefaultSingletonTraits<WebSocketThrottle>; 56 friend struct DefaultSingletonTraits<WebSocketThrottle>;
57 57
58 // Key: string of host's address. Value: queue of sockets for the address. 58 // Key: string of host's address. Value: queue of sockets for the address.
59 ConnectingAddressMap addr_map_; 59 ConnectingAddressMap addr_map_;
60 60
61 // Queue of sockets for websockets in opening state. 61 // Queue of sockets for websockets in opening state.
62 ConnectingQueue queue_; 62 ConnectingQueue queue_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(WebSocketThrottle); 64 DISALLOW_COPY_AND_ASSIGN(WebSocketThrottle);
65 }; 65 };
66 66
67 } // namespace net 67 } // namespace net
68 68
69 #endif // NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_ 69 #endif // NET_WEBSOCKETS_WEBSOCKET_THROTTLE_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698