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

Unified Diff: net/reporting/reporting_cache.h

Issue 2900553004: Reporting: Add histograms. (Closed)
Patch Set: oops, forgot about dependency Created 3 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: net/reporting/reporting_cache.h
diff --git a/net/reporting/reporting_cache.h b/net/reporting/reporting_cache.h
index 1a5d31d8328c60157ddabe98c1f5311d82736027..efcfbdf63fb64731241f0ad3d6d8edb5668f48fd 100644
--- a/net/reporting/reporting_cache.h
+++ b/net/reporting/reporting_cache.h
@@ -19,6 +19,7 @@
#include "base/values.h"
#include "net/base/net_export.h"
#include "net/reporting/reporting_client.h"
+#include "net/reporting/reporting_report.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -29,7 +30,6 @@ class TickClock;
namespace net {
class ReportingContext;
-struct ReportingReport;
// The cache holds undelivered reports and clients (per-origin endpoint
// configurations) in memory. (It is not responsible for persisting them.)
@@ -83,11 +83,12 @@ class NET_EXPORT ReportingCache {
// Removes a set of reports. Any reports that are pending will not be removed
// immediately, but rather marked doomed and removed once they are no longer
// pending.
- void RemoveReports(const std::vector<const ReportingReport*>& reports);
+ void RemoveReports(const std::vector<const ReportingReport*>& reports,
+ ReportingReport::Outcome outcome);
// Removes all reports. Like |RemoveReports()|, pending reports are doomed
// until no longer pending.
- void RemoveAllReports();
+ void RemoveAllReports(ReportingReport::Outcome outcome);
// Creates or updates a client for a particular origin and a particular
// endpoint.
@@ -165,6 +166,8 @@ class NET_EXPORT ReportingCache {
}
private:
+ void RemoveReportInternal(const ReportingReport* report);
+
const ReportingReport* FindReportToEvict() const;
void AddClient(std::unique_ptr<ReportingClient> client,

Powered by Google App Engine
This is Rietveld 408576698