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 #include "chrome/browser/ssl/certificate_error_report.h" | 5 #include "chrome/browser/ssl/certificate_error_report.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 if (cert_status & net::CERT_STATUS_NO_REVOCATION_MECHANISM) | 49 if (cert_status & net::CERT_STATUS_NO_REVOCATION_MECHANISM) |
50 report->add_cert_error(CertLoggerRequest::ERR_CERT_NO_REVOCATION_MECHANISM); | 50 report->add_cert_error(CertLoggerRequest::ERR_CERT_NO_REVOCATION_MECHANISM); |
51 } | 51 } |
52 | 52 |
53 bool CertificateChainToString(scoped_refptr<net::X509Certificate> cert, | 53 bool CertificateChainToString(scoped_refptr<net::X509Certificate> cert, |
54 std::string* result) { | 54 std::string* result) { |
55 std::vector<std::string> pem_encoded_chain; | 55 std::vector<std::string> pem_encoded_chain; |
56 if (!cert->GetPEMEncodedChain(&pem_encoded_chain)) | 56 if (!cert->GetPEMEncodedChain(&pem_encoded_chain)) |
57 return false; | 57 return false; |
58 | 58 |
59 *result = JoinString(pem_encoded_chain, std::string()); | 59 *result = base::JoinString(pem_encoded_chain, base::StringPiece()); |
60 return true; | 60 return true; |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 CertificateErrorReport::CertificateErrorReport() | 65 CertificateErrorReport::CertificateErrorReport() |
66 : cert_report_(new CertLoggerRequest()) { | 66 : cert_report_(new CertLoggerRequest()) { |
67 } | 67 } |
68 | 68 |
69 CertificateErrorReport::CertificateErrorReport(const std::string& hostname, | 69 CertificateErrorReport::CertificateErrorReport(const std::string& hostname, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 break; | 124 break; |
125 } | 125 } |
126 | 126 |
127 interstitial_info->set_user_proceeded(proceed_decision == USER_PROCEEDED); | 127 interstitial_info->set_user_proceeded(proceed_decision == USER_PROCEEDED); |
128 interstitial_info->set_overridable(overridable == INTERSTITIAL_OVERRIDABLE); | 128 interstitial_info->set_overridable(overridable == INTERSTITIAL_OVERRIDABLE); |
129 } | 129 } |
130 | 130 |
131 const std::string& CertificateErrorReport::hostname() const { | 131 const std::string& CertificateErrorReport::hostname() const { |
132 return cert_report_->hostname(); | 132 return cert_report_->hostname(); |
133 } | 133 } |
OLD | NEW |