| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 2012 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 return results; | 214 return results; |
| 215 } | 215 } |
| 216 | 216 |
| 217 void DataObject::addFilename(const String& filename, const String& displayName) | 217 void DataObject::addFilename(const String& filename, const String& displayName) |
| 218 { | 218 { |
| 219 internalAddFileItem(DataObjectItem::createFromFile(File::createForUserProvid
edFile(filename, displayName))); | 219 internalAddFileItem(DataObjectItem::createFromFile(File::createForUserProvid
edFile(filename, displayName))); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) | 222 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) |
| 223 { | 223 { |
| 224 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, buffer)); | 224 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, std::move(b
uffer))); |
| 225 } | 225 } |
| 226 | 226 |
| 227 DataObject::DataObject() | 227 DataObject::DataObject() |
| 228 : m_modifiers(0) | 228 : m_modifiers(0) |
| 229 { | 229 { |
| 230 } | 230 } |
| 231 | 231 |
| 232 DataObjectItem* DataObject::findStringItem(const String& type) const | 232 DataObjectItem* DataObject::findStringItem(const String& type) const |
| 233 { | 233 { |
| 234 for (size_t i = 0; i < m_itemList.size(); ++i) { | 234 for (size_t i = 0; i < m_itemList.size(); ++i) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 348 } |
| 349 item.title = originalItem->title(); | 349 item.title = originalItem->title(); |
| 350 item.baseURL = originalItem->baseURL(); | 350 item.baseURL = originalItem->baseURL(); |
| 351 itemList[i] = item; | 351 itemList[i] = item; |
| 352 } | 352 } |
| 353 data.swapItems(itemList); | 353 data.swapItems(itemList); |
| 354 return data; | 354 return data; |
| 355 } | 355 } |
| 356 | 356 |
| 357 } // namespace blink | 357 } // namespace blink |
| OLD | NEW |