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

Side by Side Diff: chrome/browser/ssl/certificate_error_report.h

Issue 1117173004: Split cert reporter class into report building/serializing and sending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BUILD.gn fix Created 5 years, 7 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 #ifndef CHROME_BROWSER_SSL_CERTIFICATE_ERROR_REPORT_H_
6 #define CHROME_BROWSER_SSL_CERTIFICATE_ERROR_REPORT_H_
7
8 #include <string>
9
10 #include "chrome/browser/ssl/cert_logger.pb.h"
11
12 namespace net {
13 class SSLInfo;
14 }; // namespace net
15
16 namespace chrome_browser_ssl {
17
18 class CertLoggerRequest;
19
20 // This class builds and serializes reports for invalid SSL certificate
21 // chains, intended to be sent with
22 // chrome_browser_net::CertificateErrorReporter.
23 class CertificateErrorReport {
24 public:
25 // Construct an empty report.
eroman 2015/05/12 00:27:51 nit: Constructs
26 CertificateErrorReport();
27
28 // Construct a report for the given |hostname| using the SSL
eroman 2015/05/12 00:27:51 Same comment throughout, see reference to stylegui
29 // properties in |ssl_info|.
30 CertificateErrorReport(const std::string& hostname,
31 const net::SSLInfo& ssl_info);
32
33 ~CertificateErrorReport();
34
35 // Initialize an empty report by parsing the given serialized
36 // report. |serialized_report| should be a serialized
37 // CertLoggerRequest protobuf.
38 bool InitializeFromString(const std::string& serialized_report);
39
40 // Serialize the report. The output will be a serialized
41 // CertLoggerRequest protobuf.
42 void Serialize(std::string* output) const;
43
44 // Get the hostname to which this report corresponds.
45 const std::string& hostname() const;
46
47 private:
48 CertLoggerRequest cert_report_;
49 };
50
51 } // namespace chrome_browser_ssl
52
53 #endif // CHROME_BROWSER_SSL_CERTIFICATE_ERROR_REPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698