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

Unified Diff: net/url_request/url_request_throttler_entry.cc

Issue 12328072: Remove some calls to URLRequestContext::network_delegate(). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 years, 10 months 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
Index: net/url_request/url_request_throttler_entry.cc
diff --git a/net/url_request/url_request_throttler_entry.cc b/net/url_request/url_request_throttler_entry.cc
index 0899ed41ea5c629ecba95d44a0dffad6dfcc66bc..fc82ff1b71cd94f344b4e94a9eb8c2ec1e5da469 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -153,9 +153,7 @@ bool URLRequestThrottlerEntry::ShouldRejectRequest(
const URLRequest& request) const {
bool reject_request = false;
if (!is_backoff_disabled_ && !ExplicitUserRequest(request.load_flags()) &&
- (!request.context()->network_delegate() ||
- request.context()->network_delegate()->CanThrottleRequest(request)) &&
- GetBackoffEntry()->ShouldRejectRequest()) {
+ request.CanThrottle() && GetBackoffEntry()->ShouldRejectRequest()) {
erikwright (departed) 2013/02/25 15:07:23 I don't think this is right. Either we can just no
int num_failures = GetBackoffEntry()->failure_count();
int release_after_ms =
GetBackoffEntry()->GetTimeUntilRelease().InMilliseconds();

Powered by Google App Engine
This is Rietveld 408576698