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

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

Issue 642403002: git cl format the first third of the net/base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 6 years, 1 month 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 #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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // only a particular subset of codecs. 114 // only a particular subset of codecs.
115 // * Returns IsSupported if the |mime_type| is supported and all the codecs 115 // * Returns IsSupported if the |mime_type| is supported and all the codecs
116 // within the |codecs| are supported for the |mime_type|. 116 // within the |codecs| are supported for the |mime_type|.
117 // * Returns MayBeSupported if the |mime_type| is supported and is known to 117 // * Returns MayBeSupported if the |mime_type| is supported and is known to
118 // support only a subset of codecs, but |codecs| was empty. Also returned if 118 // support only a subset of codecs, but |codecs| was empty. Also returned if
119 // all the codecs in |codecs| are supported, but additional codec parameters 119 // all the codecs in |codecs| are supported, but additional codec parameters
120 // were supplied (such as profile) for which the support cannot be decided. 120 // were supplied (such as profile) for which the support cannot be decided.
121 // * Returns IsNotSupported if either the |mime_type| is not supported or the 121 // * Returns IsNotSupported if either the |mime_type| is not supported or the
122 // |mime_type| is supported but at least one of the codecs within |codecs| is 122 // |mime_type| is supported but at least one of the codecs within |codecs| is
123 // not supported for the |mime_type|. 123 // not supported for the |mime_type|.
124 NET_EXPORT SupportsType IsSupportedStrictMediaMimeType( 124 NET_EXPORT SupportsType
125 const std::string& mime_type, 125 IsSupportedStrictMediaMimeType(const std::string& mime_type,
126 const std::vector<std::string>& codecs); 126 const std::vector<std::string>& codecs);
127 127
128 // Get the extensions associated with the given mime type. This should be passed 128 // Get the extensions associated with the given mime type. This should be passed
129 // in lower case. There could be multiple extensions for a given mime type, like 129 // in lower case. There could be multiple extensions for a given mime type, like
130 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*". 130 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
131 // Note that we do not erase the existing elements in the the provided vector. 131 // Note that we do not erase the existing elements in the the provided vector.
132 // Instead, we append the result to it. 132 // Instead, we append the result to it.
133 NET_EXPORT void GetExtensionsForMimeType( 133 NET_EXPORT void GetExtensionsForMimeType(
134 const std::string& mime_type, 134 const std::string& mime_type,
135 std::vector<base::FilePath::StringType>* extensions); 135 std::vector<base::FilePath::StringType>* extensions);
136 136
(...skipping 13 matching lines...) Expand all
150 // 150 //
151 // A Java counterpart will be generated for this enum. 151 // A Java counterpart will be generated for this enum.
152 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net 152 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
153 enum CertificateMimeType { 153 enum CertificateMimeType {
154 CERTIFICATE_MIME_TYPE_UNKNOWN, 154 CERTIFICATE_MIME_TYPE_UNKNOWN,
155 CERTIFICATE_MIME_TYPE_X509_USER_CERT, 155 CERTIFICATE_MIME_TYPE_X509_USER_CERT,
156 CERTIFICATE_MIME_TYPE_X509_CA_CERT, 156 CERTIFICATE_MIME_TYPE_X509_CA_CERT,
157 CERTIFICATE_MIME_TYPE_PKCS12_ARCHIVE, 157 CERTIFICATE_MIME_TYPE_PKCS12_ARCHIVE,
158 }; 158 };
159 159
160 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType( 160 NET_EXPORT CertificateMimeType
161 const std::string& mime_type); 161 GetCertificateMimeTypeForMimeType(const std::string& mime_type);
162 162
163 // Prepares one value as part of a multi-part upload request. 163 // Prepares one value as part of a multi-part upload request.
164 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name, 164 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name,
165 const std::string& value, 165 const std::string& value,
166 const std::string& mime_boundary, 166 const std::string& mime_boundary,
167 const std::string& content_type, 167 const std::string& content_type,
168 std::string* post_data); 168 std::string* post_data);
169 169
170 // Adds the final delimiter to a multi-part upload request. 170 // Adds the final delimiter to a multi-part upload request.
171 NET_EXPORT void AddMultipartFinalDelimiterForUpload( 171 NET_EXPORT void AddMultipartFinalDelimiterForUpload(
172 const std::string& mime_boundary, 172 const std::string& mime_boundary,
173 std::string* post_data); 173 std::string* post_data);
174 174
175 } // namespace net 175 } // namespace net
176 176
177 #endif // NET_BASE_MIME_UTIL_H__ 177 #endif // NET_BASE_MIME_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698