OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "net/base/mime_util.h" | 8 #include "net/base/mime_util.h" |
9 #include "net/base/platform_mime_util.h" | 9 #include "net/base/platform_mime_util.h" |
10 | 10 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 "application/xhtml+xml", | 265 "application/xhtml+xml", |
266 "application/rss+xml", | 266 "application/rss+xml", |
267 "application/atom+xml", | 267 "application/atom+xml", |
268 "application/json", | 268 "application/json", |
269 "application/x-x509-user-cert", | 269 "application/x-x509-user-cert", |
270 "multipart/related", // For MHTML support. | 270 "multipart/related", // For MHTML support. |
271 "multipart/x-mixed-replace" | 271 "multipart/x-mixed-replace" |
272 // Note: ADDING a new type here will probably render it AS HTML. This can | 272 // Note: ADDING a new type here will probably render it AS HTML. This can |
273 // result in cross site scripting. | 273 // result in cross site scripting. |
274 }; | 274 }; |
275 COMPILE_ASSERT(arraysize(supported_non_image_types) == 17, | |
276 supported_non_images_types_must_equal_17); | |
277 | 275 |
278 // Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript. | 276 // Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript. |
279 // Mozilla 1.8 accepts application/javascript, application/ecmascript, and | 277 // Mozilla 1.8 accepts application/javascript, application/ecmascript, and |
280 // application/x-javascript, but WinIE 7 doesn't. | 278 // application/x-javascript, but WinIE 7 doesn't. |
281 // WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and | 279 // WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and |
282 // text/livescript, but Mozilla 1.8 doesn't. | 280 // text/livescript, but Mozilla 1.8 doesn't. |
283 // Mozilla 1.8 allows leading and trailing whitespace, but WinIE 7 doesn't. | 281 // Mozilla 1.8 allows leading and trailing whitespace, but WinIE 7 doesn't. |
284 // Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a | 282 // Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a |
285 // whitespace-only string. | 283 // whitespace-only string. |
286 // We want to accept all the values that either of these browsers accept, but | 284 // We want to accept all the values that either of these browsers accept, but |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 | 707 |
710 GetExtensionsFromHardCodedMappings(secondary_mappings, | 708 GetExtensionsFromHardCodedMappings(secondary_mappings, |
711 arraysize(secondary_mappings), | 709 arraysize(secondary_mappings), |
712 mime_type, | 710 mime_type, |
713 &unique_extensions); | 711 &unique_extensions); |
714 | 712 |
715 HashSetToVector(&unique_extensions, extensions); | 713 HashSetToVector(&unique_extensions, extensions); |
716 } | 714 } |
717 | 715 |
718 } // namespace net | 716 } // namespace net |
OLD | NEW |