| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 m_private->setFormData(httpBody); | 177 m_private->setFormData(httpBody); |
| 178 } | 178 } |
| 179 | 179 |
| 180 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const { | 180 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const { |
| 181 HashSet<String> filePaths; | 181 HashSet<String> filePaths; |
| 182 const EncodedFormData* formData = m_private->formData(); | 182 const EncodedFormData* formData = m_private->formData(); |
| 183 if (formData) { | 183 if (formData) { |
| 184 for (size_t i = 0; i < formData->elements().size(); ++i) { | 184 for (size_t i = 0; i < formData->elements().size(); ++i) { |
| 185 const FormDataElement& element = formData->elements()[i]; | 185 const FormDataElement& element = formData->elements()[i]; |
| 186 if (element.m_type == FormDataElement::encodedFile) | 186 if (element.m_type == FormDataElement::encodedFile) |
| 187 filePaths.add(element.m_filename); | 187 filePaths.insert(element.m_filename); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 const Vector<String>& referencedFilePaths = | 191 const Vector<String>& referencedFilePaths = |
| 192 m_private->getReferencedFilePaths(); | 192 m_private->getReferencedFilePaths(); |
| 193 for (size_t i = 0; i < referencedFilePaths.size(); ++i) | 193 for (size_t i = 0; i < referencedFilePaths.size(); ++i) |
| 194 filePaths.add(referencedFilePaths[i]); | 194 filePaths.insert(referencedFilePaths[i]); |
| 195 | 195 |
| 196 Vector<String> results; | 196 Vector<String> results; |
| 197 copyToVector(filePaths, results); | 197 copyToVector(filePaths, results); |
| 198 return results; | 198 return results; |
| 199 } | 199 } |
| 200 | 200 |
| 201 WebHistoryItem::WebHistoryItem(HistoryItem* item) : m_private(item) {} | 201 WebHistoryItem::WebHistoryItem(HistoryItem* item) : m_private(item) {} |
| 202 | 202 |
| 203 WebHistoryItem& WebHistoryItem::operator=(HistoryItem* item) { | 203 WebHistoryItem& WebHistoryItem::operator=(HistoryItem* item) { |
| 204 m_private = item; | 204 m_private = item; |
| 205 return *this; | 205 return *this; |
| 206 } | 206 } |
| 207 | 207 |
| 208 WebHistoryItem::operator HistoryItem*() const { | 208 WebHistoryItem::operator HistoryItem*() const { |
| 209 return m_private.get(); | 209 return m_private.get(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |