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

Unified Diff: net/url_request/report_sender.cc

Issue 2265873002: Adjust callers and networking delegates in net/ to modified APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: rebased Created 4 years, 4 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/url_request/report_sender.cc
diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
index c91ddd0752daffcc3848ee0f4eab9882235ad695..76f171d116a7e68fd19911b0edeace9d99f3ff5a 100644
--- a/net/url_request/report_sender.cc
+++ b/net/url_request/report_sender.cc
@@ -59,11 +59,13 @@ void ReportSender::SetErrorCallback(const ErrorCallback& error_callback) {
error_callback_ = error_callback;
}
-void ReportSender::OnResponseStarted(URLRequest* request) {
- if (!request->status().is_success()) {
+void ReportSender::OnResponseStarted(URLRequest* request, int net_error) {
+ DCHECK_NE(ERR_IO_PENDING, net_error);
+
+ if (net_error != OK) {
DVLOG(1) << "Failed to send report for " << request->url().host();
if (!error_callback_.is_null())
- error_callback_.Run(request->url(), request->status().error());
+ error_callback_.Run(request->url(), net_error);
}
CHECK_GT(inflight_requests_.erase(request), 0u);

Powered by Google App Engine
This is Rietveld 408576698