Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1540)

Unified Diff: net/http/transport_security_state.cc

Issue 2648713002: Add response code to the success callback of ReportSender (Closed)
Patch Set: Move http_response_code to error callback Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/transport_security_state.cc
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index a77562413ec7155cd9ad24c7f20249eeefcbe4f4..e5282bd6aa5be0331589d724c67cf00e589a45ce 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -76,7 +76,9 @@ struct SHA256ToHashValueComparator {
}
};
-void RecordUMAForHPKPReportFailure(const GURL& report_uri, int net_error) {
+void RecordUMAForHPKPReportFailure(const GURL& report_uri,
+ int net_error,
+ int http_response_code) {
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.PublicKeyPinReportSendingFailure2",
-net_error);
}
@@ -839,7 +841,7 @@ void TransportSecurityState::CheckExpectStaple(
}
report_sender_->Send(expect_staple_state.report_uri,
"application/json; charset=utf-8", serialized_report,
- base::Closure(),
+ base::Callback<void()>(),
base::Bind(RecordUMAForHPKPReportFailure));
}
@@ -1141,7 +1143,7 @@ TransportSecurityState::CheckPinsAndMaybeSendReport(
base::TimeDelta::FromMinutes(kTimeToRememberHPKPReportsMins));
report_sender_->Send(pkp_state.report_uri, "application/json; charset=utf-8",
- serialized_report, base::Closure(),
+ serialized_report, base::Callback<void()>(),
base::Bind(RecordUMAForHPKPReportFailure));
return PKPStatus::VIOLATED;
}

Powered by Google App Engine
This is Rietveld 408576698