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

Unified Diff: components/certificate_reporting/error_reporter.h

Issue 2483993002: Add report_id to ErrorReporter interface. (Closed)
Patch Set: Created 4 years, 1 month 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: components/certificate_reporting/error_reporter.h
diff --git a/components/certificate_reporting/error_reporter.h b/components/certificate_reporting/error_reporter.h
index c4a15d6ef6bc39731b60df69d1eedfc36b0580c4..fe26528090c4d749a380a7339fdbbad44425e0c8 100644
--- a/components/certificate_reporting/error_reporter.h
+++ b/components/certificate_reporting/error_reporter.h
@@ -60,8 +60,11 @@ class ErrorReporter {
// an HTTP endpoint to send encrypted extended reporting reports. On
// unsupported platforms, callers must send extended reporting reports
// over SSL.
- virtual void SendExtendedReportingReport(
- const std::string& serialized_report);
+ //
+ // |report_id| is passed back to error and success callbacks. Clients not
+ // using it can set it to any value.
+ virtual void SendExtendedReportingReport(const std::string& serialized_report,
+ int report_id);
// Used by tests.
static bool DecryptErrorReport(
@@ -69,10 +72,16 @@ class ErrorReporter {
const EncryptedCertLoggerRequest& encrypted_report,
std::string* decrypted_serialized_report);
+ void SetErrorCallback(
+ const base::Callback<void(const GURL&, int, int)>& callback);
+ void SetSuccessCallback(const base::Callback<void(int)>& callback);
estark 2016/11/11 01:15:49 nit: blank line before
meacer 2016/11/11 19:59:29 Done.
+
+ void set_upload_url_for_testing(const GURL& url) { upload_url_ = url; }
+
private:
std::unique_ptr<net::ReportSender> certificate_report_sender_;
- const GURL upload_url_;
+ GURL upload_url_;
const uint8_t* server_public_key_;
const uint32_t server_public_key_version_;

Powered by Google App Engine
This is Rietveld 408576698