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

Unified Diff: content/browser/resource_context_impl.cc

Issue 9836066: Have content cancel requests for ResourceContexts when they shutdown, instead of depending on the e… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « content/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context_impl.cc
===================================================================
--- content/browser/resource_context_impl.cc (revision 128565)
+++ content/browser/resource_context_impl.cc (working copy)
@@ -12,6 +12,7 @@
#include "content/browser/in_process_webkit/indexed_db_context_impl.h"
#include "content/browser/net/view_blob_internals_job_factory.h"
#include "content/browser/net/view_http_cache_job_factory.h"
+#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/resource_request_info_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -165,6 +166,11 @@
context, kAppCacheServicKeyName);
}
+ResourceContext::~ResourceContext() {
+ if (ResourceDispatcherHostImpl::Get())
+ ResourceDispatcherHostImpl::Get()->CancelRequestsForContext(this);
+}
+
BlobStorageController* GetBlobStorageControllerForResourceContext(
ResourceContext* resource_context) {
return GetChromeBlobStorageContextForResourceContext(resource_context)->
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698