| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Functions used internally by filename_util, filename_util_icu and | 5 // Functions used internally by filename_util, filename_util_icu and |
| 6 // filename_util_unsafe. | 6 // filename_util_unsafe. |
| 7 | 7 |
| 8 #ifndef NET_BASE_FILENAME_UTIL_INTERNAL_H_ | 8 #ifndef NET_BASE_FILENAME_UTIL_INTERNAL_H_ |
| 9 #define NET_BASE_FILENAME_UTIL_INTERNAL_H_ | 9 #define NET_BASE_FILENAME_UTIL_INTERNAL_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 typedef base::Callback< | 21 typedef base::Callback<void(base::FilePath::StringType* file_name, |
| 22 void(base::FilePath::StringType* file_name, char replace_char)> | 22 char replace_char)> |
| 23 ReplaceIllegalCharactersCallback; | 23 ReplaceIllegalCharactersCallback; |
| 24 | 24 |
| 25 void SanitizeGeneratedFileName(base::FilePath::StringType* filename, | 25 void SanitizeGeneratedFileName(base::FilePath::StringType* filename, |
| 26 bool replace_trailing); | 26 bool replace_trailing); |
| 27 | 27 |
| 28 bool IsShellIntegratedExtension(const base::FilePath::StringType& extension); | 28 bool IsShellIntegratedExtension(const base::FilePath::StringType& extension); |
| 29 | 29 |
| 30 bool IsReservedName(const base::FilePath::StringType& filename); | 30 bool IsReservedName(const base::FilePath::StringType& filename); |
| 31 | 31 |
| 32 void EnsureSafeExtension(const std::string& mime_type, | 32 void EnsureSafeExtension(const std::string& mime_type, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 53 const std::string& content_disposition, | 53 const std::string& content_disposition, |
| 54 const std::string& referrer_charset, | 54 const std::string& referrer_charset, |
| 55 const std::string& suggested_name, | 55 const std::string& suggested_name, |
| 56 const std::string& mime_type, | 56 const std::string& mime_type, |
| 57 const std::string& default_name, | 57 const std::string& default_name, |
| 58 ReplaceIllegalCharactersCallback replace_illegal_characters_callback); | 58 ReplaceIllegalCharactersCallback replace_illegal_characters_callback); |
| 59 | 59 |
| 60 } // namespace net | 60 } // namespace net |
| 61 | 61 |
| 62 #endif // NET_BASE_FILENAME_UTIL_INTERNAL_H_ | 62 #endif // NET_BASE_FILENAME_UTIL_INTERNAL_H_ |
| OLD | NEW |