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

Unified Diff: net/url_request/url_request_throttler_entry.cc

Issue 407093011: Allow URLRequests from one context to have different NetworkDelegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new tests Created 6 years, 4 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 b7c06122df2703851936416ccf0408b1107e4338..5d0c43adb13a5240a24e8c02c40036995dcd986d 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -150,11 +150,11 @@ void URLRequestThrottlerEntry::DetachManager() {
}
bool URLRequestThrottlerEntry::ShouldRejectRequest(
- const URLRequest& request) const {
+ const URLRequest& request,
+ NetworkDelegate* network_delegate) const {
bool reject_request = false;
if (!is_backoff_disabled_ && !ExplicitUserRequest(request.load_flags()) &&
- (!request.context()->network_delegate() ||
- request.context()->network_delegate()->CanThrottleRequest(request)) &&
+ (!network_delegate || network_delegate->CanThrottleRequest(request)) &&
GetBackoffEntry()->ShouldRejectRequest()) {
int num_failures = GetBackoffEntry()->failure_count();
int release_after_ms =
« no previous file with comments | « net/url_request/url_request_throttler_entry.h ('k') | net/url_request/url_request_throttler_entry_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698