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

Unified Diff: net/base/filename_util_unsafe.cc

Issue 1008873006: [net] Remove logic for fixing up Gzip encoding type for downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a basic test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/filename_util_unsafe.h ('k') | net/filter/filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util_unsafe.cc
diff --git a/net/base/filename_util_unsafe.cc b/net/base/filename_util_unsafe.cc
deleted file mode 100644
index 12e80dcf32d5f701b5525b413266451e9e662d36..0000000000000000000000000000000000000000
--- a/net/base/filename_util_unsafe.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 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.
-
-#include "net/base/filename_util_unsafe.h"
-
-#include "base/bind.h"
-#include "base/strings/string_util.h"
-#include "net/base/filename_util_internal.h"
-
-namespace {
-
-// Local ICU-independent implementation of filename sanitizing functions defined
-// in base/i18n/file_util_icu.h. Does not require ICU because on POSIX systems
-// all international characters are considered legal, so only control and
-// special characters have to be replaced.
-const base::FilePath::CharType illegal_characters[] =
- FILE_PATH_LITERAL("\"*/:<>?\\\\|\001\002\003\004\005\006\007\010\011\012")
- FILE_PATH_LITERAL("\013\014\015\016\017\020\021\022\023\024\025\025\027");
-
-void ReplaceIllegalCharactersInPath(base::FilePath::StringType* file_name,
- char replace_char) {
- base::ReplaceChars(*file_name,
- illegal_characters,
- base::FilePath::StringType(1, replace_char),
- file_name);
-}
-
-} // namespace
-
-namespace net {
-
-base::FilePath::StringType GenerateFileExtensionUnsafe(
- const GURL& url,
- const std::string& content_disposition,
- const std::string& referrer_charset,
- const std::string& suggested_name,
- const std::string& mime_type,
- const std::string& default_file_name) {
- base::FilePath filepath =
- GenerateFileNameImpl(url,
- content_disposition,
- referrer_charset,
- suggested_name,
- mime_type,
- default_file_name,
- base::Bind(&ReplaceIllegalCharactersInPath));
- return filepath.Extension();
-}
-
-} // namespace net
« no previous file with comments | « net/base/filename_util_unsafe.h ('k') | net/filter/filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698