Chromium Code Reviews| Index: net/socket/client_socket_pool.h |
| diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h |
| index e1785a3a7c7bf3c9aee0f9e27b21fd57d03e1c18..7dee8c3bfc3ba584ef4c2a183bbdd9778997da96 100644 |
| --- a/net/socket/client_socket_pool.h |
| +++ b/net/socket/client_socket_pool.h |
| @@ -61,11 +61,14 @@ class NET_EXPORT LowerLayeredPool { |
| // A ClientSocketPool is used to restrict the number of sockets open at a time. |
| // It also maintains a list of idle persistent sockets. |
| // |
| +// Subclasses must also have an inner class SocketParams which is |
| +// the type for the |params| argument in RequestSocket() and |
| +// RequestSockets() below. |
| class NET_EXPORT ClientSocketPool : public LowerLayeredPool { |
| public: |
| - // Subclasses must also have an inner class SocketParams which is |
| - // the type for the |params| argument in RequestSocket() and |
| - // RequestSockets() below. |
| + // Indicates whether a request for a socket should ignore the SocketPool's |
| + // global and per-group socket limits. |
| + enum class IgnoreLimits { DISABLED, ENABLED }; |
|
eroman
2016/01/27 20:15:12
Not sure what to suggest in its place, but "ENABLE
mmenke
2016/01/27 20:37:27
Hrm... IgnoreLimits::DEFAULT / NORMAL seems less
eroman
2016/01/27 20:40:21
ok
|
| // Requests a connected socket for a group_name. |
| // |
| @@ -96,9 +99,12 @@ class NET_EXPORT ClientSocketPool : public LowerLayeredPool { |
| // client of completion. |
| // |
| // Profiling information for the request is saved to |net_log| if non-NULL. |
| + // |
| + // If |ignore_limits| is ENABLED, priority must be HIGHEST. |
| virtual int RequestSocket(const std::string& group_name, |
| const void* params, |
| RequestPriority priority, |
| + IgnoreLimits ignore_limits, |
| ClientSocketHandle* handle, |
| const CompletionCallback& callback, |
| const BoundNetLog& net_log) = 0; |