diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-17 19:57:24 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-17 19:57:24 +0000 |
commit | 15bc8050874dd8108a222e17e99344afcbe99a55 (patch) | |
tree | debfdefa16e4f4eb360f80f4e29461b0ec7f096f /chrome/common/win_util.h | |
parent | 70a07ef6d9647d7b519638352cd17fa00ff22107 (diff) | |
download | chromium_src-15bc8050874dd8108a222e17e99344afcbe99a55.zip chromium_src-15bc8050874dd8108a222e17e99344afcbe99a55.tar.gz chromium_src-15bc8050874dd8108a222e17e99344afcbe99a55.tar.bz2 |
Fixes saving files that don't have valid extensions.
Two fixes here. First was a disturbing discovery that FilePath::Extension returns an extension starting with a period. I am of the belief that this is the wrong API to expose, but that's a different fight. Fixed.
Second is a subtle behavior of the old code that wasn't preserved. In the case where the extension did not exist in the registry, the old code dropped the extension from the filter. We now also do so.
BUG=10561
Review URL: http://codereview.chromium.org/79045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.h')
-rw-r--r-- | chrome/common/win_util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/common/win_util.h b/chrome/common/win_util.h index 1dbfe21..679f405 100644 --- a/chrome/common/win_util.h +++ b/chrome/common/win_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -146,6 +146,9 @@ bool OpenItemWithExternalApp(const std::wstring& full_path); // ext_desc: { "Text Document" } // returned: "Text Document\0*.txt\0HTML Document\0.htm;.html\0" // "All Files\0*.*\0\0" (in one big string) +// If a description is not provided for a file extension, it will be retrieved +// from the registry. If the file extension does not exist in the registry, it +// will be omitted from the filter, as it is likely a bogus extension. std::wstring FormatFilterForExtensions( const std::vector<std::wstring>& file_ext, const std::vector<std::wstring>& ext_desc, |