diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 18:49:10 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 18:49:10 +0000 |
commit | b8c24a6a6c2a30775b27d0089cb274e768a1c778 (patch) | |
tree | a5362bb4cd44feb14e697bd4b09e3f234f8a09ed /chrome/browser/shell_dialogs.h | |
parent | 202e66edae7273b1ca6a2c8383877eb11fdd5305 (diff) | |
download | chromium_src-b8c24a6a6c2a30775b27d0089cb274e768a1c778.zip chromium_src-b8c24a6a6c2a30775b27d0089cb274e768a1c778.tar.gz chromium_src-b8c24a6a6c2a30775b27d0089cb274e768a1c778.tar.bz2 |
Clean up and simplify how we deal with filename extensions on Windows. Allow users to use any name or extension they want, and only append the "desired" extension when the user's name doesn't have any known extension. Original patch by Jared Wein (see http://codereview.chromium.org/2825010 ), r=me.
BUG=7499
TEST=Right-click on link, choose "Save link as...", leave the file type as the default but change the file name to have a different extension. Ensure that the browser doesn't append the original extension.
Review URL: http://codereview.chromium.org/2893001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_dialogs.h')
-rw-r--r-- | chrome/browser/shell_dialogs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index 878424e2..fb6ff45 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -17,6 +17,12 @@ namespace gfx { class Font; } +// This function is declared extern such that it is accessible for unit tests +// in /chrome/browser/views/shell_dialogs_win_unittest.cc +extern std::wstring AppendExtensionIfNeeded(const std::wstring& filename, + const std::wstring& filter_selected, + const std::wstring& suggested_ext); + // A base class for shell dialogs. class BaseShellDialog { public: |