Index: chrome/browser/download/download_service.cc |
diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc |
index dae3bc4e1d2177b6256dc7a8a3ee91cbf93b1a85..95cae8f875b98c175511aa8d2badac5c346176b6 100644 |
--- a/chrome/browser/download/download_service.cc |
+++ b/chrome/browser/download/download_service.cc |
@@ -10,6 +10,7 @@ |
#include "chrome/browser/download/download_history.h" |
#include "chrome/browser/download/download_service_factory.h" |
#include "chrome/browser/download/download_status_updater.h" |
+#include "chrome/browser/extensions/api/downloads/downloads_api.h" |
#include "chrome/browser/history/history.h" |
#include "chrome/browser/history/history_service_factory.h" |
#include "chrome/browser/net/chrome_net_log.h" |
@@ -45,6 +46,11 @@ ChromeDownloadManagerDelegate* DownloadService::GetDownloadManagerDelegate() { |
manager_delegate_->SetDownloadManager(manager); |
+#if !defined(OS_ANDROID) |
+ extension_event_router_.reset(new ExtensionDownloadsEventRouter( |
+ profile_, manager)); |
+#endif |
+ |
if (!profile_->IsOffTheRecord()) { |
HistoryService* hs = HistoryServiceFactory::GetForProfile( |
profile_, Profile::EXPLICIT_ACCESS); |
@@ -120,6 +126,9 @@ void DownloadService::Shutdown() { |
// manually earlier. See http://crbug.com/131692 |
BrowserContext::GetDownloadManager(profile_)->Shutdown(); |
} |
+#if !defined(OS_ANDROID) |
+ extension_event_router_.reset(); |
+#endif |
manager_delegate_ = NULL; |
download_history_.reset(); |
} |