| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(const String& data, const
String& type) | 96 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(const String& data, const
String& type) |
| 97 { | 97 { |
| 98 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromString(t
ype, data); | 98 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromString(t
ype, data); |
| 99 if (!internalAddStringItem(item)) | 99 if (!internalAddStringItem(item)) |
| 100 return nullptr; | 100 return nullptr; |
| 101 return item; | 101 return item; |
| 102 } | 102 } |
| 103 | 103 |
| 104 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(PassRefPtr<File> file) | 104 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::add(PassRefPtrWillBeRawPtr<Fi
le> file) |
| 105 { | 105 { |
| 106 if (!file) | 106 if (!file) |
| 107 return nullptr; | 107 return nullptr; |
| 108 | 108 |
| 109 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromFile(fil
e); | 109 RefPtrWillBeRawPtr<DataObjectItem> item = DataObjectItem::createFromFile(fil
e); |
| 110 m_itemList.append(item); | 110 m_itemList.append(item); |
| 111 return item; | 111 return item; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void DataObject::clearData(const String& type) | 114 void DataObject::clearData(const String& type) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ASSERT(item->kind() == DataObjectItem::FileKind); | 266 ASSERT(item->kind() == DataObjectItem::FileKind); |
| 267 m_itemList.append(item); | 267 m_itemList.append(item); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void DataObject::trace(Visitor* visitor) | 270 void DataObject::trace(Visitor* visitor) |
| 271 { | 271 { |
| 272 visitor->trace(m_itemList); | 272 visitor->trace(m_itemList); |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace WebCore | 275 } // namespace WebCore |
| OLD | NEW |