Index: chrome/browser/predictors/resource_prefetcher.cc |
diff --git a/chrome/browser/predictors/resource_prefetcher.cc b/chrome/browser/predictors/resource_prefetcher.cc |
index 44b1057c4165839429cda432b446087e27efc25b..ca34112a76c9bbf92b52cd0f86bb215c9e714ca5 100644 |
--- a/chrome/browser/predictors/resource_prefetcher.cc |
+++ b/chrome/browser/predictors/resource_prefetcher.cc |
@@ -223,6 +223,15 @@ void ResourcePrefetcher::OnReadCompleted(net::URLRequest* request, |
return; |
} |
+ // If the bytes_read is <= 0, there is no more data to read. |
+ if (bytes_read <= 0) { |
rvargas (doing something else)
2013/01/03 23:16:09
Note that this condition is not the same one used
Shishir
2013/01/04 00:29:04
Fixed this to be == 0 as above.
|
+ if (request->was_cached()) |
+ FinishRequest(request, Request::PREFETCH_STATUS_FROM_CACHE); |
+ else |
+ FinishRequest(request, Request::PREFETCH_STATUS_FROM_NETWORK); |
+ return; |
+ } |
+ |
ReadFullResponse(request); |
} |