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

Unified Diff: chrome/browser/predictors/resource_prefetcher.cc

Issue 2188253002: predictors: Don't cancel the request when IO is pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetcher.cc
diff --git a/chrome/browser/predictors/resource_prefetcher.cc b/chrome/browser/predictors/resource_prefetcher.cc
index b9b01543dcbd1bb27819dcd312ae5f22cd2cb47b..b81ff69255c7e3aad503dcaa30acb3e8c077179f 100644
--- a/chrome/browser/predictors/resource_prefetcher.cc
+++ b/chrome/browser/predictors/resource_prefetcher.cc
@@ -177,7 +177,7 @@ void ResourcePrefetcher::ReadFullResponse(net::URLRequest* request) {
if (status) {
status = ShouldContinueReadingRequest(request, bytes_read);
- } else if (request->status().error()) {
+ } else if (!request->status().is_success()) {
pasko 2016/07/29 09:35:29 I could be missing something .. but will this not
pasko 2016/07/29 09:40:42 oh, my reading was wrong, the status is actually f
FinishRequest(request, Request::PREFETCH_STATUS_FAILED);
return;
}
@@ -222,7 +222,7 @@ void ResourcePrefetcher::OnSSLCertificateError(net::URLRequest* request,
}
void ResourcePrefetcher::OnResponseStarted(net::URLRequest* request) {
- if (request->status().error()) {
+ if (!request->status().is_success()) {
FinishRequest(request, Request::PREFETCH_STATUS_FAILED);
return;
}
@@ -233,7 +233,7 @@ void ResourcePrefetcher::OnResponseStarted(net::URLRequest* request) {
void ResourcePrefetcher::OnReadCompleted(net::URLRequest* request,
int bytes_read) {
- if (request->status().error()) {
+ if (!request->status().is_success()) {
FinishRequest(request, Request::PREFETCH_STATUS_FAILED);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698