| Index: chrome/browser/download/download_service.h
|
| diff --git a/chrome/browser/download/download_service.h b/chrome/browser/download/download_service.h
|
| index 1c72b29105e0a10debdfdcc2dcb634c3cb085ff4..601b3edcafb9b4a13d8352fae29a45aeeb273f39 100644
|
| --- a/chrome/browser/download/download_service.h
|
| +++ b/chrome/browser/download/download_service.h
|
| @@ -15,6 +15,7 @@
|
|
|
| class ChromeDownloadManagerDelegate;
|
| class DownloadHistory;
|
| +class ExtensionDownloadsEventRouter;
|
| class Profile;
|
|
|
| namespace content {
|
| @@ -35,6 +36,12 @@ class DownloadService : public ProfileKeyedService {
|
| // no HistoryService for profile.
|
| DownloadHistory* GetDownloadHistory();
|
|
|
| +#if !defined(OS_ANDROID)
|
| + ExtensionDownloadsEventRouter* GetExtensionEventRouter() {
|
| + return extension_event_router_.get();
|
| + }
|
| +#endif
|
| +
|
| // Has a download manager been created?
|
| bool HasCreatedDownloadManager();
|
|
|
| @@ -65,6 +72,20 @@ class DownloadService : public ProfileKeyedService {
|
|
|
| scoped_ptr<DownloadHistory> download_history_;
|
|
|
| + // On Android, GET downloads are not handled by the DownloadManager.
|
| + // Once we have extensions on android, we probably need the EventRouter
|
| + // in ContentViewDownloadDelegate which knows about both GET and POST
|
| + // downloads.
|
| +#if !defined(OS_ANDROID)
|
| + // The ExtensionDownloadsEventRouter dispatches download creation, change, and
|
| + // erase events to extensions. Like ChromeDownloadManagerDelegate, it's a
|
| + // chrome-level concept and its lifetime should match DownloadManager. There
|
| + // should be a separate EDER for on-record and off-record managers.
|
| + // There does not appear to be a separate ExtensionSystem for on-record and
|
| + // off-record profiles, so ExtensionSystem cannot own the EDER.
|
| + scoped_ptr<ExtensionDownloadsEventRouter> extension_event_router_;
|
| +#endif
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(DownloadService);
|
| };
|
|
|
|
|