| Index: net/http/http_network_transaction.h
|
| diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
|
| index 198f1ce61ffe492414af43e9a4e608c3a788050f..aa49723c23c177834533405196b411582316e764 100644
|
| --- a/net/http/http_network_transaction.h
|
| +++ b/net/http/http_network_transaction.h
|
| @@ -17,6 +17,7 @@
|
| #include "crypto/ec_private_key.h"
|
| #include "net/base/net_error_details.h"
|
| #include "net/base/net_export.h"
|
| +#include "net/base/network_throttle_manager.h"
|
| #include "net/base/request_priority.h"
|
| #include "net/http/http_auth.h"
|
| #include "net/http/http_request_headers.h"
|
| @@ -50,7 +51,8 @@ struct HttpRequestInfo;
|
|
|
| class NET_EXPORT_PRIVATE HttpNetworkTransaction
|
| : public HttpTransaction,
|
| - public HttpStreamRequest::Delegate {
|
| + public HttpStreamRequest::Delegate,
|
| + public NetworkThrottleManager::ThrottleDelegate {
|
| public:
|
| HttpNetworkTransaction(RequestPriority priority,
|
| HttpNetworkSession* session);
|
| @@ -121,6 +123,9 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
|
| void OnQuicBroken() override;
|
| void GetConnectionAttempts(ConnectionAttempts* out) const override;
|
|
|
| + // NetworkThrottleManager::Delegate methods:
|
| + void OnThrottleStateChanged() override;
|
| +
|
| private:
|
| friend class HttpNetworkTransactionSSLTest;
|
|
|
| @@ -142,6 +147,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
|
| FlowControlNegativeSendWindowSize);
|
|
|
| enum State {
|
| + STATE_THROTTLE,
|
| + STATE_THROTTLE_COMPLETE,
|
| STATE_NOTIFY_BEFORE_CREATE_STREAM,
|
| STATE_CREATE_STREAM,
|
| STATE_CREATE_STREAM_COMPLETE,
|
| @@ -188,6 +195,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
|
| // argument receive the result from the previous state. If a method returns
|
| // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the
|
| // next state method as the result arg.
|
| + int DoThrottle();
|
| + int DoThrottleComplete();
|
| int DoNotifyBeforeCreateStream();
|
| int DoCreateStream();
|
| int DoCreateStreamComplete(int result);
|
| @@ -383,6 +392,11 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
|
| IPEndPoint remote_endpoint_;
|
| // Network error details for this transaction.
|
| NetErrorDetails net_error_details_;
|
| +
|
| + // Communicate lifetime of transaction to the throttler, and
|
| + // throttled state to the transaction.
|
| + std::unique_ptr<NetworkThrottleManager::Throttle> throttle_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
|
| };
|
|
|
|
|