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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (value.blob()->isFile()) { | 131 if (value.blob()->isFile()) { |
132 File* file = toFile(value.blob()); | 132 File* file = toFile(value.blob()); |
133 if (value.filename().isNull()) | 133 if (value.filename().isNull()) |
134 return Entry(name, file); | 134 return Entry(name, file); |
135 return Entry(name, file->clone(value.filename())); | 135 return Entry(name, file->clone(value.filename())); |
136 } | 136 } |
137 | 137 |
138 String filename = value.filename(); | 138 String filename = value.filename(); |
139 if (filename.isNull()) | 139 if (filename.isNull()) |
140 filename = "blob"; | 140 filename = "blob"; |
141 return Entry(name, File::create(filename, currentTimeMS(), value.blob()->blo
bDataHandle())); | 141 return Entry(name, File::create(filename, currentTime(), value.blob()->blobD
ataHandle())); |
142 } | 142 } |
143 | 143 |
144 bool FormDataList::hasEntry(const String& key) const | 144 bool FormDataList::hasEntry(const String& key) const |
145 { | 145 { |
146 const CString keyData = encodeAndNormalize(key); | 146 const CString keyData = encodeAndNormalize(key); |
147 const FormDataListItems& items = this->items(); | 147 const FormDataListItems& items = this->items(); |
148 size_t formDataListSize = items.size(); | 148 size_t formDataListSize = items.size(); |
149 ASSERT(!(formDataListSize % 2)); | 149 ASSERT(!(formDataListSize % 2)); |
150 for (size_t i = 0; i < formDataListSize; i += 2) { | 150 for (size_t i = 0; i < formDataListSize; i += 2) { |
151 const FormDataList::Item& key = items[i]; | 151 const FormDataList::Item& key = items[i]; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 { | 298 { |
299 visitor->trace(m_file); | 299 visitor->trace(m_file); |
300 } | 300 } |
301 | 301 |
302 void FormDataList::Item::trace(Visitor* visitor) | 302 void FormDataList::Item::trace(Visitor* visitor) |
303 { | 303 { |
304 visitor->trace(m_blob); | 304 visitor->trace(m_blob); |
305 } | 305 } |
306 | 306 |
307 } // namespace blink | 307 } // namespace blink |
OLD | NEW |