diff options
Diffstat (limited to 'chrome/browser/download/download_util.cc')
-rw-r--r-- | chrome/browser/download/download_util.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index 737f30a..857c3a4 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -40,6 +40,7 @@ #include "content/public/browser/download_file.h" #include "content/public/browser/download_item.h" #include "content/public/browser/download_manager.h" +#include "content/public/common/url_constants.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "grit/theme_resources.h" @@ -599,4 +600,13 @@ FilePath GetCrDownloadPath(const FilePath& suggested_path) { suggested_path, FILE_PATH_LITERAL(".crdownload")); } +bool IsSavableURL(const GURL& url) { + for (int i = 0; chrome::GetSavableSchemes()[i] != NULL; ++i) { + if (url.SchemeIs(chrome::GetSavableSchemes()[i])) { + return true; + } + } + return false; +} + } // namespace download_util |