Chromium Code Reviews| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 | 78 |
| 79 // Check to see if a particular MIME type is in our list which only supports a | 79 // Check to see if a particular MIME type is in our list which only supports a |
| 80 // certain subset of codecs. Returns true if and only if all codecs are | 80 // certain subset of codecs. Returns true if and only if all codecs are |
| 81 // supported for that specific MIME type, false otherwise. If this returns | 81 // supported for that specific MIME type, false otherwise. If this returns |
| 82 // false you will still need to check if the media MIME tpyes and codecs are | 82 // false you will still need to check if the media MIME tpyes and codecs are |
| 83 // supported. | 83 // supported. |
| 84 NET_EXPORT bool IsSupportedStrictMediaMimeType( | 84 NET_EXPORT bool IsSupportedStrictMediaMimeType( |
| 85 const std::string& mime_type, | 85 const std::string& mime_type, |
| 86 const std::vector<std::string>& codecs); | 86 const std::vector<std::string>& codecs); |
| 87 | 87 |
| 88 // Check to see if a particular MIME type specifically requires codecs parameter | |
| 89 // not to be present with it. | |
|
Ryan Sleevi
2014/04/10 19:04:16
The comment here needs to be improved, but unfortu
amogh.bihani
2014/04/11 05:24:07
There are two things:
[a] Browser will never reach
Ryan Sleevi
2014/04/14 23:52:25
The naming here still bothers me, in that it doesn
amogh.bihani
2014/04/15 13:26:50
Done. :)
| |
| 90 NET_EXPORT bool MimeTypeDoesNotNeedCodecs(const std::string& mime_type); | |
| 91 | |
| 88 // Get the extensions associated with the given mime type. This should be passed | 92 // Get the extensions associated with the given mime type. This should be passed |
| 89 // in lower case. There could be multiple extensions for a given mime type, like | 93 // in lower case. There could be multiple extensions for a given mime type, like |
| 90 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*". | 94 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*". |
| 91 // Note that we do not erase the existing elements in the the provided vector. | 95 // Note that we do not erase the existing elements in the the provided vector. |
| 92 // Instead, we append the result to it. | 96 // Instead, we append the result to it. |
| 93 NET_EXPORT void GetExtensionsForMimeType( | 97 NET_EXPORT void GetExtensionsForMimeType( |
| 94 const std::string& mime_type, | 98 const std::string& mime_type, |
| 95 std::vector<base::FilePath::StringType>* extensions); | 99 std::vector<base::FilePath::StringType>* extensions); |
| 96 | 100 |
| 97 // Test only method that removes proprietary media types and codecs from the | 101 // Test only method that removes proprietary media types and codecs from the |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 124 std::string* post_data); | 128 std::string* post_data); |
| 125 | 129 |
| 126 // Adds the final delimiter to a multi-part upload request. | 130 // Adds the final delimiter to a multi-part upload request. |
| 127 NET_EXPORT void AddMultipartFinalDelimiterForUpload( | 131 NET_EXPORT void AddMultipartFinalDelimiterForUpload( |
| 128 const std::string& mime_boundary, | 132 const std::string& mime_boundary, |
| 129 std::string* post_data); | 133 std::string* post_data); |
| 130 | 134 |
| 131 } // namespace net | 135 } // namespace net |
| 132 | 136 |
| 133 #endif // NET_BASE_MIME_UTIL_H__ | 137 #endif // NET_BASE_MIME_UTIL_H__ |
| OLD | NEW |