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

Unified Diff: chrome/browser/safe_browsing/certificate_reporting_service.h

Issue 2862453002: Add metrics for certificate report uploads (Closed)
Patch Set: Rebase and address comments 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/certificate_reporting_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/certificate_reporting_service.h
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service.h b/chrome/browser/safe_browsing/certificate_reporting_service.h
index 639b27e34a9372cde43e7d421b50b78601425bae..5ef016107ad9917b735f58ebae1e1914d1cbb727 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service.h
@@ -55,6 +55,26 @@ class SafeBrowsingService;
// extended reporting preferences.
class CertificateReportingService : public KeyedService {
public:
+ // Events for UMA. Do not rename or remove values, add new values to the end.
+ // Public for testing.
+ enum ReportOutcome {
+ // A report is submitted. This includes failed and successful uploads as
+ // well as uploads that never return a response.
+ REPORT_SUBMITTED = 0,
+ // A report submission failed, either because of a net error or a non-HTTP
+ // 200 response from the server.
+ REPORT_FAILED = 1,
+ // A report submission was successfully sent, receiving an HTTP 200 response
+ // from the server.
+ REPORT_SUCCESSFUL = 2,
+ // A report was dropped from the reporting queue because it was older
+ // than report TTL, or it was ignored because the queue was full and the
+ // report was older than the oldest report in the queue. Does not include
+ // reports that were cleared because of a SafeBrowsing preference change.
+ REPORT_DROPPED_OR_IGNORED = 3,
+ REPORT_EVENT_COUNT = 4
+ };
+
// Represents a report to be sent.
struct Report {
int report_id;
@@ -153,6 +173,9 @@ class CertificateReportingService : public KeyedService {
DISALLOW_COPY_AND_ASSIGN(Reporter);
};
+ // Public for testing.
+ static const char kReportEventHistogram[];
+
CertificateReportingService(
safe_browsing::SafeBrowsingService* safe_browsing_service,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter,
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/certificate_reporting_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698