OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ | 5 #ifndef COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ |
6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ | 6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 namespace base { |
| 12 struct Feature; |
| 13 } // namespace base |
11 | 14 |
12 namespace net { | 15 namespace net { |
13 class SSLInfo; | 16 class SSLInfo; |
14 } // namespace net | 17 } // namespace net |
15 | 18 |
16 namespace certificate_reporting { | 19 namespace certificate_reporting { |
17 | 20 |
18 class CertLoggerRequest; | 21 class CertLoggerRequest; |
19 | 22 |
20 // This class builds and serializes reports for invalid SSL certificate | 23 // This class builds and serializes reports for invalid SSL certificate |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // successful and false otherwise. | 60 // successful and false otherwise. |
58 bool Serialize(std::string* output) const; | 61 bool Serialize(std::string* output) const; |
59 | 62 |
60 void SetInterstitialInfo(const InterstitialReason& interstitial_reason, | 63 void SetInterstitialInfo(const InterstitialReason& interstitial_reason, |
61 const ProceedDecision& proceed_decision, | 64 const ProceedDecision& proceed_decision, |
62 const Overridable& overridable); | 65 const Overridable& overridable); |
63 | 66 |
64 // Gets the hostname to which this report corresponds. | 67 // Gets the hostname to which this report corresponds. |
65 const std::string& hostname() const; | 68 const std::string& hostname() const; |
66 | 69 |
| 70 // Populates the report with information about the given |feature|, |
| 71 // including whether it is enabled or disabled and its experiment |
| 72 // parameters. |
| 73 void AddFeature(const base::Feature& feature); |
| 74 |
67 private: | 75 private: |
68 std::unique_ptr<CertLoggerRequest> cert_report_; | 76 std::unique_ptr<CertLoggerRequest> cert_report_; |
69 }; | 77 }; |
70 | 78 |
71 } // namespace certificate_reporting | 79 } // namespace certificate_reporting |
72 | 80 |
73 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ | 81 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ |
OLD | NEW |