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

Unified Diff: net/base/mime_util.h

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rename CertificateType to CertificateMimeType Created 8 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 side-by-side diff with in-line comments
Download patch
Index: net/base/mime_util.h
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index c8dfe86380985147bb93a53778d39fd2d1286ac7..1906eb53b07fa4724eea570400104cda91320b97 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -44,6 +44,7 @@ NET_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedNonImageMimeType(const std::string& mime_type);
NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type);
+NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type);
// Get whether this mime type should be displayed in view-source mode.
// (For example, XML.)
@@ -111,6 +112,22 @@ NET_EXPORT void GetMediaCodecsBlacklistedForTests(
// Supported media types are defined at:
// http://www.iana.org/assignments/media-types/index.html
NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type);
+
+// A list of supported certificate-related mime types.
+//
+// IMPORTANT: These values *must* match the ones found in:
+// net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
darin (slow to review) 2012/11/27 05:24:34 Instead of writing this comment, is it possible to
digit1 2012/11/27 10:19:48 This has been discussed on chromium-dev and actual
+//
+enum CertificateMimeType {
+ CERTIFICATE_MIME_TYPE_UNKNOWN = 0,
+ CERTIFICATE_MIME_TYPE_X509_USER_CERT = 1,
+ CERTIFICATE_MIME_TYPE_X509_CA_CERT = 2,
+ CERTIFICATE_MIME_TYPE_PKCS12_ARCHIVE = 3,
+};
+
+NET_EXPORT CertificateMimeType GetCertificateMimeTypeForMimeType(
+ const std::string& mime_type);
+
} // namespace net
#endif // NET_BASE_MIME_UTIL_H__
« no previous file with comments | « net/base/cert_database_openssl.cc ('k') | net/base/mime_util.cc » ('j') | net/base/mime_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698