| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chrome_expect_ct_reporter.h" | 5 #include "chrome/browser/ssl/chrome_expect_ct_reporter.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 report.Set("valid-scts", std::move(valid_scts)); | 170 report.Set("valid-scts", std::move(valid_scts)); |
| 171 | 171 |
| 172 std::string serialized_report; | 172 std::string serialized_report; |
| 173 if (!base::JSONWriter::Write(report, &serialized_report)) { | 173 if (!base::JSONWriter::Write(report, &serialized_report)) { |
| 174 LOG(ERROR) << "Failed to serialize Expect CT report"; | 174 LOG(ERROR) << "Failed to serialize Expect CT report"; |
| 175 return; | 175 return; |
| 176 } | 176 } |
| 177 | 177 |
| 178 UMA_HISTOGRAM_BOOLEAN("SSL.ExpectCTReportSendingAttempt", true); | 178 UMA_HISTOGRAM_BOOLEAN("SSL.ExpectCTReportSendingAttempt", true); |
| 179 | 179 |
| 180 report_sender_->Send(report_uri, serialized_report); | 180 report_sender_->Send(report_uri, "application/json; charset=utf-8", |
| 181 serialized_report); |
| 181 } | 182 } |
| OLD | NEW |