OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 static EncodingType parseEncodingType(const String& type) | 130 static EncodingType parseEncodingType(const String& type) |
131 { | 131 { |
132 if (equalIgnoringCase(type, "text/plain")) | 132 if (equalIgnoringCase(type, "text/plain")) |
133 return TextPlain; | 133 return TextPlain; |
134 if (equalIgnoringCase(type, "multipart/form-data")) | 134 if (equalIgnoringCase(type, "multipart/form-data")) |
135 return MultipartFormData; | 135 return MultipartFormData; |
136 return FormURLEncoded; | 136 return FormURLEncoded; |
137 } | 137 } |
138 | 138 |
| 139 // Size of the elements making up the FormData. |
| 140 unsigned long long sizeInBytes() const; |
| 141 |
139 private: | 142 private: |
140 FormData(); | 143 FormData(); |
141 FormData(const FormData&); | 144 FormData(const FormData&); |
142 | 145 |
143 Vector<FormDataElement> m_elements; | 146 Vector<FormDataElement> m_elements; |
144 | 147 |
145 int64_t m_identifier; | 148 int64_t m_identifier; |
146 bool m_alwaysStream; | 149 bool m_alwaysStream; |
147 Vector<char> m_boundary; | 150 Vector<char> m_boundary; |
148 bool m_containsPasswordData; | 151 bool m_containsPasswordData; |
149 }; | 152 }; |
150 | 153 |
151 inline bool operator==(const FormData& a, const FormData& b) | 154 inline bool operator==(const FormData& a, const FormData& b) |
152 { | 155 { |
153 return a.elements() == b.elements(); | 156 return a.elements() == b.elements(); |
154 } | 157 } |
155 | 158 |
156 inline bool operator!=(const FormData& a, const FormData& b) | 159 inline bool operator!=(const FormData& a, const FormData& b) |
157 { | 160 { |
158 return !(a == b); | 161 return !(a == b); |
159 } | 162 } |
160 | 163 |
161 } // namespace WebCore | 164 } // namespace WebCore |
162 | 165 |
163 #endif | 166 #endif |
OLD | NEW |