OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ssl/ssl_interstitial_certificate_reporter.h" |
| 6 |
| 7 #include "chrome/browser/net/cert_logger.pb.h" |
| 8 #include "chrome/browser/net/chrome_certificate_reporter.h" |
| 9 |
| 10 using chrome_browser_net::CertLoggerRequest; |
| 11 |
| 12 // TODO(estark): Fill in a real URL when there is a live server |
| 13 // endpoint. |
| 14 const char kCertificateUploadEndpoint[] = ""; |
| 15 |
| 16 SSLInterstitialCertificateReporter::SSLInterstitialCertificateReporter( |
| 17 net::URLRequestContext* request_context) |
| 18 : ChromeCertificateReporter(request_context, kCertificateUploadEndpoint) { |
| 19 } |
| 20 |
| 21 void SSLInterstitialCertificateReporter::SendReport( |
| 22 const std::string& hostname, |
| 23 const net::SSLInfo& ssl_info) { |
| 24 // TODO(estark): Double-check that the user is opted in. |
| 25 // TODO(estark): Temporarily, since this is no upload endpoint, just |
| 26 // log the information. |
| 27 CertLoggerRequest request; |
| 28 SSLInterstitialCertificateReporter::BuildReport(hostname, ssl_info, request); |
| 29 std::string out; |
| 30 request.SerializeToString(&out); |
| 31 DVLOG(20) << "SSL report for " << hostname << ":\n" << out << "\n\n"; |
| 32 return; |
| 33 } |
OLD | NEW |