| Index: components/mime_util/mime_util.cc
|
| diff --git a/components/mime_util/mime_util.cc b/components/mime_util/mime_util.cc
|
| index fa7471bc4be5ae204f0ad676fe2f5d962b95ca02..c6d6b8d6e1143c10031b1c60fd40e236feaf707e 100644
|
| --- a/components/mime_util/mime_util.cc
|
| +++ b/components/mime_util/mime_util.cc
|
| @@ -24,13 +24,13 @@ struct CertificateMimeTypeInfo {
|
| net::CertificateMimeType cert_type;
|
| };
|
|
|
| +#if defined(OS_ANDROID)
|
| const CertificateMimeTypeInfo kSupportedCertificateTypes[] = {
|
| {"application/x-x509-user-cert", net::CERTIFICATE_MIME_TYPE_X509_USER_CERT},
|
| -#if defined(OS_ANDROID)
|
| {"application/x-x509-ca-cert", net::CERTIFICATE_MIME_TYPE_X509_CA_CERT},
|
| {"application/x-pkcs12", net::CERTIFICATE_MIME_TYPE_PKCS12_ARCHIVE},
|
| -#endif
|
| };
|
| +#endif
|
|
|
| // From WebKit's WebCore/platform/MIMETypeRegistry.cpp:
|
|
|
| @@ -146,8 +146,10 @@ MimeUtil::MimeUtil() {
|
| javascript_types_.insert(kSupportedJavascriptTypes[i]);
|
| non_image_types_.insert(kSupportedJavascriptTypes[i]);
|
| }
|
| +#if defined(OS_ANDROID)
|
| for (size_t i = 0; i < arraysize(kSupportedCertificateTypes); ++i)
|
| non_image_types_.insert(kSupportedCertificateTypes[i].mime_type);
|
| +#endif
|
| }
|
|
|
| bool MimeUtil::IsSupportedImageMimeType(const std::string& mime_type) const {
|
| @@ -219,6 +221,7 @@ bool IsSupportedMimeType(const std::string& mime_type) {
|
|
|
| net::CertificateMimeType GetCertificateMimeTypeForMimeType(
|
| const std::string& mime_type) {
|
| +#if defined(OS_ANDROID)
|
| // Don't create a map, there is only one entry in the table,
|
| // except on Android.
|
| for (size_t i = 0; i < arraysize(kSupportedCertificateTypes); ++i) {
|
| @@ -227,6 +230,7 @@ net::CertificateMimeType GetCertificateMimeTypeForMimeType(
|
| return kSupportedCertificateTypes[i].cert_type;
|
| }
|
| }
|
| +#endif
|
|
|
| return net::CERTIFICATE_MIME_TYPE_UNKNOWN;
|
| }
|
|
|