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

Side by Side Diff: third_party/WebKit/Source/platform/blob/BlobData.cpp

Issue 2306293002: Replaced PassRefPtr copies with moves in Source/platform. (Closed)
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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
94 void BlobData::setContentType(const String& contentType) 94 void BlobData::setContentType(const String& contentType)
95 { 95 {
96 if (isValidBlobType(contentType)) 96 if (isValidBlobType(contentType))
97 m_contentType = contentType; 97 m_contentType = contentType;
98 else 98 else
99 m_contentType = ""; 99 m_contentType = "";
100 } 100 }
101 101
102 void BlobData::appendData(PassRefPtr<RawData> data, long long offset, long long length) 102 void BlobData::appendData(PassRefPtr<RawData> data, long long offset, long long length)
103 { 103 {
104 m_items.append(BlobDataItem(data, offset, length)); 104 m_items.append(BlobDataItem(std::move(data), offset, length));
105 } 105 }
106 106
107 void BlobData::appendFile(const String& path) 107 void BlobData::appendFile(const String& path)
108 { 108 {
109 m_items.append(BlobDataItem(path)); 109 m_items.append(BlobDataItem(path));
110 } 110 }
111 111
112 void BlobData::appendFile(const String& path, long long offset, long long length , double expectedModificationTime) 112 void BlobData::appendFile(const String& path, long long offset, long long length , double expectedModificationTime)
113 { 113 {
114 m_items.append(BlobDataItem(path, offset, length, expectedModificationTime)) ; 114 m_items.append(BlobDataItem(path, offset, length, expectedModificationTime)) ;
115 } 115 }
116 116
117 void BlobData::appendBlob(PassRefPtr<BlobDataHandle> dataHandle, long long offse t, long long length) 117 void BlobData::appendBlob(PassRefPtr<BlobDataHandle> dataHandle, long long offse t, long long length)
118 { 118 {
119 m_items.append(BlobDataItem(dataHandle, offset, length)); 119 m_items.append(BlobDataItem(std::move(dataHandle), offset, length));
120 } 120 }
121 121
122 void BlobData::appendFileSystemURL(const KURL& url, long long offset, long long length, double expectedModificationTime) 122 void BlobData::appendFileSystemURL(const KURL& url, long long offset, long long length, double expectedModificationTime)
123 { 123 {
124 m_items.append(BlobDataItem(url, offset, length, expectedModificationTime)); 124 m_items.append(BlobDataItem(url, offset, length, expectedModificationTime));
125 } 125 }
126 126
127 void BlobData::appendText(const String& text, bool doNormalizeLineEndingsToNativ e) 127 void BlobData::appendText(const String& text, bool doNormalizeLineEndingsToNativ e)
128 { 128 {
129 CString utf8Text = UTF8Encoding().encode(text, WTF::EntitiesForUnencodables) ; 129 CString utf8Text = UTF8Encoding().encode(text, WTF::EntitiesForUnencodables) ;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 { 219 {
220 BlobRegistry::addBlobDataRef(m_uuid); 220 BlobRegistry::addBlobDataRef(m_uuid);
221 } 221 }
222 222
223 BlobDataHandle::~BlobDataHandle() 223 BlobDataHandle::~BlobDataHandle()
224 { 224 {
225 BlobRegistry::removeBlobDataRef(m_uuid); 225 BlobRegistry::removeBlobDataRef(m_uuid);
226 } 226 }
227 227
228 } // namespace blink 228 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PODFreeListArena.h ('k') | third_party/WebKit/Source/platform/blob/BlobRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698