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

Unified Diff: net/url_request/url_request_throttler_entry_interface.h

Issue 7582004: Add load flag indicating a request is probably the result of a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to lkgr. Created 9 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_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 86feb9f659d041b197c4130ed0cf495555e88fa6..b09ddcc74f186b0a75b8e1517f960a7960f44128 100644
--- a/net/url_request/url_request_throttler_entry_interface.h
+++ b/net/url_request/url_request_throttler_entry_interface.h
@@ -24,10 +24,13 @@ class NET_API URLRequestThrottlerEntryInterface
URLRequestThrottlerEntryInterface() {}
// Returns true when we have encountered server errors and are doing
- // exponential back-off.
+ // exponential back-off, unless the request has |load_flags| (from
+ // net/base/load_flags.h) that mean it is likely to be
+ // user-initiated.
+ //
// URLRequestHttpJob checks this method prior to every request; it
// cancels requests if this method returns true.
- virtual bool IsDuringExponentialBackoff() const = 0;
+ virtual bool ShouldRejectRequest(int load_flags) 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_simulation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698