Description[net] Cleanup filename_util and make it portable.
The interface for filename sanitization is confusing and error prone.
This CL cleans up the interface and changes the behavior to keep up with
changes made to filename sanitization made in base/i18n/file_util_icu.
- net::GetSuggestedFilename() is now gone. This was redundant with
net::GenerateFileName() which does the same thing.
- net::GenerateSafeFileName() is now net::EnsureSafePortableFileName().
- net::GenerateSafeFileName() was only checking if a given filename has
a safe extension and whether it was a reserved name.
net::EnsureSafePortableFileName() is a comprehensive filename
sanitization function that deals with illegal filename characters in
addition to the checks previously done by net::GenerateSafeFileName().
- As the name suggests, net::EnsureSafePortableFileName() performs the
same set of tests on all platforms.
Depends on: https://codereview.chromium.org/873843002
BUG=444102
R=mef@chromium.org
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #
Messages
Total messages: 4 (2 generated)
|