OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 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 30 matching lines...) Expand all Loading... |
41 void FormDataList::appendString(const CString& string) | 41 void FormDataList::appendString(const CString& string) |
42 { | 42 { |
43 m_items.append(string); | 43 m_items.append(string); |
44 } | 44 } |
45 | 45 |
46 void FormDataList::appendBlob(PassRefPtrWillBeRawPtr<Blob> blob, const String& f
ilename) | 46 void FormDataList::appendBlob(PassRefPtrWillBeRawPtr<Blob> blob, const String& f
ilename) |
47 { | 47 { |
48 m_items.append(Item(blob, filename)); | 48 m_items.append(Item(blob, filename)); |
49 } | 49 } |
50 | 50 |
51 PassRefPtr<FormData> FormDataList::createFormData(const WTF::TextEncoding& encod
ing, FormData::EncodingType encodingType) | 51 PassRefPtr<FormData> FormDataList::createFormData(FormData::EncodingType encodin
gType) |
52 { | 52 { |
53 RefPtr<FormData> result = FormData::create(); | 53 RefPtr<FormData> result = FormData::create(); |
54 appendKeyValuePairItemsTo(result.get(), encoding, false, encodingType); | 54 appendKeyValuePairItemsTo(result.get(), m_encoding, false, encodingType); |
55 return result.release(); | 55 return result.release(); |
56 } | 56 } |
57 | 57 |
58 PassRefPtr<FormData> FormDataList::createMultiPartFormData(const WTF::TextEncodi
ng& encoding) | 58 PassRefPtr<FormData> FormDataList::createMultiPartFormData() |
59 { | 59 { |
60 RefPtr<FormData> result = FormData::create(); | 60 RefPtr<FormData> result = FormData::create(); |
61 appendKeyValuePairItemsTo(result.get(), encoding, true); | 61 appendKeyValuePairItemsTo(result.get(), m_encoding, true); |
62 return result.release(); | 62 return result.release(); |
63 } | 63 } |
64 | 64 |
65 void FormDataList::appendKeyValuePairItemsTo(FormData* formData, const WTF::Text
Encoding& encoding, bool isMultiPartForm, FormData::EncodingType encodingType) | 65 void FormDataList::appendKeyValuePairItemsTo(FormData* formData, const WTF::Text
Encoding& encoding, bool isMultiPartForm, FormData::EncodingType encodingType) |
66 { | 66 { |
67 if (isMultiPartForm) | 67 if (isMultiPartForm) |
68 formData->setBoundary(FormDataBuilder::generateUniqueBoundaryString()); | 68 formData->setBoundary(FormDataBuilder::generateUniqueBoundaryString()); |
69 | 69 |
70 Vector<char> encodedData; | 70 Vector<char> encodedData; |
71 | 71 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 { | 144 { |
145 visitor->trace(m_items); | 145 visitor->trace(m_items); |
146 } | 146 } |
147 | 147 |
148 void FormDataList::Item::trace(Visitor* visitor) | 148 void FormDataList::Item::trace(Visitor* visitor) |
149 { | 149 { |
150 visitor->trace(m_blob); | 150 visitor->trace(m_blob); |
151 } | 151 } |
152 | 152 |
153 } // namespace | 153 } // namespace |
OLD | NEW |