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

Unified Diff: net/url_request/certificate_report_sender.h

Issue 1847563004: Add error callback to net::CertificateReportSender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/url_request/certificate_report_sender.h
diff --git a/net/url_request/certificate_report_sender.h b/net/url_request/certificate_report_sender.h
index 0f247c3e4e20dbccd9e520c20a1072a9734c5e1b..f77d38e54cfc00f629178c7c5595f92a1ed92eaa 100644
--- a/net/url_request/certificate_report_sender.h
+++ b/net/url_request/certificate_report_sender.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
+#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "net/http/transport_security_state.h"
@@ -39,6 +40,17 @@ class NET_EXPORT CertificateReportSender
CertificateReportSender(URLRequestContext* request_context,
CookiesPreference cookies_preference);
+ // Constructs a CertificateReportSender that sends reports with the
+ // given |request_context| and includes or excludes cookies based on
+ // |cookies_preference|. |request_context| must outlive the
+ // CertificateReportSender. When sending a report results in an error,
+ // |error_callback| is called with a pointer to the URLRequest as an
+ // argument.
+ CertificateReportSender(
+ URLRequestContext* request_context,
+ CookiesPreference cookies_preference,
+ const base::Callback<void(URLRequest*)>& error_callback);
+
~CertificateReportSender() override;
// TransportSecurityState::ReportSender implementation.
@@ -56,6 +68,9 @@ class NET_EXPORT CertificateReportSender
// Owns the contained requests.
std::set<URLRequest*> inflight_requests_;
+ // Called when a sent report results in an error.
+ base::Callback<void(URLRequest* request)> error_callback_;
+
DISALLOW_COPY_AND_ASSIGN(CertificateReportSender);
};
« no previous file with comments | « no previous file | net/url_request/certificate_report_sender.cc » ('j') | net/url_request/certificate_report_sender.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698