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

Unified Diff: net/base/backoff_entry.h

Issue 6966038: Anti-DDoS enhancements: Log to net log, UMA stats, improved policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 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 | « chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc ('k') | net/base/backoff_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/backoff_entry.h
diff --git a/net/base/backoff_entry.h b/net/base/backoff_entry.h
index 1a7d2dcde0b743cc2a35e37b50036c3eafb7f1f5..a3bca91402a8aadf124211af53245a6887d7b62d 100644
--- a/net/base/backoff_entry.h
+++ b/net/base/backoff_entry.h
@@ -69,10 +69,15 @@ class NET_TEST BackoffEntry : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// had for Policy::entry_lifetime_ms_.
bool CanDiscard() const;
+ // Resets this entry to a fresh (as if just constructed) state.
+ void Reset();
+
+ // Returns the failure count for this entry.
+ int failure_count() const { return failure_count_; }
+
protected:
// Equivalent to TimeTicks::Now(), virtual so unit tests can override.
- // TODO(joi): Switch to constructor-time dependency injection?
- virtual base::TimeTicks GetTimeNow() const;
+ virtual base::TimeTicks ImplGetTimeNow() const;
private:
// Calculates when requests should again be allowed through.
« no previous file with comments | « chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc ('k') | net/base/backoff_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698