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

Side by Side Diff: chrome/browser/ssl/ssl_interstitial_certificate_reporter.cc

Issue 979893003: Refactor ChromeFraudulentCertReporter for code reuse by SSL reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698