| 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 <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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // download instead of displaying in the browser: | 293 // download instead of displaying in the browser: |
| 294 // http://code.google.com/p/chromium/issues/detail?id=7192 | 294 // http://code.google.com/p/chromium/issues/detail?id=7192 |
| 295 // So, by including "text/css" into this list we choose Firefox | 295 // So, by including "text/css" into this list we choose Firefox |
| 296 // behavior - css files will be displayed: | 296 // behavior - css files will be displayed: |
| 297 "text/css", | 297 "text/css", |
| 298 "text/vnd.chromium.ftp-dir", | 298 "text/vnd.chromium.ftp-dir", |
| 299 "text/", | 299 "text/", |
| 300 "image/svg+xml", // SVG is text-based XML, even though it has an image/ type | 300 "image/svg+xml", // SVG is text-based XML, even though it has an image/ type |
| 301 "application/xml", | 301 "application/xml", |
| 302 "application/xhtml+xml", | 302 "application/xhtml+xml", |
| 303 "application/rss+xml", | |
| 304 "application/atom+xml", | |
| 305 "application/json", | 303 "application/json", |
| 306 "application/x-x509-user-cert", | 304 "application/x-x509-user-cert", |
| 307 "multipart/related", // For MHTML support. | 305 "multipart/related", // For MHTML support. |
| 308 "multipart/x-mixed-replace" | 306 "multipart/x-mixed-replace" |
| 309 // Note: ADDING a new type here will probably render it AS HTML. This can | 307 // Note: ADDING a new type here will probably render it AS HTML. This can |
| 310 // result in cross site scripting. | 308 // result in cross site scripting. |
| 311 }; | 309 }; |
| 312 | 310 |
| 313 // Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript. | 311 // Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript. |
| 314 // Mozilla 1.8 accepts application/javascript, application/ecmascript, and | 312 // Mozilla 1.8 accepts application/javascript, application/ecmascript, and |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 | 740 |
| 743 GetExtensionsFromHardCodedMappings(secondary_mappings, | 741 GetExtensionsFromHardCodedMappings(secondary_mappings, |
| 744 arraysize(secondary_mappings), | 742 arraysize(secondary_mappings), |
| 745 mime_type, | 743 mime_type, |
| 746 &unique_extensions); | 744 &unique_extensions); |
| 747 | 745 |
| 748 HashSetToVector(&unique_extensions, extensions); | 746 HashSetToVector(&unique_extensions, extensions); |
| 749 } | 747 } |
| 750 | 748 |
| 751 } // namespace net | 749 } // namespace net |
| OLD | NEW |