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 // This file defines MIME utility functions. All of them assume the MIME type | 8 // This file defines MIME utility functions. All of them assume the MIME type |
9 // to be of the format specified by rfc2045. According to it, MIME types are | 9 // to be of the format specified by rfc2045. According to it, MIME types are |
10 // case strongly insensitive except parameter values, which may or may not be | 10 // case strongly insensitive except parameter values, which may or may not be |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 const std::string& value, | 159 const std::string& value, |
160 const std::string& mime_boundary, | 160 const std::string& mime_boundary, |
161 const std::string& content_type, | 161 const std::string& content_type, |
162 std::string* post_data); | 162 std::string* post_data); |
163 | 163 |
164 // Adds the final delimiter to a multi-part upload request. | 164 // Adds the final delimiter to a multi-part upload request. |
165 NET_EXPORT void AddMultipartFinalDelimiterForUpload( | 165 NET_EXPORT void AddMultipartFinalDelimiterForUpload( |
166 const std::string& mime_boundary, | 166 const std::string& mime_boundary, |
167 std::string* post_data); | 167 std::string* post_data); |
168 | 168 |
169 struct MimeInfo { | |
170 const char* const mime_type; | |
171 const char* const extensions; // comma separated list | |
172 }; | |
173 | |
174 // Find mime type of |ext| from |mapping|. | |
eroman
2015/05/18 15:45:24
Find --> Finds
|mapping| --> |mappings|
yawano
2015/05/19 02:26:40
Done.
| |
175 const char* FindMimeType(const MimeInfo* mappings, | |
176 size_t mappings_len, | |
177 const char* ext); | |
178 | |
169 } // namespace net | 179 } // namespace net |
170 | 180 |
171 #endif // NET_BASE_MIME_UTIL_H__ | 181 #endif // NET_BASE_MIME_UTIL_H__ |
OLD | NEW |