Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCac...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2018 17:38:25 +0000 (17:38 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2018 17:38:25 +0000 (17:38 +0000)
commit2b35a61fbac0775265dfbd04552453fb542184eb
tree6a92890bdfb0d405f95d51a83acce48e6f7754ea
parent8175ae2ba4cd9f01ef046aa716dcec533bcf1725
Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
https://bugs.webkit.org/show_bug.cgi?id=185170

Reviewed by Per Arne Vollan.

Source/WebCore:

Rename CrossOriginPreflightResultCache::empty() to CrossOriginPreflightResultCache::clear() make
it consistent with the terminology we use in WebKit to signify a function that clears a collection.
A member function named "empty" is expected to return an instance of a class in its "empty state".
For example, StringImpl::empty() returns a StringImpl instance that represents the empty string.
However CrossOriginPreflightResultCache::empty() clears out the cache in-place. We should rename
this function to better describe its purpose.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::clear):
(WebCore::CrossOriginPreflightResultCache::empty): Deleted.
* loader/CrossOriginPreflightResultCache.h:

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches):
(WebKit::WebProcess::deleteWebsiteData):

Source/WebKitLegacy/mac:

* Misc/WebCache.mm:
(+[WebCache empty]):

Source/WebKitLegacy/win:

* WebCache.cpp:
(WebCache::empty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/CrossOriginPreflightResultCache.cpp
Source/WebCore/loader/CrossOriginPreflightResultCache.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebCache.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCache.cpp