Add support for clearing the disk cache
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Dec 2014 21:53:45 +0000 (21:53 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Dec 2014 21:53:45 +0000 (21:53 +0000)
commit13b6f7189296284f9eb508c07e9573e89bc57c17
tree8bedf459bf9bf58782c5e57ef9d5152715b9e34c
parentfaaee71c5c776c2392219af503a7f9c96013245f
Add support for clearing the disk cache
https://bugs.webkit.org/show_bug.cgi?id=139458

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
If we're asked to clear the disk cache, do so. Clearing the cache is asynchronous,
so we make sure not to call the completion handler right away in that case.

* NetworkProcess/NetworkProcess.h:
Add clearDiskCache member function.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
Clear the disk cache, then call the completion handler.

* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
Call the new clearDiskCache function.

* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeDiskCache.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeDiskCache.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm
Source/WebKit2/Shared/WebsiteData/WebsiteDataTypes.h
Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h
Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm