Chromium Code Reviews| Index: Source/core/clipboard/DataObject.cpp |
| diff --git a/Source/core/clipboard/DataObject.cpp b/Source/core/clipboard/DataObject.cpp |
| index 7edeaec622a32f44b9aa247d61bd226c5ba91968..6ef1fb339b467f6e0466ee91256b16efe95e23e2 100644 |
| --- a/Source/core/clipboard/DataObject.cpp |
| +++ b/Source/core/clipboard/DataObject.cpp |
| @@ -49,10 +49,10 @@ PassRefPtrWillBeRawPtr<DataObject> DataObject::createFromPasteboard(PasteMode pa |
| ListHashSet<String> types; |
| for (size_t i = 0; i < webTypes.size(); ++i) |
| types.add(webTypes[i]); |
| - for (ListHashSet<String>::const_iterator it = types.begin(); it != types.end(); ++it) { |
| - if (pasteMode == PlainTextOnly && *it != mimeTypeTextPlain) |
| + for (const String type : types) { |
|
dcheng
2015/01/05 22:01:09
const String&.
This is copying strings; while Str
zhaoze.zhou
2015/01/09 02:30:05
Done.
|
| + if (pasteMode == PlainTextOnly && type != mimeTypeTextPlain) |
| continue; |
| - dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(*it, sequenceNumber)); |
| + dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(type, sequenceNumber)); |
| } |
| return dataObject.release(); |
| } |