OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ContentType_h |
| 6 #define ContentType_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "wtf/Allocator.h" |
| 10 #include "wtf/text/WTFString.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 // Parses the MIME type and parameter values based on RFC 2231. |
| 15 class PLATFORM_EXPORT ContentType { |
| 16 STACK_ALLOCATED(); |
| 17 |
| 18 public: |
| 19 explicit ContentType(const String& type); |
| 20 |
| 21 String parameter(const String& parameterName) const; |
| 22 String type() const; |
| 23 const String& raw() const { return m_type; } |
| 24 |
| 25 private: |
| 26 String m_type; |
| 27 }; |
| 28 |
| 29 } // namespace blink |
| 30 |
| 31 #endif // ContentType_h |
OLD | NEW |