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

Unified Diff: net/http/http_network_transaction.cc

Issue 2130493002: Implement THROTTLED priority semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NetworkStreamThrottler
Patch Set: Incorporated comments, simplified timing code. 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
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index e5d993d0d84061d6cbe42c3335e8d1c207a3d3f4..c5c5ba27a7115557f5d7d6310a0ea4bcbe4b6d9f 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -580,9 +580,10 @@ void HttpNetworkTransaction::GetConnectionAttempts(
*out = connection_attempts_;
}
-void HttpNetworkTransaction::OnThrottleStateChanged() {
+void HttpNetworkTransaction::OnThrottleUnblocked(
+ NetworkThrottleManager::Throttle* throttle) {
// TODO(rdsmith): This DCHECK is dependent on the only transition
- // being from throttled->unthrottled. That is true right now, but may not
+ // being from blocked->unblocked. That is true right now, but may not
// be so in the future.
DCHECK_EQ(STATE_THROTTLE_COMPLETE, next_state_);
@@ -785,7 +786,7 @@ int HttpNetworkTransaction::DoThrottle() {
this, priority_, (request_->load_flags & LOAD_IGNORE_LIMITS) != 0);
next_state_ = STATE_THROTTLE_COMPLETE;
- if (throttle_->IsThrottled()) {
+ if (throttle_->IsBlocked()) {
net_log_.BeginEvent(NetLogEventType::HTTP_TRANSACTION_THROTTLED);
return ERR_IO_PENDING;
}
@@ -795,7 +796,7 @@ int HttpNetworkTransaction::DoThrottle() {
int HttpNetworkTransaction::DoThrottleComplete() {
DCHECK(throttle_);
- DCHECK(!throttle_->IsThrottled());
+ DCHECK(!throttle_->IsBlocked());
next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM;

Powered by Google App Engine
This is Rietveld 408576698