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

Unified Diff: content/browser/loader/async_resource_handler.h

Issue 25772002: Allows prefetch requests to live beyond the renderer by delaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cancellation delay now settable at command line Created 7 years, 2 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: content/browser/loader/async_resource_handler.h
diff --git a/content/browser/loader/async_resource_handler.h b/content/browser/loader/async_resource_handler.h
index 0992841612746a7c0cc8288d3d4456fcddb6b2fa..e8341711922fd0ca167dcc929aedaa9e6357538c 100644
--- a/content/browser/loader/async_resource_handler.h
+++ b/content/browser/loader/async_resource_handler.h
@@ -62,6 +62,12 @@ class AsyncResourceHandler : public ResourceHandler,
virtual void OnDataDownloaded(int request_id,
int bytes_downloaded) OVERRIDE;
+ // Once detached, no more data is sent to the renderer process. Only
+ // completion and error notification. This is useful for prefetches where the
+ // render process does not need the data and the download may persist longer
+ // than the render process.
+ void DetachReads();
+
private:
// IPC message handlers:
void OnFollowRedirect(int request_id,
@@ -87,6 +93,7 @@ class AsyncResourceHandler : public ResourceHandler,
bool has_checked_for_sufficient_resources_;
bool sent_received_response_msg_;
bool sent_first_data_msg_;
+ bool detached_reads_;
DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler);
};
« no previous file with comments | « no previous file | content/browser/loader/async_resource_handler.cc » ('j') | content/browser/loader/async_resource_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698