| Index: chrome/browser/safe_browsing/ping_manager.cc
|
| diff --git a/chrome/browser/safe_browsing/ping_manager.cc b/chrome/browser/safe_browsing/ping_manager.cc
|
| index f16f8181f8e66df59adc2073cd9161036a34d455..ee27b67e7800640e71b0e0b02f2f39d6bbcd89ba 100644
|
| --- a/chrome/browser/safe_browsing/ping_manager.cc
|
| +++ b/chrome/browser/safe_browsing/ping_manager.cc
|
| @@ -9,6 +9,8 @@
|
| #include "base/base64.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| +#include "base/metrics/sparse_histogram.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/values.h"
|
| @@ -67,6 +69,12 @@ std::unique_ptr<base::Value> NetLogPingEndCallback(
|
| return std::move(event_params);
|
| }
|
|
|
| +// Records an UMA histogram of the net errors when certificate reports
|
| +// fail to send.
|
| +void RecordUMAOnFailure(const GURL& report_uri, int net_error) {
|
| + UMA_HISTOGRAM_SPARSE_SLOWLY("SSL.CertificateErrorReportFailure", -net_error);
|
| +}
|
| +
|
| } // namespace
|
|
|
| namespace safe_browsing {
|
| @@ -186,7 +194,8 @@ void SafeBrowsingPingManager::ReportThreatDetails(const std::string& report) {
|
| void SafeBrowsingPingManager::ReportInvalidCertificateChain(
|
| const std::string& serialized_report) {
|
| DCHECK(certificate_error_reporter_);
|
| - certificate_error_reporter_->SendExtendedReportingReport(serialized_report);
|
| + certificate_error_reporter_->SendExtendedReportingReport(
|
| + serialized_report, base::Closure(), base::Bind(RecordUMAOnFailure));
|
| }
|
|
|
| void SafeBrowsingPingManager::SetCertificateErrorReporterForTesting(
|
|
|