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

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

Issue 599493004: Use the new java_cpp_enum rule in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more aosp fix Created 6 years, 2 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
« no previous file with comments | « net/android/private_key_type_list.h ('k') | net/base/mime_util_certificate_type_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // variations. 140 // variations.
141 NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); 141 NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests();
142 142
143 // Returns the IANA media type contained in |mime_type|, or an empty 143 // Returns the IANA media type contained in |mime_type|, or an empty
144 // string if |mime_type| does not specifify a known media type. 144 // string if |mime_type| does not specifify a known media type.
145 // Supported media types are defined at: 145 // Supported media types are defined at:
146 // http://www.iana.org/assignments/media-types/index.html 146 // http://www.iana.org/assignments/media-types/index.html
147 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type); 147 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type);
148 148
149 // A list of supported certificate-related mime types. 149 // A list of supported certificate-related mime types.
150 //
151 // A Java counterpart will be generated for this enum.
152 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
150 enum CertificateMimeType { 153 enum CertificateMimeType {
151 #define CERTIFICATE_MIME_TYPE(name, value) CERTIFICATE_MIME_TYPE_ ## name = valu e, 154 CERTIFICATE_MIME_TYPE_UNKNOWN,
152 #include "net/base/mime_util_certificate_type_list.h" 155 CERTIFICATE_MIME_TYPE_X509_USER_CERT,
153 #undef CERTIFICATE_MIME_TYPE 156 CERTIFICATE_MIME_TYPE_X509_CA_CERT,
157 CERTIFICATE_MIME_TYPE_PKCS12_ARCHIVE,
154 }; 158 };
155 159
156 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType( 160 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType(
157 const std::string& mime_type); 161 const std::string& mime_type);
158 162
159 // Prepares one value as part of a multi-part upload request. 163 // Prepares one value as part of a multi-part upload request.
160 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name, 164 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name,
161 const std::string& value, 165 const std::string& value,
162 const std::string& mime_boundary, 166 const std::string& mime_boundary,
163 const std::string& content_type, 167 const std::string& content_type,
164 std::string* post_data); 168 std::string* post_data);
165 169
166 // Adds the final delimiter to a multi-part upload request. 170 // Adds the final delimiter to a multi-part upload request.
167 NET_EXPORT void AddMultipartFinalDelimiterForUpload( 171 NET_EXPORT void AddMultipartFinalDelimiterForUpload(
168 const std::string& mime_boundary, 172 const std::string& mime_boundary,
169 std::string* post_data); 173 std::string* post_data);
170 174
171 } // namespace net 175 } // namespace net
172 176
173 #endif // NET_BASE_MIME_UTIL_H__ 177 #endif // NET_BASE_MIME_UTIL_H__
OLDNEW
« no previous file with comments | « net/android/private_key_type_list.h ('k') | net/base/mime_util_certificate_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698