Chromium Code Reviews| 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 <map> | |
| 8 #include <memory> | 9 #include <memory> |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 12 namespace base { | |
| 13 struct Feature; | |
| 14 } // namespace base | |
| 11 | 15 |
| 12 namespace net { | 16 namespace net { |
| 13 class SSLInfo; | 17 class SSLInfo; |
| 14 } // namespace net | 18 } // namespace net |
| 15 | 19 |
| 16 namespace certificate_reporting { | 20 namespace certificate_reporting { |
| 17 | 21 |
| 18 class CertLoggerRequest; | 22 class CertLoggerRequest; |
| 19 | 23 |
| 20 // This class builds and serializes reports for invalid SSL certificate | 24 // 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. | 61 // successful and false otherwise. |
| 58 bool Serialize(std::string* output) const; | 62 bool Serialize(std::string* output) const; |
| 59 | 63 |
| 60 void SetInterstitialInfo(const InterstitialReason& interstitial_reason, | 64 void SetInterstitialInfo(const InterstitialReason& interstitial_reason, |
| 61 const ProceedDecision& proceed_decision, | 65 const ProceedDecision& proceed_decision, |
| 62 const Overridable& overridable); | 66 const Overridable& overridable); |
| 63 | 67 |
| 64 // Gets the hostname to which this report corresponds. | 68 // Gets the hostname to which this report corresponds. |
| 65 const std::string& hostname() const; | 69 const std::string& hostname() const; |
| 66 | 70 |
| 71 // Populates the report with information about the given feature, | |
| 72 // including whether it is enabled or disabled and its experiment | |
| 73 // parameters. | |
| 74 void AddFeature(const std::string& feature_name, | |
| 75 bool enabled, | |
| 76 const std::map<std::string, std::string>& params); | |
|
jwd
2016/11/03 15:15:34
Hmmm, I actually liked passing the feature itself
| |
| 77 | |
| 67 private: | 78 private: |
| 68 std::unique_ptr<CertLoggerRequest> cert_report_; | 79 std::unique_ptr<CertLoggerRequest> cert_report_; |
| 69 }; | 80 }; |
| 70 | 81 |
| 71 } // namespace certificate_reporting | 82 } // namespace certificate_reporting |
| 72 | 83 |
| 73 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ | 84 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ |
| OLD | NEW |