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

Unified Diff: net/url_request/url_request_throttler_entry.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_test_util.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 3ebd5c9ccb65f42c117d36686cd5b019b1f70c76..e5399c9b49af1734e7af8ba4e9f7309bf38f1405 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -93,7 +93,7 @@ class NET_EXPORT URLRequestThrottlerEntry
void DetachManager();
// Implementation of URLRequestThrottlerEntryInterface.
- virtual bool ShouldRejectRequest(int load_flags) const OVERRIDE;
+ virtual bool ShouldRejectRequest(const URLRequest& request) const OVERRIDE;
virtual int64 ReserveSendingTimeForNextRequest(
const base::TimeTicks& earliest_time) OVERRIDE;
virtual base::TimeTicks GetExponentialBackoffReleaseTime() const OVERRIDE;
@@ -118,10 +118,6 @@ class NET_EXPORT URLRequestThrottlerEntry
void HandleThrottlingHeader(const std::string& header_value,
const std::string& host);
- // Used internally to keep track of failure->success transitions and
- // generate statistics about them.
- void HandleMetricsTracking(int response_code);
-
// 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;
@@ -164,15 +160,6 @@ class NET_EXPORT URLRequestThrottlerEntry
// Access it through GetBackoffEntry() to allow a unit test seam.
BackoffEntry backoff_entry_;
- // The time of the last successful response, plus knowledge of whether
- // the last response was successful or not, let us generate statistics on
- // the length of perceived downtime for a given URL, and the error count
- // when such transitions occur. This is useful for experiments with
- // throttling but will likely become redundant after they are finished.
- // TODO(joi): Remove when the time is right
- base::TimeTicks last_successful_response_time_;
- bool last_response_was_success_;
-
// Weak back-reference to the manager object managing us.
URLRequestThrottlerManager* manager_;
« no previous file with comments | « net/url_request/url_request_test_util.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