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

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: Change delay from 3s to 60s for initial timing. Obey the browser process when it wants to cancel. 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..e0cbd1b1c45e8a6d3370915baaddd4d497378299 100644
--- a/content/browser/loader/async_resource_handler.h
+++ b/content/browser/loader/async_resource_handler.h
@@ -62,6 +62,13 @@ 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. Can only be set from false to true, not from true
+ // to false.
+ void SetDetachedReads(bool detached_reads);
+
private:
// IPC message handlers:
void OnFollowRedirect(int request_id,
@@ -87,6 +94,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