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

Unified Diff: net/url_request/url_request_throttler_entry.h

Issue 1148603003: Remove X-Chrome-Exponential-Throttling header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 7 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 cbb84e76ea76272ec58953112126cbad7fa7dd54..0f385cc9a9866859751a8a395d92ada09f553579 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -58,14 +58,6 @@ class NET_EXPORT URLRequestThrottlerEntry
// Time after which the entry is considered outdated.
static const int kDefaultEntryLifetimeMs;
- // Name of the header that sites can use to opt out of exponential back-off
- // throttling.
- static const char kExponentialThrottlingHeader[];
-
- // Value for exponential throttling header that can be used to opt out of
- // exponential back-off throttling.
- static const char kExponentialThrottlingDisableValue[];
-
// The manager object's lifetime must enclose the lifetime of this object.
URLRequestThrottlerEntry(URLRequestThrottlerManager* manager,
const std::string& url_id);
@@ -98,9 +90,7 @@ class NET_EXPORT URLRequestThrottlerEntry
int64 ReserveSendingTimeForNextRequest(
const base::TimeTicks& earliest_time) override;
base::TimeTicks GetExponentialBackoffReleaseTime() const override;
- void UpdateWithResponse(
- const std::string& host,
- const URLRequestThrottlerHeaderInterface* response) override;
+ void UpdateWithResponse(int status_code) override;
void ReceivedContentWasMalformed(int response_code) override;
protected:
@@ -108,17 +98,13 @@ class NET_EXPORT URLRequestThrottlerEntry
void Initialize();
- // Returns true if the given response code is considered an error for
+ // Returns true if the given response code is considered a success for
// throttling purposes.
- bool IsConsideredError(int response_code);
+ bool IsConsideredSuccess(int response_code);
// Equivalent to TimeTicks::Now(), virtual to be mockable for testing purpose.
virtual base::TimeTicks ImplGetTimeNow() const;
- // Used internally to handle the opt-out header.
- void HandleThrottlingHeader(const std::string& header_value,
- const std::string& host);
-
// Retrieves the back-off entry object we're using. Used to enable a
// unit testing seam for dependency injection in tests.
virtual const BackoffEntry* GetBackoffEntry() const;
« 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