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

Unified Diff: net/url_request/url_request_throttler_entry.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
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_throttler_entry.cc » ('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.h
diff --git a/net/url_request/url_request_throttler_entry.h b/net/url_request/url_request_throttler_entry.h
index 10f1adc223be7f3b53b60ca98fe278282e3dc4f3..df03fb393aea0ee99a5293f9aa0aedeca721dcd6 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -97,7 +97,7 @@ class NET_API URLRequestThrottlerEntry
void DetachManager();
// Implementation of URLRequestThrottlerEntryInterface.
- virtual bool IsDuringExponentialBackoff() const;
+ virtual bool ShouldRejectRequest(int load_flags) const;
virtual int64 ReserveSendingTimeForNextRequest(
const base::TimeTicks& earliest_time);
virtual base::TimeTicks GetExponentialBackoffReleaseTime() const;
@@ -134,6 +134,11 @@ class NET_API URLRequestThrottlerEntry
virtual const BackoffEntry* GetBackoffEntry() const;
virtual BackoffEntry* GetBackoffEntry();
+ // Returns true if |load_flags| contains a flag that indicates an
+ // explicit request by the user to load the resource. We never
+ // throttle requests with such load flags.
+ static bool ExplicitUserRequest(const int load_flags);
+
// Used by tests.
base::TimeTicks sliding_window_release_time() const {
return sliding_window_release_time_;
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_throttler_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698