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 26 matching lines...) Expand all Loading... |
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 IsUnsupportedTextMimeType(const std::string& mime_type); | 45 NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type); |
46 NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type); | 46 NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type); |
47 NET_EXPORT bool IsSupportedDartMimeType(const std::string& mime_type); | |
48 NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type); | 47 NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type); |
49 | 48 |
50 // Convenience function. | 49 // Convenience function. |
51 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); | 50 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); |
52 | 51 |
53 // Returns true if this the mime_type_pattern matches a given mime-type. | 52 // Returns true if this the mime_type_pattern matches a given mime-type. |
54 // Checks for absolute matching and wildcards. mime-types should be in | 53 // Checks for absolute matching and wildcards. mime-types should be in |
55 // lower case. | 54 // lower case. |
56 NET_EXPORT bool MatchesMimeType(const std::string& mime_type_pattern, | 55 NET_EXPORT bool MatchesMimeType(const std::string& mime_type_pattern, |
57 const std::string& mime_type); | 56 const std::string& mime_type); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 std::string* post_data); | 124 std::string* post_data); |
126 | 125 |
127 // Adds the final delimiter to a multi-part upload request. | 126 // Adds the final delimiter to a multi-part upload request. |
128 NET_EXPORT void AddMultipartFinalDelimiterForUpload( | 127 NET_EXPORT void AddMultipartFinalDelimiterForUpload( |
129 const std::string& mime_boundary, | 128 const std::string& mime_boundary, |
130 std::string* post_data); | 129 std::string* post_data); |
131 | 130 |
132 } // namespace net | 131 } // namespace net |
133 | 132 |
134 #endif // NET_BASE_MIME_UTIL_H__ | 133 #endif // NET_BASE_MIME_UTIL_H__ |
OLD | NEW |