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

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

Issue 17447011: Shuffle media-related WebMimeRegistry code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 6 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 | Annotate | Revision Log
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 #ifndef NET_BASE_MIME_UTIL_H__ 5 #ifndef NET_BASE_MIME_UTIL_H__
6 #define NET_BASE_MIME_UTIL_H__ 6 #define NET_BASE_MIME_UTIL_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Get the extensions associated with the given mime type. This should be passed 88 // Get the extensions associated with the given mime type. This should be passed
89 // in lower case. There could be multiple extensions for a given mime type, like 89 // in lower case. There could be multiple extensions for a given mime type, like
90 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*". 90 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
91 // Note that we do not erase the existing elements in the the provided vector. 91 // Note that we do not erase the existing elements in the the provided vector.
92 // Instead, we append the result to it. 92 // Instead, we append the result to it.
93 NET_EXPORT void GetExtensionsForMimeType( 93 NET_EXPORT void GetExtensionsForMimeType(
94 const std::string& mime_type, 94 const std::string& mime_type,
95 std::vector<base::FilePath::StringType>* extensions); 95 std::vector<base::FilePath::StringType>* extensions);
96 96
97 // Test only methods that return lists of proprietary media types and codecs 97 // Test only method that removes proprietary media types and codecs from the
98 // that are not supported by all variations of Chromium. 98 // list of supported MIME types and codecs. These types and codecs must be
99 // These types and codecs must be blacklisted to ensure consistent layout test 99 // removed to ensure consistent layout test results across all Chromium
100 // results across all Chromium variations. 100 // variations.
101 NET_EXPORT void GetMediaTypesBlacklistedForTests( 101 NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests();
102 std::vector<std::string>* types);
103 NET_EXPORT void GetMediaCodecsBlacklistedForTests(
104 std::vector<std::string>* codecs);
105 102
106 // Returns the IANA media type contained in |mime_type|, or an empty 103 // Returns the IANA media type contained in |mime_type|, or an empty
107 // string if |mime_type| does not specifify a known media type. 104 // string if |mime_type| does not specifify a known media type.
108 // Supported media types are defined at: 105 // Supported media types are defined at:
109 // http://www.iana.org/assignments/media-types/index.html 106 // http://www.iana.org/assignments/media-types/index.html
110 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type); 107 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type);
111 108
112 // A list of supported certificate-related mime types. 109 // A list of supported certificate-related mime types.
113 enum CertificateMimeType { 110 enum CertificateMimeType {
114 #define CERTIFICATE_MIME_TYPE(name, value) CERTIFICATE_MIME_TYPE_ ## name = valu e, 111 #define CERTIFICATE_MIME_TYPE(name, value) CERTIFICATE_MIME_TYPE_ ## name = valu e,
(...skipping 12 matching lines...) Expand all
127 std::string* post_data); 124 std::string* post_data);
128 125
129 // Adds the final delimiter to a multi-part upload request. 126 // Adds the final delimiter to a multi-part upload request.
130 NET_EXPORT void AddMultipartFinalDelimiterForUpload( 127 NET_EXPORT void AddMultipartFinalDelimiterForUpload(
131 const std::string& mime_boundary, 128 const std::string& mime_boundary,
132 std::string* post_data); 129 std::string* post_data);
133 130
134 } // namespace net 131 } // namespace net
135 132
136 #endif // NET_BASE_MIME_UTIL_H__ 133 #endif // NET_BASE_MIME_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698