Chromium Code Reviews| Index: chrome/browser/ssl/certificate_error_report.h |
| diff --git a/chrome/browser/ssl/certificate_error_report.h b/chrome/browser/ssl/certificate_error_report.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e5092a4c96028a0b4cbca0e4c250be2ef6ecd2b |
| --- /dev/null |
| +++ b/chrome/browser/ssl/certificate_error_report.h |
| @@ -0,0 +1,53 @@ |
| +// 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_CERTIFICATE_ERROR_REPORT_H_ |
| +#define CHROME_BROWSER_SSL_CERTIFICATE_ERROR_REPORT_H_ |
| + |
| +#include <string> |
| + |
| +#include "chrome/browser/ssl/cert_logger.pb.h" |
| + |
| +namespace net { |
| +class SSLInfo; |
| +}; // namespace net |
| + |
| +namespace chrome_browser_ssl { |
| + |
| +class CertLoggerRequest; |
| + |
| +// This class builds and serializes reports for invalid SSL certificate |
| +// chains, intended to be sent with |
| +// chrome_browser_net::CertificateErrorReporter. |
| +class CertificateErrorReport { |
| + public: |
| + // Construct an empty report. |
|
eroman
2015/05/12 00:27:51
nit: Constructs
|
| + CertificateErrorReport(); |
| + |
| + // Construct a report for the given |hostname| using the SSL |
|
eroman
2015/05/12 00:27:51
Same comment throughout, see reference to stylegui
|
| + // properties in |ssl_info|. |
| + CertificateErrorReport(const std::string& hostname, |
| + const net::SSLInfo& ssl_info); |
| + |
| + ~CertificateErrorReport(); |
| + |
| + // Initialize an empty report by parsing the given serialized |
| + // report. |serialized_report| should be a serialized |
| + // CertLoggerRequest protobuf. |
| + bool InitializeFromString(const std::string& serialized_report); |
| + |
| + // Serialize the report. The output will be a serialized |
| + // CertLoggerRequest protobuf. |
| + void Serialize(std::string* output) const; |
| + |
| + // Get the hostname to which this report corresponds. |
| + const std::string& hostname() const; |
| + |
| + private: |
| + CertLoggerRequest cert_report_; |
| +}; |
| + |
| +} // namespace chrome_browser_ssl |
| + |
| +#endif // CHROME_BROWSER_SSL_CERTIFICATE_ERROR_REPORT_H_ |