summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 18:37:31 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 18:37:31 +0000
commit630947caffc803a4cc96e3754af45aeedc957c0c (patch)
tree3950c0a479831c51a008a4ef210829a041498f33 /chrome/browser/download/save_package.cc
parent055aedeb2134e49c10c3b3a3593cb8df768d737c (diff)
downloadchromium_src-630947caffc803a4cc96e3754af45aeedc957c0c.zip
chromium_src-630947caffc803a4cc96e3754af45aeedc957c0c.tar.gz
chromium_src-630947caffc803a4cc96e3754af45aeedc957c0c.tar.bz2
Enable localization of default downloaded filename.
Instead of localizing "download" string in net_util.cc, make a caller, download_manger, provide a localized string. BUG=25289 TEST=NetUtilTest.GetSuggestedFilename,DownloadManagerTest.TestDownloadFilename Original patch by hayato@google.com at: http://codereview.chromium.org/343014/show Review URL: http://codereview.chromium.org/367003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 15e4787..e4df35a 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/download/save_package.h"
#include "app/l10n_util.h"
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/i18n/file_util_icu.h"
#include "base/logging.h"
@@ -67,7 +68,8 @@ namespace {
// Default name which will be used when we can not get proper name from
// resource URL.
-const char kDefaultSaveName[] = "saved_resource";
+const FilePath::CharType kDefaultSaveName[] =
+ FILE_PATH_LITERAL("saved_resource");
const FilePath::CharType kDefaultHtmlExtension[] =
#if defined(OS_WIN)
@@ -339,7 +341,7 @@ bool SavePackage::GenerateFilename(const std::string& disposition,
// TODO(jungshik): Figure out the referrer charset when having one
// makes sense and pass it to GetSuggestedFilename.
FilePath file_path = net::GetSuggestedFilename(url, disposition, "",
- kDefaultSaveName);
+ FilePath(kDefaultSaveName));
DCHECK(!file_path.empty());
FilePath::StringType pure_file_name =