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..35514fc9a798c03c6a2f2911ec063889fab6e737 100644 |
--- a/net/url_request/url_request_throttler_simulation_unittest.cc |
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc |
@@ -20,6 +20,7 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/rand_util.h" |
#include "base/time.h" |
+#include "net/url_request/url_request_test_util.h" |
#include "net/url_request/url_request_throttler_manager.h" |
#include "net/url_request/url_request_throttler_test_support.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -159,7 +160,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 |
@@ -287,8 +288,11 @@ class Server : public DiscreteTimeSimulation::Actor { |
class TestingURLRequestThrottlerManager : public URLRequestThrottlerManager { |
public: |
- TestingURLRequestThrottlerManager() : URLRequestThrottlerManager() { |
+ TestingURLRequestThrottlerManager() : URLRequestThrottlerManager(&delegate_) { |
} |
+ |
+ private: |
+ TestURLRequestThrottlerManagerDelegate delegate_; |
}; |
// Mock throttler entry used by Requester class. |
@@ -427,7 +431,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); |