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

Unified Diff: chrome/browser/ssl/chrome_expect_ct_reporter.h

Issue 1579063002: Implement a skeleton version of Expect CT reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move expect ct into TransportSecurityState Created 4 years, 10 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: chrome/browser/ssl/chrome_expect_ct_reporter.h
diff --git a/chrome/browser/ssl/chrome_expect_ct_reporter.h b/chrome/browser/ssl/chrome_expect_ct_reporter.h
new file mode 100644
index 0000000000000000000000000000000000000000..87d68a27c739de73fc54ec4959240affc13a17ca
--- /dev/null
+++ b/chrome/browser/ssl/chrome_expect_ct_reporter.h
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_
+#define CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "net/http/transport_security_state.h"
+
+namespace net {
+class CertificateReportSender;
+class URLRequestContext;
+} // namespace net
+
+// This class monitors for violations of CT policy and sends reports
+// about failures for sites that have opted in.
mmenke 2016/03/07 18:28:08 Mention it must be deleted before the URLRequestCo
estark 2016/03/08 02:36:06 Done.
+class ChromeExpectCTReporter
+ : public net::TransportSecurityState::ExpectCTReporter {
+ public:
+ explicit ChromeExpectCTReporter(net::URLRequestContext* request_context);
+ ~ChromeExpectCTReporter() override;
+
+ // net::ExpectCTReporter:
+ void OnExpectCTFailed(const net::HostPortPair& host_port_pair,
+ const GURL& report_uri,
+ const net::SSLInfo& ssl_info) override;
+
+ private:
+ scoped_ptr<net::CertificateReportSender> report_sender_;
+ DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporter);
mmenke 2016/03/07 18:28:08 nit: Blank line before DISALLOW_COPY_AND_ASSIGN(C
estark 2016/03/08 02:36:06 Done.
+};
+
+#endif // CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_

Powered by Google App Engine
This is Rietveld 408576698