summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:56:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:56:02 +0000
commitdcf7d3525aa9b1f16b56a16d16108262db0571ee (patch)
tree91228f9d96aa74f102df742cdf76598cbb328958 /chrome/browser/download/save_package.cc
parent387b71b7d1d1bf267cbe088136610959b319f3b3 (diff)
downloadchromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.zip
chromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.tar.gz
chromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.tar.bz2
Coalesce more hardcoded schemes to using predefined constants.
Review URL: http://codereview.chromium.org/31008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 9db2610..1bccaa9 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -28,6 +28,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/stl_util-inl.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_util.h"
@@ -1068,8 +1069,10 @@ bool SavePackage::GetSaveInfo(const FilePath& suggest_name,
// Static
bool SavePackage::IsSavableURL(const GURL& url) {
- return url.SchemeIs("http") || url.SchemeIs("https") ||
- url.SchemeIs("file") || url.SchemeIs("ftp");
+ return url.SchemeIs(chrome::kHttpScheme) ||
+ url.SchemeIs(chrome::kHttpsScheme) ||
+ url.SchemeIs(chrome::kFileScheme) ||
+ url.SchemeIs(chrome::kFtpScheme);
}
// Static