1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_BASE_FILENAME_UTIL_UNSAFE_H_
6 #define NET_BASE_FILENAME_UTIL_UNSAFE_H_
10 #include "base/files/file_path.h"
11 #include "base/strings/string16.h"
12 #include "net/base/net_export.h"
18 // Extract extension from FilePath generated by GenerateFileName(), but without
19 // replacing illegal characters. Does not depend on ICU.
20 NET_EXPORT base::FilePath::StringType GenerateFileExtensionUnsafe(
22 const std::string& content_disposition,
23 const std::string& referrer_charset,
24 const std::string& suggested_name,
25 const std::string& mime_type,
26 const std::string& default_name);
30 #endif // NET_BASE_FILENAME_UTIL_UNSAFE_H_