| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "net/cert/ct_signed_certificate_timestamp_log_param.h" | 5 #include "net/cert/ct_signed_certificate_timestamp_log_param.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
| 9 | 10 |
| 10 #include "base/base64.h" | 11 #include "base/base64.h" |
| 11 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 13 #include "base/values.h" | 14 #include "base/values.h" |
| 14 #include "net/cert/ct_verify_result.h" | 15 #include "net/cert/ct_verify_result.h" |
| 15 #include "net/cert/signed_certificate_timestamp.h" | 16 #include "net/cert/signed_certificate_timestamp.h" |
| 16 | 17 |
| 17 namespace net { | 18 namespace net { |
| 18 | 19 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 133 |
| 133 dict->Set("verified_scts", | 134 dict->Set("verified_scts", |
| 134 SCTListToPrintableValues(ct_result->verified_scts)); | 135 SCTListToPrintableValues(ct_result->verified_scts)); |
| 135 | 136 |
| 136 dict->Set("invalid_scts", | 137 dict->Set("invalid_scts", |
| 137 SCTListToPrintableValues(ct_result->invalid_scts)); | 138 SCTListToPrintableValues(ct_result->invalid_scts)); |
| 138 | 139 |
| 139 dict->Set("unknown_logs_scts", | 140 dict->Set("unknown_logs_scts", |
| 140 SCTListToPrintableValues(ct_result->unknown_logs_scts)); | 141 SCTListToPrintableValues(ct_result->unknown_logs_scts)); |
| 141 | 142 |
| 142 return dict.Pass(); | 143 return std::move(dict); |
| 143 } | 144 } |
| 144 | 145 |
| 145 scoped_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback( | 146 scoped_ptr<base::Value> NetLogRawSignedCertificateTimestampCallback( |
| 146 const std::string* embedded_scts, | 147 const std::string* embedded_scts, |
| 147 const std::string* sct_list_from_ocsp, | 148 const std::string* sct_list_from_ocsp, |
| 148 const std::string* sct_list_from_tls_extension, | 149 const std::string* sct_list_from_tls_extension, |
| 149 NetLogCaptureMode capture_mode) { | 150 NetLogCaptureMode capture_mode) { |
| 150 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 151 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 151 | 152 |
| 152 SetBinaryData("embedded_scts", *embedded_scts, dict.get()); | 153 SetBinaryData("embedded_scts", *embedded_scts, dict.get()); |
| 153 SetBinaryData("scts_from_ocsp_response", *sct_list_from_ocsp, dict.get()); | 154 SetBinaryData("scts_from_ocsp_response", *sct_list_from_ocsp, dict.get()); |
| 154 SetBinaryData("scts_from_tls_extension", *sct_list_from_tls_extension, | 155 SetBinaryData("scts_from_tls_extension", *sct_list_from_tls_extension, |
| 155 dict.get()); | 156 dict.get()); |
| 156 | 157 |
| 157 return dict.Pass(); | 158 return std::move(dict); |
| 158 } | 159 } |
| 159 | 160 |
| 160 } // namespace net | 161 } // namespace net |
| OLD | NEW |