Index: net/url_request/url_request_throttler_simulation_unittest.cc |
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc |
index 256d343f45e20b0e9e5c94de8dbc9c931d1bc015..a3b8ce0e68f1d5231e956d98e8f9264b0c91a117 100644 |
--- a/net/url_request/url_request_throttler_simulation_unittest.cc |
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc |
@@ -159,7 +159,7 @@ class Server : public DiscreteTimeSimulation::Actor { |
++num_current_tick_queries_; |
if (!start_downtime_.is_null() && |
start_downtime_ < now_ && now_ < end_downtime_) { |
- // TODO(joi): For the simulation measuring the increase in perceived |
+ // For the simulation measuring the increase in perceived |
// downtime, it might be interesting to count separately the |
// queries seen by the server (assuming a front-end reverse proxy |
// is what actually serves up the 503s in this case) so that we could |
@@ -285,12 +285,6 @@ class Server : public DiscreteTimeSimulation::Actor { |
DISALLOW_COPY_AND_ASSIGN(Server); |
}; |
-class TestingURLRequestThrottlerManager : public URLRequestThrottlerManager { |
- public: |
- TestingURLRequestThrottlerManager() : URLRequestThrottlerManager() { |
- } |
-}; |
- |
// Mock throttler entry used by Requester class. |
class MockURLRequestThrottlerEntry : public URLRequestThrottlerEntry { |
public: |
@@ -427,7 +421,7 @@ class Requester : public DiscreteTimeSimulation::Actor { |
if (throttler_entry_->fake_now() - time_of_last_attempt_ > |
effective_delay) { |
- if (!throttler_entry_->ShouldRejectRequest(0)) { |
+ if (!throttler_entry_->ShouldRejectRequest(NULL, 0)) { |
int status_code = server_->HandleRequest(); |
MockURLRequestThrottlerHeaderAdapter response_headers(status_code); |
throttler_entry_->UpdateWithResponse("", &response_headers); |
@@ -493,7 +487,7 @@ void SimulateAttack(Server* server, |
const size_t kNumAttackers = 50; |
const size_t kNumClients = 50; |
DiscreteTimeSimulation simulation; |
- TestingURLRequestThrottlerManager manager; |
+ URLRequestThrottlerManager manager; |
ScopedVector<Requester> requesters; |
for (size_t i = 0; i < kNumAttackers; ++i) { |
// Use a tiny time_between_requests so the attackers will ping the |
@@ -596,7 +590,7 @@ double SimulateDowntime(const TimeDelta& duration, |
Server server(std::numeric_limits<int>::max(), 1.0); |
server.SetDowntime(start_downtime, duration); |
- TestingURLRequestThrottlerManager manager; |
+ URLRequestThrottlerManager manager; |
scoped_refptr<MockURLRequestThrottlerEntry> throttler_entry( |
new MockURLRequestThrottlerEntry(&manager)); |
if (!enable_throttling) |