Implement THROTTLED priority semantics.
BUG=600839
[email protected]
Committed: https://crrev.com/a3ea24ae1987d24b536859dad3d18537dd917242
Review-Url: https://codereview.chromium.org/2130493002
Cr-Original-Commit-Position: refs/heads/master@{#432558}
Cr-Commit-Position: refs/heads/master@{#433240}
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index daec89d..4853e90 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -135,7 +135,7 @@
void UnthrottleAllRequests() {
std::set<TestThrottle*> outstanding_throttles_copy(outstanding_throttles_);
for (auto& throttle : outstanding_throttles_copy) {
- if (throttle->IsThrottled())
+ if (throttle->IsBlocked())
throttle->Unthrottle();
}
}
@@ -162,7 +162,11 @@
~TestThrottle() override { throttler_->OnThrottleDestroyed(this); }
// Throttle
- bool IsThrottled() const override { return throttled_; }
+ bool IsBlocked() const override { return throttled_; }
+ RequestPriority Priority() const override {
+ NOTREACHED();
+ return IDLE;
+ }
void SetPriority(RequestPriority priority) override {
throttler_->SetPriorityCalled(priority);
}
@@ -176,7 +180,7 @@
EXPECT_TRUE(throttled_);
throttled_ = false;
- delegate_->OnThrottleStateChanged();
+ delegate_->OnThrottleUnblocked(this);
}
bool throttled_;