diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 21:58:29 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 21:58:29 +0000 |
commit | e32642f68ec20a267002648f335b0ca7c94dd4c3 (patch) | |
tree | 9f22982d24d5d2fa4f83e0deb664888c38bdfcc1 /net/base | |
parent | bf1677a58a4217675861e925e1028ea3494b90d8 (diff) | |
download | chromium_src-e32642f68ec20a267002648f335b0ca7c94dd4c3.zip chromium_src-e32642f68ec20a267002648f335b0ca7c94dd4c3.tar.gz chromium_src-e32642f68ec20a267002648f335b0ca7c94dd4c3.tar.bz2 |
Fix two issues with a downloaded file's extension:
1. On Mac, we were prepending an extra '.' to the extension causing
it to fail a comparison (resulting in second extension being added).
2. For downloads with the extension '.tgz' and mime type
'application/x-gzip', we were appending an extra '.gz' extension.
The extension compare code is starting to get a little long, but I
don't think it's too bad if there are only a few of these cases.
BUG=21591,21595
TEST=1. Download a file on Mac with a well known extension type (mp3, gz)
and notice that there are no double extensions. 2. Download a tgz file and
notice that the file's extension is '.tgz', not '.tgz.gz'.
Review URL: http://codereview.chromium.org/195064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/platform_mime_util_mac.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/base/platform_mime_util_mac.cc b/net/base/platform_mime_util_mac.cc index bf1cdee..ce8c336 100644 --- a/net/base/platform_mime_util_mac.cc +++ b/net/base/platform_mime_util_mac.cc @@ -50,11 +50,6 @@ bool PlatformMimeUtil::GetPreferredExtensionForMimeType( if (!ext_ref) return false; - ext_ref.reset(CFStringCreateWithFormat(kCFAllocatorDefault, - NULL, - CFSTR(".%@"), - ext_ref.get())); - *ext = base::SysCFStringRefToUTF8(ext_ref); return true; } |