From 146b8b276bc5388c25482c78d270e7fa773e3cc5 Mon Sep 17 00:00:00 2001 From: "davidben@chromium.org" Date: Wed, 20 Nov 2013 03:59:18 +0000 Subject: Allow prefetches to outlive their owning RenderViewHost. This is a rework of r231910. Instead of putting the detachable logic in AsyncResourceHandler, move it to a wrapper DetachableResourceHandler. On detach, it simulates a cancel to the ResourceHandler it wraps and then continues to drain the request itself. This should have fewer buffering complications. BUG=286186 TEST=ResourceDispatcherHostTest.Cancel, ResourceDispatcherHostTest.DetachedResourceTimesOut, ResourceDispatcherHostTest.DeletedFilterDetached, ResourceDispatcherHostTest.DeletedFilterDetachedRedirect, ResourceDispatcherHostTest.DetachWhileStartIsDeferred ResourceDispatcherHostTest.TestProcessCancelDetachedTimeout, ResourceDispatcherHostTest.CancelRequestsForContextDetached, ResourceDispatcherHostTest.DataSentBeforeDetach Review URL: https://codereview.chromium.org/59783003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236132 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/loader/resource_dispatcher_host_impl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content/browser/loader/resource_dispatcher_host_impl.h') diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index 851463e..ef0e4cf 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h @@ -238,6 +238,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl TestBlockedRequestsProcessDies); FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, CalculateApproximateMemoryCost); + FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, + DetachableResourceTimesOut); + FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, + TestProcessCancelDetachableTimesOut); class ShutdownTask; -- cgit v1.1