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

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

Issue 1579063002: Implement a skeleton version of Expect CT reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary (?) NET_EXPORTs 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: chrome/browser/ssl/chrome_expect_ct_reporter.cc
diff --git a/chrome/browser/ssl/chrome_expect_ct_reporter.cc b/chrome/browser/ssl/chrome_expect_ct_reporter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f6e017514db3efd2cd1d55d7159b463774d79030
--- /dev/null
+++ b/chrome/browser/ssl/chrome_expect_ct_reporter.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 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.
+
+#include "chrome/browser/ssl/chrome_expect_ct_reporter.h"
+
+#include <string>
+
+#include "net/url_request/certificate_report_sender.h"
+
+ChromeExpectCTReporter::ChromeExpectCTReporter(
+ net::URLRequestContext* request_context)
+ : report_sender_(new net::CertificateReportSender(
+ request_context,
+ net::CertificateReportSender::DO_NOT_SEND_COOKIES)) {}
+
+ChromeExpectCTReporter::~ChromeExpectCTReporter() {}
+
+void ChromeExpectCTReporter::OnExpectCTFailed(
+ const net::HostPortPair& host_port_pair,
+ const GURL& report_uri,
+ const net::SSLInfo& ssl_info) {
+ // TODO(estark): build and send a report about the policy
+ // violation. https://crbug.com/568806
+}

Powered by Google App Engine
This is Rietveld 408576698