| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_BASE_MIME_UTIL_H__ | 5 #ifndef NET_BASE_MIME_UTIL_H__ |
| 6 #define NET_BASE_MIME_UTIL_H__ | 6 #define NET_BASE_MIME_UTIL_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // Returns true if a corresponding file extension exists. The extension is | 35 // Returns true if a corresponding file extension exists. The extension is |
| 36 // returned without a prefixed dot, ex "html". | 36 // returned without a prefixed dot, ex "html". |
| 37 NET_EXPORT bool GetPreferredExtensionForMimeType( | 37 NET_EXPORT bool GetPreferredExtensionForMimeType( |
| 38 const std::string& mime_type, | 38 const std::string& mime_type, |
| 39 base::FilePath::StringType* extension); | 39 base::FilePath::StringType* extension); |
| 40 | 40 |
| 41 // Check to see if a particular MIME type is in our list. | 41 // Check to see if a particular MIME type is in our list. |
| 42 NET_EXPORT bool IsSupportedImageMimeType(const std::string& mime_type); | 42 NET_EXPORT bool IsSupportedImageMimeType(const std::string& mime_type); |
| 43 NET_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type); | 43 NET_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type); |
| 44 NET_EXPORT bool IsSupportedNonImageMimeType(const std::string& mime_type); | 44 NET_EXPORT bool IsSupportedNonImageMimeType(const std::string& mime_type); |
| 45 NET_EXPORT bool IsSupportedImagePrefixedMimeType(const std::string& mime_type); |
| 45 NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type); | 46 NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type); |
| 46 NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type); | 47 NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type); |
| 47 NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type); | 48 NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type); |
| 48 | 49 |
| 49 // Convenience function. | 50 // Convenience function. |
| 50 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); | 51 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); |
| 51 | 52 |
| 52 // Returns true if this the mime_type_pattern matches a given mime-type. | 53 // Returns true if this the mime_type_pattern matches a given mime-type. |
| 53 // Checks for absolute matching and wildcards. mime-types should be in | 54 // Checks for absolute matching and wildcards. mime-types should be in |
| 54 // lower case. | 55 // lower case. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 std::string* post_data); | 165 std::string* post_data); |
| 165 | 166 |
| 166 // Adds the final delimiter to a multi-part upload request. | 167 // Adds the final delimiter to a multi-part upload request. |
| 167 NET_EXPORT void AddMultipartFinalDelimiterForUpload( | 168 NET_EXPORT void AddMultipartFinalDelimiterForUpload( |
| 168 const std::string& mime_boundary, | 169 const std::string& mime_boundary, |
| 169 std::string* post_data); | 170 std::string* post_data); |
| 170 | 171 |
| 171 } // namespace net | 172 } // namespace net |
| 172 | 173 |
| 173 #endif // NET_BASE_MIME_UTIL_H__ | 174 #endif // NET_BASE_MIME_UTIL_H__ |
| OLD | NEW |