| 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 #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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); | 101 NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); |
| 102 | 102 |
| 103 // 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 |
| 104 // string if |mime_type| does not specifify a known media type. | 104 // string if |mime_type| does not specifify a known media type. |
| 105 // Supported media types are defined at: | 105 // Supported media types are defined at: |
| 106 // http://www.iana.org/assignments/media-types/index.html | 106 // http://www.iana.org/assignments/media-types/index.html |
| 107 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type); | 107 NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type); |
| 108 | 108 |
| 109 // A list of supported certificate-related mime types. | 109 // A list of supported certificate-related mime types. |
| 110 enum CertificateMimeType { | 110 enum CertificateMimeType { |
| 111 #define CERTIFICATE_MIME_TYPE(name, value) CERTIFICATE_MIME_TYPE_ ## name = valu
e, | 111 #define CERTIFICATE_MIME_TYPE(name, value) CERTIFICATE_MIME_TYPE_##name = value, |
| 112 #include "net/base/mime_util_certificate_type_list.h" | 112 #include "net/base/mime_util_certificate_type_list.h" |
| 113 #undef CERTIFICATE_MIME_TYPE | 113 #undef CERTIFICATE_MIME_TYPE |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType( | 116 NET_EXPORT CertificateMimeType |
| 117 const std::string& mime_type); | 117 GetCertificateMimeTypeForMimeType(const std::string& mime_type); |
| 118 | 118 |
| 119 // Prepares one value as part of a multi-part upload request. | 119 // Prepares one value as part of a multi-part upload request. |
| 120 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name, | 120 NET_EXPORT void AddMultipartValueForUpload(const std::string& value_name, |
| 121 const std::string& value, | 121 const std::string& value, |
| 122 const std::string& mime_boundary, | 122 const std::string& mime_boundary, |
| 123 const std::string& content_type, | 123 const std::string& content_type, |
| 124 std::string* post_data); | 124 std::string* post_data); |
| 125 | 125 |
| 126 // Adds the final delimiter to a multi-part upload request. | 126 // Adds the final delimiter to a multi-part upload request. |
| 127 NET_EXPORT void AddMultipartFinalDelimiterForUpload( | 127 NET_EXPORT void AddMultipartFinalDelimiterForUpload( |
| 128 const std::string& mime_boundary, | 128 const std::string& mime_boundary, |
| 129 std::string* post_data); | 129 std::string* post_data); |
| 130 | 130 |
| 131 } // namespace net | 131 } // namespace net |
| 132 | 132 |
| 133 #endif // NET_BASE_MIME_UTIL_H__ | 133 #endif // NET_BASE_MIME_UTIL_H__ |
| OLD | NEW |