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

Unified Diff: chrome/browser/net/passive_log_collector.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: Remove NON_EXPORTED_BASE where not needed. 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
Index: chrome/browser/net/passive_log_collector.h
diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h
index 2e541f5ee664bb49cc9826a3a26de21b6b7f8c16..00940a261c55c9b0ebc6d5afe0f9909ca66e9856 100644
--- a/chrome/browser/net/passive_log_collector.h
+++ b/chrome/browser/net/passive_log_collector.h
@@ -341,6 +341,19 @@ class PassiveLogCollector : public ChromeNetLog::ThreadSafeObserver {
DISALLOW_COPY_AND_ASSIGN(HttpStreamJobTracker);
};
+ class ExponentialBackoffThrottlingTracker : public SourceTracker {
+ public:
+ static const size_t kMaxNumSources;
+ static const size_t kMaxGraveyardSize;
+
+ explicit ExponentialBackoffThrottlingTracker(PassiveLogCollector* parent);
+
+ private:
+ virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
+ SourceInfo* out_info);
+ DISALLOW_COPY_AND_ASSIGN(ExponentialBackoffThrottlingTracker);
+ };
+
PassiveLogCollector();
~PassiveLogCollector();
@@ -381,6 +394,7 @@ class PassiveLogCollector : public ChromeNetLog::ThreadSafeObserver {
DiskCacheEntryTracker disk_cache_entry_tracker_;
MemCacheEntryTracker mem_cache_entry_tracker_;
HttpStreamJobTracker http_stream_job_tracker_;
+ ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_;
// This array maps each NetLog::SourceType to one of the tracker instances
// defined above. Use of this array avoid duplicating the list of trackers

Powered by Google App Engine
This is Rietveld 408576698