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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 MimeMappings image_map_; | 79 MimeMappings image_map_; |
80 MimeMappings media_map_; | 80 MimeMappings media_map_; |
81 MimeMappings non_image_map_; | 81 MimeMappings non_image_map_; |
82 MimeMappings javascript_map_; | 82 MimeMappings javascript_map_; |
83 MimeMappings view_source_map_; | 83 MimeMappings view_source_map_; |
84 MimeMappings codecs_map_; | 84 MimeMappings codecs_map_; |
85 | 85 |
86 StrictMappings strict_format_map_; | 86 StrictMappings strict_format_map_; |
87 }; // class MimeUtil | 87 }; // class MimeUtil |
88 | 88 |
89 static base::LazyInstance<MimeUtil> g_mime_util = LAZY_INSTANCE_INITIALIZER; | 89 // This variable is Leaky because we need to access it from WorkerPool threads |
wtc
2012/07/13 22:38:55
Nit: add a period (.) at the end of this sentence.
| |
90 static base::LazyInstance<MimeUtil>::Leaky g_mime_util = | |
91 LAZY_INSTANCE_INITIALIZER; | |
90 | 92 |
91 struct MimeInfo { | 93 struct MimeInfo { |
92 const char* mime_type; | 94 const char* mime_type; |
93 const char* extensions; // comma separated list | 95 const char* extensions; // comma separated list |
94 }; | 96 }; |
95 | 97 |
96 static const MimeInfo primary_mappings[] = { | 98 static const MimeInfo primary_mappings[] = { |
97 { "text/html", "html,htm" }, | 99 { "text/html", "html,htm" }, |
98 { "text/css", "css" }, | 100 { "text/css", "css" }, |
99 { "text/xml", "xml" }, | 101 { "text/xml", "xml" }, |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
830 // Unless/until WebM files are added to the media layout tests, we need to avoid | 832 // Unless/until WebM files are added to the media layout tests, we need to avoid |
831 // blacklisting mp4 and H.264 when Theora is not supported (and proprietary | 833 // blacklisting mp4 and H.264 when Theora is not supported (and proprietary |
832 // codecs are) so that the media tests can still run. | 834 // codecs are) so that the media tests can still run. |
833 #if defined(ENABLE_MEDIA_CODEC_THEORA) || !defined(USE_PROPRIETARY_CODECS) | 835 #if defined(ENABLE_MEDIA_CODEC_THEORA) || !defined(USE_PROPRIETARY_CODECS) |
834 for (size_t i = 0; i < arraysize(proprietary_media_codecs); ++i) | 836 for (size_t i = 0; i < arraysize(proprietary_media_codecs); ++i) |
835 codecs->push_back(proprietary_media_codecs[i]); | 837 codecs->push_back(proprietary_media_codecs[i]); |
836 #endif | 838 #endif |
837 } | 839 } |
838 | 840 |
839 } // namespace net | 841 } // namespace net |
OLD | NEW |