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

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

Issue 11761022: Fixing possible read on URLRequest when there is no more data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving error checking statement. Created 7 years, 12 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 | chrome/browser/predictors/resource_prefetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetcher.h
diff --git a/chrome/browser/predictors/resource_prefetcher.h b/chrome/browser/predictors/resource_prefetcher.h
index 7ff8e6f285002aa0a87593fcde47113bea18f9f2..81e9481fdd3a3145103a45839869a7b1f7308e2a 100644
--- a/chrome/browser/predictors/resource_prefetcher.h
+++ b/chrome/browser/predictors/resource_prefetcher.h
@@ -118,6 +118,10 @@ class ResourcePrefetcher : public base::NonThreadSafe,
// be cached correctly. Stubbed out during testing.
virtual void ReadFullResponse(net::URLRequest* request);
+ // Returns true if the request has more data that needs to be read. If it
+ // returns false, the request should not be referenced again.
+ bool ShouldContinueReadingRequest(net::URLRequest* request, int bytes_read);
+
// net::URLRequest::Delegate methods.
virtual void OnReceivedRedirect(net::URLRequest* request,
const GURL& new_url,
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698