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 28 matching lines...) Expand all Loading... |
39 FilePath::StringType* extension); | 39 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 IsSupportedCertificateMimeType(const std::string& mime_type); | 47 NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type); |
48 | 48 |
49 // Get whether this mime type should be displayed in view-source mode. | |
50 // (For example, XML.) | |
51 NET_EXPORT bool IsViewSourceMimeType(const std::string& mime_type); | |
52 | |
53 // Convenience function. | 49 // Convenience function. |
54 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); | 50 NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type); |
55 | 51 |
56 // 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. |
57 // Checks for absolute matching and wildcards. mime-types should be in | 53 // Checks for absolute matching and wildcards. mime-types should be in |
58 // lower case. | 54 // lower case. |
59 NET_EXPORT bool MatchesMimeType(const std::string& mime_type_pattern, | 55 NET_EXPORT bool MatchesMimeType(const std::string& mime_type_pattern, |
60 const std::string& mime_type); | 56 const std::string& mime_type); |
61 | 57 |
62 // Returns true if the |type_string| is a correctly-formed mime type specifier. | 58 // Returns true if the |type_string| is a correctly-formed mime type specifier. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 #include "net/base/mime_util_certificate_type_list.h" | 115 #include "net/base/mime_util_certificate_type_list.h" |
120 #undef CERTIFICATE_MIME_TYPE | 116 #undef CERTIFICATE_MIME_TYPE |
121 }; | 117 }; |
122 | 118 |
123 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType( | 119 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType( |
124 const std::string& mime_type); | 120 const std::string& mime_type); |
125 | 121 |
126 } // namespace net | 122 } // namespace net |
127 | 123 |
128 #endif // NET_BASE_MIME_UTIL_H__ | 124 #endif // NET_BASE_MIME_UTIL_H__ |
OLD | NEW |