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

Unified Diff: net/base/load_states_list.h

Issue 1901533002: Implementation of network level throttler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Destroy transaction before session in QuicUploadWriteError. Created 4 years, 2 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 | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | net/base/network_throttle_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/load_states_list.h
diff --git a/net/base/load_states_list.h b/net/base/load_states_list.h
index 319991773144894f9f207bf30f19d08ecaf79959..5e850fb622220d3b6cb02a539897032cead220f3 100644
--- a/net/base/load_states_list.h
+++ b/net/base/load_states_list.h
@@ -15,84 +15,88 @@
// called Read yet).
LOAD_STATE(IDLE, 0)
+// This state corresponds to a resource load that is throttled by the
+// network layer waiting for some other resource load or loads to complete.
+LOAD_STATE(THROTTLED, 1)
+
// When a socket pool group is below the maximum number of sockets allowed per
// group, but a new socket cannot be created due to the per-pool socket limit,
// this state is returned by all requests for the group waiting on an idle
// connection, except those that may be serviced by a pending new connection.
-LOAD_STATE(WAITING_FOR_STALLED_SOCKET_POOL, 1)
+LOAD_STATE(WAITING_FOR_STALLED_SOCKET_POOL, 2)
// When a socket pool group has reached the maximum number of sockets allowed
// per group, this state is returned for all requests that don't have a socket,
// except those that correspond to a pending new connection.
-LOAD_STATE(WAITING_FOR_AVAILABLE_SOCKET, 2)
+LOAD_STATE(WAITING_FOR_AVAILABLE_SOCKET, 3)
// This state indicates that the URLRequest delegate has chosen to block this
// request before it was sent over the network. When in this state, the
// delegate should set a load state parameter on the URLRequest describing
// the nature of the delay (i.e. "Waiting for <description given by
// delegate>").
-LOAD_STATE(WAITING_FOR_DELEGATE, 3)
+LOAD_STATE(WAITING_FOR_DELEGATE, 4)
// This state corresponds to a resource load that is blocked waiting for
// access to a resource in the cache. If multiple requests are made for the
// same resource, the first request will be responsible for writing (or
// updating) the cache entry and the second request will be deferred until
// the first completes. This may be done to optimize for cache reuse.
-LOAD_STATE(WAITING_FOR_CACHE, 4)
+LOAD_STATE(WAITING_FOR_CACHE, 5)
// This state corresponds to a resource load that is blocked waiting for
// access to a resource in the AppCache.
// Note: This is a layering violation, but being the only one it's not that
// bad. TODO(rvargas): Reconsider what to do if we need to add more.
-LOAD_STATE(WAITING_FOR_APPCACHE, 5)
+LOAD_STATE(WAITING_FOR_APPCACHE, 6)
// This state corresponds to a resource being blocked waiting for the
// PAC script to be downloaded.
-LOAD_STATE(DOWNLOADING_PROXY_SCRIPT, 6)
+LOAD_STATE(DOWNLOADING_PROXY_SCRIPT, 7)
// This state corresponds to a resource load that is blocked waiting for a
// proxy autoconfig script to return a proxy server to use.
-LOAD_STATE(RESOLVING_PROXY_FOR_URL, 7)
+LOAD_STATE(RESOLVING_PROXY_FOR_URL, 8)
// This state corresponds to a resource load that is blocked waiting for a
// proxy autoconfig script to return a proxy server to use, but that proxy
// script is busy resolving the IP address of a host.
-LOAD_STATE(RESOLVING_HOST_IN_PROXY_SCRIPT, 8)
+LOAD_STATE(RESOLVING_HOST_IN_PROXY_SCRIPT, 9)
// This state indicates that we're in the process of establishing a tunnel
// through the proxy server.
-LOAD_STATE(ESTABLISHING_PROXY_TUNNEL, 9)
+LOAD_STATE(ESTABLISHING_PROXY_TUNNEL, 10)
// This state corresponds to a resource load that is blocked waiting for a
// host name to be resolved. This could either indicate resolution of the
// origin server corresponding to the resource or to the host name of a proxy
// server used to fetch the resource.
-LOAD_STATE(RESOLVING_HOST, 10)
+LOAD_STATE(RESOLVING_HOST, 11)
// This state corresponds to a resource load that is blocked waiting for a
// TCP connection (or other network connection) to be established. HTTP
// requests that reuse a keep-alive connection skip this state.
-LOAD_STATE(CONNECTING, 11)
+LOAD_STATE(CONNECTING, 12)
// This state corresponds to a resource load that is blocked waiting for the
// SSL handshake to complete.
-LOAD_STATE(SSL_HANDSHAKE, 12)
+LOAD_STATE(SSL_HANDSHAKE, 13)
// This state corresponds to a resource load that is blocked waiting to
// completely upload a request to a server. In the case of a HTTP POST
// request, this state includes the period of time during which the message
// body is being uploaded.
-LOAD_STATE(SENDING_REQUEST, 13)
+LOAD_STATE(SENDING_REQUEST, 14)
// This state corresponds to a resource load that is blocked waiting for the
// response to a network request. In the case of a HTTP transaction, this
// corresponds to the period after the request is sent and before all of the
// response headers have been received.
-LOAD_STATE(WAITING_FOR_RESPONSE, 14)
+LOAD_STATE(WAITING_FOR_RESPONSE, 15)
// This state corresponds to a resource load that is blocked waiting for a
// read to complete. In the case of a HTTP transaction, this corresponds to
// the period after the response headers have been received and before all of
// the response body has been downloaded. (NOTE: This state only applies for
// an URLRequest while there is an outstanding Read operation.)
-LOAD_STATE(READING_RESPONSE, 15)
+LOAD_STATE(READING_RESPONSE, 16)
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | net/base/network_throttle_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698