Changeset 179703 in webkit
- Timestamp:
- Feb 5, 2015 1:46:11 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r179690 r179703 1 2015-02-05 Chris Dumez <cdumez@apple.com> 2 3 Use deleteFile() in NetworkCacheStorageCocoa.mm 4 https://bugs.webkit.org/show_bug.cgi?id=141299 5 6 Reviewed by Antti Koivisto. 7 8 Use deleteFile() in NetworkCacheStorageCocoa.mm to simplify the code 9 a bit. 10 11 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: 12 (WebKit::NetworkCacheStorage::removeEntry): 13 (WebKit::NetworkCacheStorage::clear): 14 (WebKit::NetworkCacheStorage::shrinkIfNeeded): 15 1 16 2015-02-04 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm
r179690 r179703 346 346 StringCapture filePathCapture(filePathForKey(key, m_directoryPath)); 347 347 dispatch_async(m_ioQueue.get(), [this, filePathCapture] { 348 CString path = WebCore::fileSystemRepresentation(filePathCapture.string()); 349 unlink(path.data()); 348 WebCore::deleteFile(filePathCapture.string()); 350 349 if (m_approximateEntryCount) 351 350 --m_approximateEntryCount; … … 551 550 String subdirPath = WebCore::pathByAppendingComponent(directoryPath, subdirName); 552 551 traverseDirectory(subdirPath, DT_REG, [&subdirPath](const String& fileName) { 553 String filePath = WebCore::pathByAppendingComponent(subdirPath, fileName); 554 unlink(WebCore::fileSystemRepresentation(filePath).data()); 552 WebCore::deleteFile(WebCore::pathByAppendingComponent(subdirPath, fileName)); 555 553 }); 556 554 rmdir(WebCore::fileSystemRepresentation(subdirPath).data()); … … 579 577 size_t foundEntryCount = 0; 580 578 size_t deletedCount = 0; 581 traverseCacheFiles(cachePath, [this, &foundEntryCount, &deletedCount](const String& fileName, const String& directory) { 582 String partitionPath = WebCore::pathByAppendingComponent(directory, fileName); 583 CString path = WebCore::fileSystemRepresentation(partitionPath); 579 traverseCacheFiles(cachePath, [this, &foundEntryCount, &deletedCount](const String& fileName, const String& partitionPath) { 584 580 ++foundEntryCount; 585 581 if (foundEntryCount % everyNthResourceToDelete) … … 587 583 ++deletedCount; 588 584 589 unlink(path.data());585 WebCore::deleteFile(WebCore::pathByAppendingComponent(partitionPath, fileName)); 590 586 591 587 NetworkCacheKey::HashType hash;
Note: See TracChangeset
for help on using the changeset viewer.