Chromium Code Reviews| Index: third_party/WebKit/Source/platform/network/ParsedContentType.h |
| diff --git a/third_party/WebKit/Source/platform/network/ParsedContentType.h b/third_party/WebKit/Source/platform/network/ParsedContentType.h |
| index 9a8aae915435b61bd9be3e4c98ec453f9cd20e67..c72d627236c79c135fc3c39364821700618f4b25 100644 |
| --- a/third_party/WebKit/Source/platform/network/ParsedContentType.h |
| +++ b/third_party/WebKit/Source/platform/network/ParsedContentType.h |
| @@ -46,10 +46,13 @@ class PLATFORM_EXPORT ParsedContentType final { |
| STACK_ALLOCATED(); |
| public: |
| - // <index, length> |
| - using SubstringRange = std::pair<unsigned, unsigned>; |
| - |
| - explicit ParsedContentType(const String&); |
| + // When |Relaxed| is specified, the parser parses parameter values in a sloppy |
| + // manner, i.e., only ';' and '"' are treated as special characters. |
|
kinuko
2017/02/21 11:43:02
maybe add a link to the CL that changed default pa
yhirano
2017/02/22 05:17:03
Done.
|
| + enum class Mode { |
| + Normal, |
| + Relaxed, |
| + }; |
| + ParsedContentType(const String&, Mode = Mode::Normal); |
|
kinuko
2017/02/21 11:43:02
nit: still need explicit
yhirano
2017/02/22 05:17:03
Done.
|
| String mimeType() const { return m_mimeType; } |
| String charset() const; |
| @@ -64,7 +67,9 @@ class PLATFORM_EXPORT ParsedContentType final { |
| private: |
| bool parse(const String&); |
| + const Mode m_mode; |
| bool m_isValid; |
| + |
| typedef HashMap<String, String> KeyValuePairs; |
| KeyValuePairs m_parameters; |
| String m_mimeType; |