Fix issue 4829: No file extensions listed when saving images
We were not supplying a filter list for the Save As dialog.
Now that we do, the user can select between, for example, say *.jpg and *.* as filters and we behave as follows:
With a *.jpg filter active, user enters foo and we save the file as: foo.jpg
With a *.jpg filter active, user enters foo. and we save the file as: foo..jpg (which is consistent with IE)
With a *.jpg filter active, user enters foo.jpg, we save the file as: foo.jpg
With a *.jpg filter active, user enters foo.jpeg, we save the file as: foo.jpeg (not foo.jpg or foo.jpeg.jpg)
With a *.* filter active, we respect whatever user enters as extension, except if the filename contains one or more trailing dots then we strip out all those trailing dots.
Also test filenames created when saving web pages, as opposed to images (should work as before).
Review URL: http://codereview.chromium.org/12836
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6258 0039d316-1c4b-4281-b951-d872f2087c98