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

Unified Diff: net/http/http_network_transaction.cc

Issue 2511493002: Revert of Implement THROTTLED priority semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NetworkStreamThrottler
Patch Set: Created 4 years, 1 month 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/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index c31f04ba6e4db4a25931ddbd51eba5d7ddafbefb..3d39fd6e139736aec6f28279d497fe901c4a2468 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -593,10 +593,9 @@
*out = connection_attempts_;
}
-void HttpNetworkTransaction::OnThrottleUnblocked(
- NetworkThrottleManager::Throttle* throttle) {
+void HttpNetworkTransaction::OnThrottleStateChanged() {
// TODO(rdsmith): This DCHECK is dependent on the only transition
- // being from blocked->unblocked. That is true right now, but may not
+ // being from throttled->unthrottled. That is true right now, but may not
// be so in the future.
DCHECK_EQ(STATE_THROTTLE_COMPLETE, next_state_);
@@ -799,12 +798,11 @@
}
int HttpNetworkTransaction::DoThrottle() {
- DCHECK(!throttle_);
throttle_ = session_->throttler()->CreateThrottle(
this, priority_, (request_->load_flags & LOAD_IGNORE_LIMITS) != 0);
next_state_ = STATE_THROTTLE_COMPLETE;
- if (throttle_->IsBlocked()) {
+ if (throttle_->IsThrottled()) {
net_log_.BeginEvent(NetLogEventType::HTTP_TRANSACTION_THROTTLED);
return ERR_IO_PENDING;
}
@@ -814,7 +812,7 @@
int HttpNetworkTransaction::DoThrottleComplete() {
DCHECK(throttle_);
- DCHECK(!throttle_->IsBlocked());
+ DCHECK(!throttle_->IsThrottled());
next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM;
« no previous file with comments | « net/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698