Chromium Code Reviews| 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 fc9dfde071188aed665ed8d623890428862a488c..e997e3a7efd4e3c8d1360291f53e3777d4c86fd1 100644 |
| --- a/net/url_request/url_request_throttler_simulation_unittest.cc |
| +++ b/net/url_request/url_request_throttler_simulation_unittest.cc |
| @@ -21,6 +21,7 @@ |
| #include "base/rand_util.h" |
| #include "base/time/time.h" |
| #include "net/base/request_priority.h" |
| +#include "net/url_request/url_request_context.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" |
| @@ -275,6 +276,8 @@ class Server : public DiscreteTimeSimulation::Actor { |
| return output; |
| } |
| + URLRequestContext* context() { return &context_; } |
|
pauljensen
2014/07/31 15:38:17
const?
mmenke
2014/07/31 16:03:14
Done. Left on my own, I never mark functions that
pauljensen
2014/07/31 16:25:51
The return type could be a const reference.
mmenke
2014/07/31 19:02:12
Done. In fact it has to be. Since the TestURLReq
|
| + |
| private: |
| TimeTicks now_; |
| TimeTicks start_downtime_; // Can be 0 to say "no downtime". |
| @@ -427,7 +430,9 @@ class Requester : public DiscreteTimeSimulation::Actor { |
| if (throttler_entry_->fake_now() - time_of_last_attempt_ > |
| effective_delay) { |
| - if (!throttler_entry_->ShouldRejectRequest(server_->mock_request())) { |
| + if (!throttler_entry_->ShouldRejectRequest( |
| + server_->mock_request(), |
| + server_->context()->network_delegate())) { |
| int status_code = server_->HandleRequest(); |
| MockURLRequestThrottlerHeaderAdapter response_headers(status_code); |
| throttler_entry_->UpdateWithResponse(std::string(), &response_headers); |