| Index: chrome/browser/ssl/ssl_interstitial_certificate_reporter.cc
|
| diff --git a/chrome/browser/ssl/ssl_interstitial_certificate_reporter.cc b/chrome/browser/ssl/ssl_interstitial_certificate_reporter.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b3bfe76ccb4f13d48fcd9ae335e470afd6be613a
|
| --- /dev/null
|
| +++ b/chrome/browser/ssl/ssl_interstitial_certificate_reporter.cc
|
| @@ -0,0 +1,33 @@
|
| +// 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.
|
| +
|
| +#include "chrome/browser/ssl/ssl_interstitial_certificate_reporter.h"
|
| +
|
| +#include "chrome/browser/net/cert_logger.pb.h"
|
| +#include "chrome/browser/net/chrome_certificate_reporter.h"
|
| +
|
| +using chrome_browser_net::CertLoggerRequest;
|
| +
|
| +// TODO(estark): Fill in a real URL when there is a live server
|
| +// endpoint.
|
| +const char kCertificateUploadEndpoint[] = "";
|
| +
|
| +SSLInterstitialCertificateReporter::SSLInterstitialCertificateReporter(
|
| + net::URLRequestContext* request_context)
|
| + : ChromeCertificateReporter(request_context, kCertificateUploadEndpoint) {
|
| +}
|
| +
|
| +void SSLInterstitialCertificateReporter::SendReport(
|
| + const std::string& hostname,
|
| + const net::SSLInfo& ssl_info) {
|
| + // TODO(estark): Double-check that the user is opted in.
|
| + // TODO(estark): Temporarily, since this is no upload endpoint, just
|
| + // log the information.
|
| + CertLoggerRequest request;
|
| + SSLInterstitialCertificateReporter::BuildReport(hostname, ssl_info, request);
|
| + std::string out;
|
| + request.SerializeToString(&out);
|
| + DVLOG(20) << "SSL report for " << hostname << ":\n" << out << "\n\n";
|
| + return;
|
| +}
|
|
|