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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 2130493002: Implement THROTTLED priority semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NetworkStreamThrottler
Patch Set: Fix use of message_loop_ in Android tests. 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.cc ('k') | net/net.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index daec89d43ff8a37caf250ffcb71cb68f0713b6fc..4853e901c71526142d0c832ae6d9c7e4960b77b2 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -135,7 +135,7 @@ class TestNetworkStreamThrottler : public NetworkThrottleManager {
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 @@ class TestNetworkStreamThrottler : public NetworkThrottleManager {
~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 @@ class TestNetworkStreamThrottler : public NetworkThrottleManager {
EXPECT_TRUE(throttled_);
throttled_ = false;
- delegate_->OnThrottleStateChanged();
+ delegate_->OnThrottleUnblocked(this);
}
bool throttled_;
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698