| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 void flatten(Vector<char>&) const; // omits files | 106 void flatten(Vector<char>&) const; // omits files |
| 107 String flattenToString() const; // omits files | 107 String flattenToString() const; // omits files |
| 108 | 108 |
| 109 bool isEmpty() const { return m_elements.isEmpty(); } | 109 bool isEmpty() const { return m_elements.isEmpty(); } |
| 110 const Vector<FormDataElement>& elements() const { return m_elements; } | 110 const Vector<FormDataElement>& elements() const { return m_elements; } |
| 111 | 111 |
| 112 const Vector<char>& boundary() const { return m_boundary; } | 112 const Vector<char>& boundary() const { return m_boundary; } |
| 113 void setBoundary(Vector<char> boundary) { m_boundary = boundary; } | 113 void setBoundary(Vector<char> boundary) { m_boundary = boundary; } |
| 114 | 114 |
| 115 bool alwaysStream() const { return m_alwaysStream; } | |
| 116 void setAlwaysStream(bool alwaysStream) { m_alwaysStream = alwaysStream; } | |
| 117 | |
| 118 // Identifies a particular form submission instance. A value of 0 is used | 115 // Identifies a particular form submission instance. A value of 0 is used |
| 119 // to indicate an unspecified identifier. | 116 // to indicate an unspecified identifier. |
| 120 void setIdentifier(int64_t identifier) { m_identifier = identifier; } | 117 void setIdentifier(int64_t identifier) { m_identifier = identifier; } |
| 121 int64_t identifier() const { return m_identifier; } | 118 int64_t identifier() const { return m_identifier; } |
| 122 | 119 |
| 123 bool containsPasswordData() const { return m_containsPasswordData; } | 120 bool containsPasswordData() const { return m_containsPasswordData; } |
| 124 void setContainsPasswordData(bool containsPasswordData) { m_containsPassword
Data = containsPasswordData; } | 121 void setContainsPasswordData(bool containsPasswordData) { m_containsPassword
Data = containsPasswordData; } |
| 125 | 122 |
| 126 static EncodingType parseEncodingType(const String& type) | 123 static EncodingType parseEncodingType(const String& type) |
| 127 { | 124 { |
| 128 if (equalIgnoringCase(type, "text/plain")) | 125 if (equalIgnoringCase(type, "text/plain")) |
| 129 return TextPlain; | 126 return TextPlain; |
| 130 if (equalIgnoringCase(type, "multipart/form-data")) | 127 if (equalIgnoringCase(type, "multipart/form-data")) |
| 131 return MultipartFormData; | 128 return MultipartFormData; |
| 132 return FormURLEncoded; | 129 return FormURLEncoded; |
| 133 } | 130 } |
| 134 | 131 |
| 135 // Size of the elements making up the FormData. | 132 // Size of the elements making up the FormData. |
| 136 unsigned long long sizeInBytes() const; | 133 unsigned long long sizeInBytes() const; |
| 137 | 134 |
| 138 private: | 135 private: |
| 139 FormData(); | 136 FormData(); |
| 140 FormData(const FormData&); | 137 FormData(const FormData&); |
| 141 | 138 |
| 142 Vector<FormDataElement> m_elements; | 139 Vector<FormDataElement> m_elements; |
| 143 | 140 |
| 144 int64_t m_identifier; | 141 int64_t m_identifier; |
| 145 bool m_alwaysStream; | |
| 146 Vector<char> m_boundary; | 142 Vector<char> m_boundary; |
| 147 bool m_containsPasswordData; | 143 bool m_containsPasswordData; |
| 148 }; | 144 }; |
| 149 | 145 |
| 150 inline bool operator==(const FormData& a, const FormData& b) | 146 inline bool operator==(const FormData& a, const FormData& b) |
| 151 { | 147 { |
| 152 return a.elements() == b.elements(); | 148 return a.elements() == b.elements(); |
| 153 } | 149 } |
| 154 | 150 |
| 155 inline bool operator!=(const FormData& a, const FormData& b) | 151 inline bool operator!=(const FormData& a, const FormData& b) |
| 156 { | 152 { |
| 157 return !(a == b); | 153 return !(a == b); |
| 158 } | 154 } |
| 159 | 155 |
| 160 } // namespace blink | 156 } // namespace blink |
| 161 | 157 |
| 162 #endif | 158 #endif |
| OLD | NEW |