| Index: chrome/browser/download/chrome_download_manager_delegate.h
|
| diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
|
| index c10cb1d4d67972aacdaadcc7464773bf7a62de8e..fc392b4de8289c822efa78919bcb6f10cfedad60 100644
|
| --- a/chrome/browser/download/chrome_download_manager_delegate.h
|
| +++ b/chrome/browser/download/chrome_download_manager_delegate.h
|
| @@ -19,7 +19,6 @@
|
| #include "content/public/browser/notification_registrar.h"
|
|
|
| class DownloadPrefs;
|
| -class ExtensionDownloadsEventRouter;
|
| class Profile;
|
|
|
| namespace content {
|
| @@ -138,6 +137,8 @@ class ChromeDownloadManagerDelegate
|
| private:
|
| friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>;
|
|
|
| + struct ContinueFilenameDeterminationInfo;
|
| +
|
| // content::NotificationObserver implementation.
|
| virtual void Observe(int type,
|
| const content::NotificationSource& source,
|
| @@ -196,6 +197,22 @@ class ChromeDownloadManagerDelegate
|
| const FilePath& reserved_path,
|
| bool reserved_path_verified);
|
|
|
| + // When an extension opts to change a download's target filename, this
|
| + // sanitizes it before continuing with the filename determination process.
|
| + void OnExtensionOverridingFilename(
|
| + const ContinueFilenameDeterminationInfo& continue_info,
|
| + const FilePath& changed_filename,
|
| + bool overwrite);
|
| +
|
| + // When extensions either opt not to change a download's target filename, or
|
| + // the changed filename has been sanitized, this method continues with the
|
| + // filename determination process, optionally prompting the user to manually
|
| + // set the filename.
|
| + void ContinueDeterminingFilename(
|
| + const ContinueFilenameDeterminationInfo& continue_info,
|
| + const FilePath& suggested_path,
|
| + bool is_forced_path);
|
| +
|
| // Called on the UI thread once the final target path is available.
|
| void OnTargetPathDetermined(
|
| int32 download_id,
|
| @@ -232,20 +249,6 @@ class ChromeDownloadManagerDelegate
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
| - // 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
|
| -
|
| // The directory most recently chosen by the user in response to a Save As
|
| // dialog for a regular download.
|
| FilePath last_download_path_;
|
|
|