Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: net/base/mime_util.cc

Issue 10695110: Avoid disk accesses on the wrong thread in URLRequestFileJob (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 static base::LazyInstance<MimeUtil>::Leaky g_mime_util =
eroman 2012/07/12 19:13:16 Please add a comment explaining that it is Leaky i
90 LAZY_INSTANCE_INITIALIZER;
90 91
91 struct MimeInfo { 92 struct MimeInfo {
92 const char* mime_type; 93 const char* mime_type;
93 const char* extensions; // comma separated list 94 const char* extensions; // comma separated list
94 }; 95 };
95 96
96 static const MimeInfo primary_mappings[] = { 97 static const MimeInfo primary_mappings[] = {
97 { "text/html", "html,htm" }, 98 { "text/html", "html,htm" },
98 { "text/css", "css" }, 99 { "text/css", "css" },
99 { "text/xml", "xml" }, 100 { "text/xml", "xml" },
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // Unless/until WebM files are added to the media layout tests, we need to avoid 831 // 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 832 // blacklisting mp4 and H.264 when Theora is not supported (and proprietary
832 // codecs are) so that the media tests can still run. 833 // codecs are) so that the media tests can still run.
833 #if defined(ENABLE_MEDIA_CODEC_THEORA) || !defined(USE_PROPRIETARY_CODECS) 834 #if defined(ENABLE_MEDIA_CODEC_THEORA) || !defined(USE_PROPRIETARY_CODECS)
834 for (size_t i = 0; i < arraysize(proprietary_media_codecs); ++i) 835 for (size_t i = 0; i < arraysize(proprietary_media_codecs); ++i)
835 codecs->push_back(proprietary_media_codecs[i]); 836 codecs->push_back(proprietary_media_codecs[i]);
836 #endif 837 #endif
837 } 838 }
838 839
839 } // namespace net 840 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_file_job.h » ('j') | net/url_request/url_request_file_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698