Index: chrome/browser/safe_browsing/safe_browsing_service.h |
=================================================================== |
--- chrome/browser/safe_browsing/safe_browsing_service.h (revision 106761) |
+++ chrome/browser/safe_browsing/safe_browsing_service.h (working copy) |
@@ -267,6 +267,8 @@ |
return csd_service_.get(); |
} |
+ // The DownloadProtectionService is not valid after the SafeBrowsingService |
+ // is destroyed. |
safe_browsing::DownloadProtectionService* |
download_protection_service() const { |
return download_service_.get(); |
@@ -472,6 +474,10 @@ |
// starts or stops the service accordingly. |
void RefreshState(); |
+ // Arranges to delete |download_service_| on the IO thread, and sets |
+ // the pointer to NULL. |
+ void ShutDownDownloadService(); |
+ |
// The factory used to instanciate a SafeBrowsingService object. |
// Useful for tests, so they can provide their own implementation of |
// SafeBrowsingService. |
@@ -556,7 +562,7 @@ |
// The DownloadProtectionService is managed by the SafeBrowsingService, |
// since its running state and lifecycle depends on SafeBrowsingService's. |
- scoped_refptr<safe_browsing::DownloadProtectionService> download_service_; |
+ scoped_ptr<safe_browsing::DownloadProtectionService> download_service_; |
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
}; |