diff options
-rw-r--r-- | chrome/browser/renderer_host/safe_browsing_resource_handler.cc | 7 | ||||
-rw-r--r-- | chrome/browser/renderer_host/safe_browsing_resource_handler.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc index 0d0d058..22c6873 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc @@ -37,6 +37,13 @@ SafeBrowsingResourceHandler::SafeBrowsingResourceHandler( } } +SafeBrowsingResourceHandler::~SafeBrowsingResourceHandler() { + // If we're being deleted before the SafeBrowsing check has completed, cancel + // the check. + if (in_safe_browsing_check_) + safe_browsing_->CancelCheck(this); +} + bool SafeBrowsingResourceHandler::OnUploadProgress(int request_id, uint64 position, uint64 size) { diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.h b/chrome/browser/renderer_host/safe_browsing_resource_handler.h index a3c74ba..1585e35 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.h +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.h @@ -24,6 +24,7 @@ class SafeBrowsingResourceHandler : public ResourceHandler, ResourceType::Type resource_type, SafeBrowsingService* safe_browsing, ResourceDispatcherHost* resource_dispatcher_host); + ~SafeBrowsingResourceHandler(); // ResourceHandler implementation: bool OnUploadProgress(int request_id, uint64 position, uint64 size); |