Index: chrome/browser/download/download_target_determiner_delegate.h |
diff --git a/chrome/browser/download/download_target_determiner_delegate.h b/chrome/browser/download/download_target_determiner_delegate.h |
index 68271ffc51a2d70e4a311162d2ad5ee736e9612a..f2aeec6f03625bf71cb9a3a1461f2bd68d700f88 100644 |
--- a/chrome/browser/download/download_target_determiner_delegate.h |
+++ b/chrome/browser/download/download_target_determiner_delegate.h |
@@ -62,6 +62,11 @@ class DownloadTargetDeterminerDelegate { |
typedef base::Callback<void(content::DownloadDangerType danger_type)> |
CheckDownloadUrlCallback; |
+ // Callback to be invoked after GetFileMimeType() completes. The parameter |
+ // should be the MIME type of the requested file. If no MIME type can be |
+ // determined, it should be set to the empty string. |
+ typedef base::Callback<void(const std::string&)> GetFileMimeTypeCallback; |
+ |
// Notifies extensions of the impending filename determination. |virtual_path| |
// is the current suggested virtual path. The |callback| should be invoked to |
// indicate whether any extensions wish to override the path. |
@@ -110,6 +115,9 @@ class DownloadTargetDeterminerDelegate { |
const base::FilePath& virtual_path, |
const CheckDownloadUrlCallback& callback) = 0; |
+ // Get the MIME type for the given file. |
+ virtual void GetFileMimeType(const base::FilePath& path, |
+ const GetFileMimeTypeCallback& callback) = 0; |
protected: |
virtual ~DownloadTargetDeterminerDelegate(); |
}; |