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 #include <algorithm> | 5 #include <algorithm> |
6 #include <iterator> | 6 #include <iterator> |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 { "application/postscript", "ps,eps,ai" }, | 151 { "application/postscript", "ps,eps,ai" }, |
152 { "application/javascript", "js" }, | 152 { "application/javascript", "js" }, |
153 { "application/font-woff", "woff" }, | 153 { "application/font-woff", "woff" }, |
154 { "image/bmp", "bmp" }, | 154 { "image/bmp", "bmp" }, |
155 { "image/x-icon", "ico" }, | 155 { "image/x-icon", "ico" }, |
156 { "image/vnd.microsoft.icon", "ico" }, | 156 { "image/vnd.microsoft.icon", "ico" }, |
157 { "image/jpeg", "jfif,pjpeg,pjp" }, | 157 { "image/jpeg", "jfif,pjpeg,pjp" }, |
158 { "image/tiff", "tiff,tif" }, | 158 { "image/tiff", "tiff,tif" }, |
159 { "image/x-xbitmap", "xbm" }, | 159 { "image/x-xbitmap", "xbm" }, |
160 { "image/svg+xml", "svg,svgz" }, | 160 { "image/svg+xml", "svg,svgz" }, |
| 161 { "image/x-png", "png"}, |
161 { "message/rfc822", "eml" }, | 162 { "message/rfc822", "eml" }, |
162 { "text/plain", "txt,text" }, | 163 { "text/plain", "txt,text" }, |
163 { "text/html", "ehtml" }, | 164 { "text/html", "ehtml" }, |
164 { "application/rss+xml", "rss" }, | 165 { "application/rss+xml", "rss" }, |
165 { "application/rdf+xml", "rdf" }, | 166 { "application/rdf+xml", "rdf" }, |
166 { "text/xml", "xsl,xbl,xslt" }, | 167 { "text/xml", "xsl,xbl,xslt" }, |
167 { "application/vnd.mozilla.xul+xml", "xul" }, | 168 { "application/vnd.mozilla.xul+xml", "xul" }, |
168 { "application/x-shockwave-flash", "swf,swl" }, | 169 { "application/x-shockwave-flash", "swf,swl" }, |
169 { "application/pkcs7-mime", "p7m,p7c,p7z" }, | 170 { "application/pkcs7-mime", "p7m,p7c,p7z" }, |
170 { "application/pkcs7-signature", "p7s" } | 171 { "application/pkcs7-signature", "p7s" } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 static const char* const supported_image_types[] = { | 254 static const char* const supported_image_types[] = { |
254 "image/jpeg", | 255 "image/jpeg", |
255 "image/pjpeg", | 256 "image/pjpeg", |
256 "image/jpg", | 257 "image/jpg", |
257 "image/webp", | 258 "image/webp", |
258 "image/png", | 259 "image/png", |
259 "image/gif", | 260 "image/gif", |
260 "image/bmp", | 261 "image/bmp", |
261 "image/vnd.microsoft.icon", // ico | 262 "image/vnd.microsoft.icon", // ico |
262 "image/x-icon", // ico | 263 "image/x-icon", // ico |
263 "image/x-xbitmap" // xbm | 264 "image/x-xbitmap", // xbm |
| 265 "image/x-png" |
264 }; | 266 }; |
265 | 267 |
266 // A list of media types: http://en.wikipedia.org/wiki/Internet_media_type | 268 // A list of media types: http://en.wikipedia.org/wiki/Internet_media_type |
267 // A comprehensive mime type list: http://plugindoc.mozdev.org/winmime.php | 269 // A comprehensive mime type list: http://plugindoc.mozdev.org/winmime.php |
268 // This set of codecs is supported by all variations of Chromium. | 270 // This set of codecs is supported by all variations of Chromium. |
269 static const char* const common_media_types[] = { | 271 static const char* const common_media_types[] = { |
270 // Ogg. | 272 // Ogg. |
271 "audio/ogg", | 273 "audio/ogg", |
272 "application/ogg", | 274 "application/ogg", |
273 #if !defined(OS_ANDROID) // Android doesn't support Ogg Theora. | 275 #if !defined(OS_ANDROID) // Android doesn't support Ogg Theora. |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 post_data->append("\r\n" + value + "\r\n"); | 1036 post_data->append("\r\n" + value + "\r\n"); |
1035 } | 1037 } |
1036 | 1038 |
1037 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, | 1039 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, |
1038 std::string* post_data) { | 1040 std::string* post_data) { |
1039 DCHECK(post_data); | 1041 DCHECK(post_data); |
1040 post_data->append("--" + mime_boundary + "--\r\n"); | 1042 post_data->append("--" + mime_boundary + "--\r\n"); |
1041 } | 1043 } |
1042 | 1044 |
1043 } // namespace net | 1045 } // namespace net |
OLD | NEW |