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

Unified Diff: net/url_request/url_request_throttler_entry_interface.h

Issue 10440119: Introduce a delegate to avoid hardcoding "chrome-extension" in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review nit and merge to LKGR for commit. Created 8 years, 6 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
« no previous file with comments | « net/url_request/url_request_throttler_entry.cc ('k') | net/url_request/url_request_throttler_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_entry_interface.h
diff --git a/net/url_request/url_request_throttler_entry_interface.h b/net/url_request/url_request_throttler_entry_interface.h
index e46cd2aded2a4fa5c25d72b6a07ca58967eb4d2c..05a62feeacf11efc2df63988273ee185a92f2f68 100644
--- a/net/url_request/url_request_throttler_entry_interface.h
+++ b/net/url_request/url_request_throttler_entry_interface.h
@@ -15,6 +15,7 @@
namespace net {
+class URLRequest;
class URLRequestThrottlerHeaderInterface;
// Interface provided on entries of the URL request throttler manager.
@@ -24,13 +25,13 @@ class NET_EXPORT URLRequestThrottlerEntryInterface
URLRequestThrottlerEntryInterface() {}
// Returns true when we have encountered server errors and are doing
- // exponential back-off, unless the request has |load_flags| (from
- // net/base/load_flags.h) that mean it is likely to be
- // user-initiated.
+ // exponential back-off, unless the request has load flags that mean
+ // it is likely to be user-initiated, or the NetworkDelegate returns
+ // false for |CanThrottleRequest(request)|.
//
// URLRequestHttpJob checks this method prior to every request; it
// cancels requests if this method returns true.
- virtual bool ShouldRejectRequest(int load_flags) const = 0;
+ virtual bool ShouldRejectRequest(const URLRequest& request) const = 0;
// Calculates a recommended sending time for the next request and reserves it.
// The sending time is not earlier than the current exponential back-off
« no previous file with comments | « net/url_request/url_request_throttler_entry.cc ('k') | net/url_request/url_request_throttler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698