OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool IsStrictMediaMimeType(const std::string& mime_type); | 64 bool IsStrictMediaMimeType(const std::string& mime_type); |
65 | 65 |
66 // Check to see if a particular MIME type is in our list which only supports a | 66 // Check to see if a particular MIME type is in our list which only supports a |
67 // certain subset of codecs. Returns true if and only if all codecs are | 67 // certain subset of codecs. Returns true if and only if all codecs are |
68 // supported for that specific MIME type, false otherwise. If this returns | 68 // supported for that specific MIME type, false otherwise. If this returns |
69 // false you will still need to check if the media MIME tpyes and codecs are | 69 // false you will still need to check if the media MIME tpyes and codecs are |
70 // supported. | 70 // supported. |
71 bool IsSupportedStrictMediaMimeType(const std::string& mime_type, | 71 bool IsSupportedStrictMediaMimeType(const std::string& mime_type, |
72 const std::vector<std::string>& codecs); | 72 const std::vector<std::string>& codecs); |
73 | 73 |
| 74 // Get the extensions for images files. |
| 75 // Note that we do not erase the existing elements in the the provided vector. |
| 76 // Instead, we append the result to it. |
| 77 void GetImageExtensions(std::vector<FilePath::StringType>* extensions); |
| 78 |
| 79 // Get the extensions for audio files. |
| 80 // Note that we do not erase the existing elements in the the provided vector. |
| 81 // Instead, we append the result to it. |
| 82 void GetAudioExtensions(std::vector<FilePath::StringType>* extensions); |
| 83 |
| 84 // Get the extensions for video files. |
| 85 // Note that we do not erase the existing elements in the the provided vector. |
| 86 // Instead, we append the result to it. |
| 87 void GetVideoExtensions(std::vector<FilePath::StringType>* extensions); |
| 88 |
| 89 // Get the extensions associated with the given mime type. |
| 90 // There could be multiple extensions for a given mime type, like "html,htm" |
| 91 // for "text/html". |
| 92 // Note that we do not erase the existing elements in the the provided vector. |
| 93 // Instead, we append the result to it. |
| 94 void GetExtensionsForMimeType(const std::string& mime_type, |
| 95 std::vector<FilePath::StringType>* extensions); |
| 96 |
74 } // namespace net | 97 } // namespace net |
75 | 98 |
76 #endif // NET_BASE_MIME_UTIL_H__ | 99 #endif // NET_BASE_MIME_UTIL_H__ |
OLD | NEW |