Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Issue 869233006: [net] Cleanup filename_util and make it portable. (Closed)

Created:
5 years, 11 months ago by asanka
Modified:
4 years, 5 months ago
Reviewers:
CC:
benjhayden+dwatch_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dcheng, jam, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@clang-format-filename-tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+569 lines, -747 lines) Patch
M chrome/browser/download/download_target_determiner.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/browser/download/save_package.cc View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_drag_source_mac.mm View 1 chunk +3 lines, -6 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 1 chunk +5 lines, -6 lines 0 comments Download
M net/base/filename_util.h View 2 chunks +42 lines, -34 lines 0 comments Download
M net/base/filename_util.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M net/base/filename_util_icu.cc View 2 chunks +61 lines, -57 lines 0 comments Download
M net/base/filename_util_internal.h View 1 chunk +8 lines, -30 lines 0 comments Download
M net/base/filename_util_internal.cc View 1 2 3 4 chunks +201 lines, -218 lines 0 comments Download
M net/base/filename_util_unittest.cc View 1 18 chunks +221 lines, -348 lines 0 comments Download
M net/base/filename_util_unsafe.cc View 3 chunks +14 lines, -13 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_win.cc View 2 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (2 generated)
asanka
mef: Can you look at //net? Once those changes are reviewed, I can add OWNERS ...
5 years, 10 months ago (2015-01-30 23:45:26 UTC) #1
asanka
5 years, 10 months ago (2015-02-05 22:41:30 UTC) #2
On 2015/01/30 at 23:45:26, asanka wrote:
> mef: Can you look at //net? Once those changes are reviewed, I can add OWNERS
for the rest of the review.

Ping?

Powered by Google App Engine
This is Rietveld 408576698