| Index: third_party/WebKit/Source/platform/network/ParsedContentHeaderFieldParameters.h
|
| diff --git a/third_party/WebKit/Source/platform/network/ParsedContentType.h b/third_party/WebKit/Source/platform/network/ParsedContentHeaderFieldParameters.h
|
| similarity index 84%
|
| copy from third_party/WebKit/Source/platform/network/ParsedContentType.h
|
| copy to third_party/WebKit/Source/platform/network/ParsedContentHeaderFieldParameters.h
|
| index a014b6df29e96afdd1f980bc9a05e4d54e79c728..47404949080452b8558652282b1a1df453811c9d 100644
|
| --- a/third_party/WebKit/Source/platform/network/ParsedContentType.h
|
| +++ b/third_party/WebKit/Source/platform/network/ParsedContentHeaderFieldParameters.h
|
| @@ -29,8 +29,8 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef ParsedContentType_h
|
| -#define ParsedContentType_h
|
| +#ifndef ParsedParameterizedContentHeaderField_h
|
| +#define ParsedParameterizedContentHeaderField_h
|
|
|
| #include "platform/PlatformExport.h"
|
| #include "platform/wtf/Allocator.h"
|
| @@ -39,10 +39,12 @@
|
|
|
| namespace blink {
|
|
|
| -// ParsedContentType parses the constructor argument as specified in RFC2045
|
| -// and stores the result.
|
| +class ContentHeaderFieldInput;
|
| +
|
| +// ParsedParameterizedContentHeaderField parses the constructor argument as
|
| +// specified in RFC2045 and stores the result.
|
| // FIXME: add support for comments.
|
| -class PLATFORM_EXPORT ParsedContentType final {
|
| +class PLATFORM_EXPORT ParsedContentHeaderFieldParameters final {
|
| STACK_ALLOCATED();
|
|
|
| public:
|
| @@ -57,10 +59,8 @@ class PLATFORM_EXPORT ParsedContentType final {
|
| kRelaxed,
|
| kStrict,
|
| };
|
| - explicit ParsedContentType(const String&, Mode = Mode::kNormal);
|
|
|
| - String MimeType() const { return mime_type_; }
|
| - String Charset() const;
|
| + ParsedContentHeaderFieldParameters();
|
|
|
| // Note that in the case of multiple values for the same name, the last value
|
| // is returned.
|
| @@ -69,15 +69,16 @@ class PLATFORM_EXPORT ParsedContentType final {
|
|
|
| bool IsValid() const { return is_valid_; }
|
|
|
| - private:
|
| - bool Parse(const String&);
|
| + void ParseParameters(ContentHeaderFieldInput, Mode);
|
|
|
| - const Mode mode_;
|
| - bool is_valid_;
|
| + static ParsedContentHeaderFieldParameters CreateForTesting(
|
| + const String&,
|
| + Mode = Mode::kNormal);
|
|
|
| + private:
|
| typedef HashMap<String, String> KeyValuePairs;
|
| + bool is_valid_;
|
| KeyValuePairs parameters_;
|
| - String mime_type_;
|
| };
|
|
|
| } // namespace blink
|
|
|