Index: third_party/WebKit/Source/platform/network/mime/ContentType.h |
diff --git a/third_party/WebKit/Source/platform/network/mime/ContentType.h b/third_party/WebKit/Source/platform/network/mime/ContentType.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..66289f65adf27ff3bdec23b373e8aa4dca7eb58b |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/network/mime/ContentType.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ContentType_h |
+#define ContentType_h |
+ |
+#include "platform/PlatformExport.h" |
+#include "wtf/Allocator.h" |
+#include "wtf/text/WTFString.h" |
+ |
+namespace blink { |
+ |
+// Parses the MIME type and parameter values based on RFC 2231. |
+class PLATFORM_EXPORT ContentType { |
+ STACK_ALLOCATED(); |
+ |
+ public: |
+ explicit ContentType(const String& type); |
+ |
+ String parameter(const String& parameterName) const; |
+ String type() const; |
+ const String& raw() const { return m_type; } |
+ |
+ private: |
+ String m_type; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // ContentType_h |