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

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

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)
Patch Set: Rebase Created 4 years 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/safe_browsing/certificate_reporting_service_factory.h
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_factory.h b/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
index 5f30fb13328447fac534c40e1a90094ca1db9f5a..fe18a5ad912748d387cedb875bc084058c730329 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
@@ -24,6 +24,13 @@ class CertificateReportingServiceFactory
static CertificateReportingService* GetForBrowserContext(
content::BrowserContext* context);
+ // Setters for testing.
+ void SetReportEncryptionParamsForTesting(uint8_t* server_public_key,
+ uint32_t server_public_key_version);
+ void SetClockForTesting(std::unique_ptr<base::Clock> clock);
+ void SetQueuedReportTTLForTesting(base::TimeDelta queued_report_ttl);
+ void SetMaxQueuedReportCountForTesting(size_t max_report_count);
+
private:
friend struct base::DefaultSingletonTraits<
CertificateReportingServiceFactory>;
@@ -37,6 +44,14 @@ class CertificateReportingServiceFactory
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
+ // Encryption parameters for certificate reports.
+ uint8_t* server_public_key_;
+ uint32_t server_public_key_version_;
+
+ std::unique_ptr<base::Clock> clock_;
+ base::TimeDelta queued_report_ttl_;
+ size_t max_queued_report_count_;
+
DISALLOW_COPY_AND_ASSIGN(CertificateReportingServiceFactory);
};

Powered by Google App Engine
This is Rietveld 408576698