Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataObject.cpp

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698