OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | |
4 * | 3 * |
5 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
7 * are met: | 6 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
11 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
13 * | 12 * |
(...skipping 12 matching lines...) Expand all Loading... |
26 | 25 |
27 #ifndef ContentType_h | 26 #ifndef ContentType_h |
28 #define ContentType_h | 27 #define ContentType_h |
29 | 28 |
30 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
31 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
32 #include "wtf/text/WTFString.h" | 31 #include "wtf/text/WTFString.h" |
33 | 32 |
34 namespace blink { | 33 namespace blink { |
35 | 34 |
| 35 // Parses the MIME type and parameter values based on RFC 2231. |
36 class PLATFORM_EXPORT ContentType { | 36 class PLATFORM_EXPORT ContentType { |
37 STACK_ALLOCATED(); | 37 STACK_ALLOCATED(); |
38 | 38 |
39 public: | 39 public: |
40 explicit ContentType(const String& type); | 40 explicit ContentType(const String& type); |
41 | 41 |
42 String parameter(const String& parameterName) const; | 42 String parameter(const String& parameterName) const; |
43 String type() const; | 43 String type() const; |
44 const String& raw() const { return m_type; } | 44 const String& raw() const { return m_type; } |
45 | 45 |
46 private: | 46 private: |
47 String m_type; | 47 String m_type; |
48 }; | 48 }; |
49 | 49 |
50 } // namespace blink | 50 } // namespace blink |
51 | 51 |
52 #endif // ContentType_h | 52 #endif // ContentType_h |
OLD | NEW |