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

Unified Diff: net/socket/client_socket_pool.h

Issue 1580903002: Convert ignore_limits from a SocketParam to a socket request argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RespectLimits Created 4 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/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..68946a85dea6733154daede5a3c7582b88f205a2 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 or not a request for a socket should respect the
+ // SocketPool's global and per-group socket limits.
+ enum class RespectLimits { DISABLED, ENABLED };
// 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 |respect_limits| is DISABLED, priority must be HIGHEST.
virtual int RequestSocket(const std::string& group_name,
const void* params,
RequestPriority priority,
+ RespectLimits respect_limits,
ClientSocketHandle* handle,
const CompletionCallback& callback,
const BoundNetLog& net_log) = 0;
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698