Skip to content

Commit

Permalink
Unreviewed, reverting 275367@main
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270165
rdar://123689477

275367@main broke Apple Internal builds

Reverted change:

Remove ApplicationCache code from WebKitLegacy and TestRunner
https://bugs.webkit.org/show_bug.cgi?id=270120
rdar://123651735
https://commits.webkit.org/275367@main

Canonical link: https://commits.webkit.org/275382@main
  • Loading branch information
JonWBedard committed Feb 27, 2024
1 parent 3f4bd57 commit 1f0496a
Show file tree
Hide file tree
Showing 36 changed files with 646 additions and 51 deletions.
1 change: 1 addition & 0 deletions Source/WebKit/MigratedHeaders-input.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ $(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/DOMXPathNSResolver.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/DOMXPathResult.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/NSURLDownloadSPI.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/WebAllowDenyPolicyListener.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/WebApplicationCache.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/WebArchive.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/WebAutocapitalizeTypes.h
$(WEBKITLEGACY_PRIVATE_HEADERS_DIR)/WebBackForwardList.h
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/MigratedHeaders-output.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ $(TARGET_BUILD_DIR)/$(WK_MAC_PUBLIC_IOS_PRIVATE_HEADERS_DIR)/DOMXPathNSResolver.
$(TARGET_BUILD_DIR)/$(WK_MAC_PUBLIC_IOS_PRIVATE_HEADERS_DIR)/DOMXPathResult.h
$(TARGET_BUILD_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/NSURLDownloadSPI.h
$(TARGET_BUILD_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/WebAllowDenyPolicyListener.h
$(TARGET_BUILD_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/WebApplicationCache.h
$(TARGET_BUILD_DIR)/$(WK_MAC_PUBLIC_IOS_PRIVATE_HEADERS_DIR)/WebArchive.h
$(TARGET_BUILD_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/WebAutocapitalizeTypes.h
$(TARGET_BUILD_DIR)/$(WK_MAC_PUBLIC_IOS_PRIVATE_HEADERS_DIR)/WebBackForwardList.h
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit/Modules/OSX_Private.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,11 @@ framework module WebKit_Private [system] {
export *
}

explicit module WebApplicationCache {
header "WebApplicationCache.h"
export *
}

explicit module WebAutocapitalizeTypes {
header "WebAutocapitalizeTypes.h"
export *
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit/Modules/iOS_Private.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,11 @@ framework module WebKit_Private [system] {
export *
}

explicit module WebApplicationCache {
header "WebApplicationCache.h"
export *
}

explicit module WebArchive {
header "WebArchive.h"
export *
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ void NetworkResourceLoader::processClearSiteDataHeader(const WebCore::ResourceRe
if (clearSiteDataValues.contains(ClearSiteDataValue::Cookies))
typesToRemove.add(WebsiteDataType::Cookies);
if (clearSiteDataValues.contains(ClearSiteDataValue::Storage)) {
typesToRemove.add({ WebsiteDataType::LocalStorage, WebsiteDataType::SessionStorage, WebsiteDataType::IndexedDBDatabases, WebsiteDataType::DOMCache, WebsiteDataType::FileSystem, WebsiteDataType::WebSQLDatabases });
typesToRemove.add({ WebsiteDataType::LocalStorage, WebsiteDataType::SessionStorage, WebsiteDataType::IndexedDBDatabases, WebsiteDataType::DOMCache, WebsiteDataType::OfflineWebApplicationCache, WebsiteDataType::FileSystem, WebsiteDataType::WebSQLDatabases });
typesToRemove.add(WebsiteDataType::ServiceWorkerRegistrations);
}

Expand Down
40 changes: 40 additions & 0 deletions Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "WebProcess.h"
#include <WebCore/AXCoreObject.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/CSSParser.h>
#include <WebCore/CaptionUserPreferences.h>
#include <WebCore/CompositionHighlight.h>
Expand Down Expand Up @@ -863,6 +864,12 @@ WKStringRef WKBundlePageCopyGroupIdentifier(WKBundlePageRef pageRef)
return WebKit::toCopiedAPI(WebKit::toImpl(pageRef)->pageGroup()->identifier());
}

void WKBundlePageClearApplicationCache(WKBundlePageRef page)
{
if (auto* applicationCacheStorage = WebKit::toImpl(page)->corePage()->applicationCacheStorage())
applicationCacheStorage->deleteAllEntries();
}

void WKBundlePageSetCaptionDisplayMode(WKBundlePageRef page, WKStringRef mode)
{
#if ENABLE(VIDEO)
Expand All @@ -887,6 +894,39 @@ WKCaptionUserPreferencesTestingModeTokenRef WKBundlePageCreateCaptionUserPrefere
#endif
}

void WKBundlePageClearApplicationCacheForOrigin(WKBundlePageRef page, WKStringRef origin)
{
if (auto* applicationCacheStorage = WebKit::toImpl(page)->corePage()->applicationCacheStorage())
applicationCacheStorage->deleteCacheForOrigin(WebCore::SecurityOriginData::fromURL(URL { WebKit::toImpl(origin)->string() }));
}

void WKBundlePageSetAppCacheMaximumSize(WKBundlePageRef page, uint64_t size)
{
if (auto* applicationCacheStorage = WebKit::toImpl(page)->corePage()->applicationCacheStorage())
applicationCacheStorage->setMaximumSize(size);
}

uint64_t WKBundlePageGetAppCacheUsageForOrigin(WKBundlePageRef page, WKStringRef origin)
{
if (auto* applicationCacheStorage = WebKit::toImpl(page)->corePage()->applicationCacheStorage())
return applicationCacheStorage->diskUsageForOrigin(WebCore::SecurityOriginData::fromURL(URL { WebKit::toImpl(origin)->string() }));

return 0;
}

WKArrayRef WKBundlePageCopyOriginsWithApplicationCache(WKBundlePageRef page)
{
auto* applicationCacheStorage = WebKit::toImpl(page)->corePage()->applicationCacheStorage();
if (!applicationCacheStorage)
return { };

auto origins = applicationCacheStorage->originsWithCache();
auto originIdentifiers = WTF::map(origins, [](auto& origin) -> RefPtr<API::Object> {
return API::String::create(origin.databaseIdentifier());
});
return WebKit::toAPI(&API::Array::create(WTFMove(originIdentifiers)).leakRef());
}

void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef page, WKEventThrottlingBehavior* behavior)
{
std::optional<WebCore::EventThrottlingBehavior> behaviorValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ WK_EXPORT void WKBundlePageAddUserScriptInWorld(WKBundlePageRef page, WKStringRe
WK_EXPORT void WKBundlePageAddUserStyleSheet(WKBundlePageRef page, WKStringRef source, WKUserContentInjectedFrames injectedFrames);
WK_EXPORT void WKBundlePageRemoveAllUserContent(WKBundlePageRef page);

// Application Cache API, for WKTR.
WK_EXPORT void WKBundlePageClearApplicationCache(WKBundlePageRef page);
WK_EXPORT void WKBundlePageClearApplicationCacheForOrigin(WKBundlePageRef page, WKStringRef origin);
WK_EXPORT void WKBundlePageSetAppCacheMaximumSize(WKBundlePageRef page, uint64_t size);
WK_EXPORT uint64_t WKBundlePageGetAppCacheUsageForOrigin(WKBundlePageRef page, WKStringRef origin);
WK_EXPORT WKArrayRef WKBundlePageCopyOriginsWithApplicationCache(WKBundlePageRef page);

WK_EXPORT void WKBundlePageSetCaptionDisplayMode(WKBundlePageRef page, WKStringRef mode);
WK_EXPORT WKCaptionUserPreferencesTestingModeTokenRef WKBundlePageCreateCaptionUserPreferencesTestingModeToken(WKBundlePageRef page);

Expand Down
3 changes: 3 additions & 0 deletions Source/WebKitLegacy/SourcesCocoa.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ mac/Plugins/WebPluginController.mm
mac/Plugins/WebPluginDatabase.mm

mac/History/WebBackForwardList.mm

mac/WebCoreSupport/WebApplicationCache.mm
mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
mac/WebCoreSupport/WebFrameLoaderClient.mm

mac/WebInspector/WebInspector.mm
Expand Down
16 changes: 16 additions & 0 deletions Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
1A6B313B1A51F3A900422975 /* StorageTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6B312E1A51F3A900422975 /* StorageTracker.cpp */; };
1A6B313C1A51F3A900422975 /* StorageTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6B312F1A51F3A900422975 /* StorageTracker.h */; };
1A6B313D1A51F3A900422975 /* StorageTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6B31301A51F3A900422975 /* StorageTrackerClient.h */; };
1A86CCD41AD48A620074BA89 /* WebApplicationCacheInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */; };
1A9119F61DB0470A0087D1FD /* BackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9119F41DB0470A0087D1FD /* BackForwardList.mm */; };
1A9119F71DB0470A0087D1FD /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9119F51DB0470A0087D1FD /* BackForwardList.h */; };
1AA83F831A5C4AE400026EC6 /* WebDatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */; };
Expand Down Expand Up @@ -609,9 +610,11 @@
A5DEFC0C11D5331C00885273 /* WebSecurityOriginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
A5DEFC0F11D5343E00885273 /* WebDatabaseQuotaManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC0D11D5343E00885273 /* WebDatabaseQuotaManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5DEFC0E11D5343E00885273 /* WebDatabaseQuotaManager.mm */; };
A5DEFC1311D5344B00885273 /* WebApplicationCacheQuotaManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */; };
A70936AF0B5608DC00CDB48E /* WebDragClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A70936AD0B5608DC00CDB48E /* WebDragClient.h */; };
A70936B00B5608DC00CDB48E /* WebDragClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = A70936AE0B5608DC00CDB48E /* WebDragClient.mm */; };
AB9FBBBB0F8582B0006ADC43 /* WebDOMOperationsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = AB9FBBBA0F8582B0006ADC43 /* WebDOMOperationsInternal.h */; };
B6CE5C25100BC5F500219936 /* WebApplicationCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
B804176F1217A83100466BAE /* WebInspectorFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = B804176D1217A83100466BAE /* WebInspectorFrontend.h */; };
B80417701217A83100466BAE /* WebInspectorFrontend.mm in Sources */ = {isa = PBXBuildFile; fileRef = B804176E1217A83100466BAE /* WebInspectorFrontend.mm */; };
B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = B82958D1132707D0000D0E79 /* CorrectionPanel.h */; };
Expand Down Expand Up @@ -723,6 +726,7 @@
1A6B312E1A51F3A900422975 /* StorageTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageTracker.cpp; path = Storage/StorageTracker.cpp; sourceTree = SOURCE_ROOT; };
1A6B312F1A51F3A900422975 /* StorageTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageTracker.h; path = Storage/StorageTracker.h; sourceTree = SOURCE_ROOT; };
1A6B31301A51F3A900422975 /* StorageTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageTrackerClient.h; path = Storage/StorageTrackerClient.h; sourceTree = SOURCE_ROOT; };
1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheInternal.h; sourceTree = "<group>"; };
1A9119F41DB0470A0087D1FD /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
1A9119F51DB0470A0087D1FD /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebDatabaseProvider.cpp; path = ../../Storage/WebDatabaseProvider.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1401,9 +1405,13 @@
A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSecurityOriginPrivate.h; sourceTree = "<group>"; };
A5DEFC0D11D5343E00885273 /* WebDatabaseQuotaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDatabaseQuotaManager.h; sourceTree = "<group>"; };
A5DEFC0E11D5343E00885273 /* WebDatabaseQuotaManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDatabaseQuotaManager.mm; sourceTree = "<group>"; };
A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheQuotaManager.h; sourceTree = "<group>"; };
A5DEFC1211D5344B00885273 /* WebApplicationCacheQuotaManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebApplicationCacheQuotaManager.mm; sourceTree = "<group>"; };
A70936AD0B5608DC00CDB48E /* WebDragClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDragClient.h; sourceTree = "<group>"; };
A70936AE0B5608DC00CDB48E /* WebDragClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDragClient.mm; sourceTree = "<group>"; };
AB9FBBBA0F8582B0006ADC43 /* WebDOMOperationsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDOMOperationsInternal.h; sourceTree = "<group>"; };
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCache.h; sourceTree = "<group>"; };
B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebApplicationCache.mm; sourceTree = "<group>"; };
B804176D1217A83100466BAE /* WebInspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorFrontend.h; sourceTree = "<group>"; };
B804176E1217A83100466BAE /* WebInspectorFrontend.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorFrontend.mm; sourceTree = "<group>"; };
B82958D1132707D0000D0E79 /* CorrectionPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CorrectionPanel.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2506,6 +2514,11 @@
5CB05C8629CA18C400CC1AA0 /* SocketStreamHandleImplCFNet.cpp */,
CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */,
CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */,
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */,
B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */,
1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */,
A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */,
A5DEFC1211D5344B00885273 /* WebApplicationCacheQuotaManager.mm */,
460135E2269FAD31007A8A95 /* WebBroadcastChannelRegistry.cpp */,
460135E3269FAD31007A8A95 /* WebBroadcastChannelRegistry.h */,
51CBFCAC0D10E6C5002DBF51 /* WebCachedFramePlatformData.h */,
Expand Down Expand Up @@ -2844,6 +2857,9 @@
44DDD0822540F97F00836F81 /* TestingFunctions.h in Headers */,
7C1FB3C21846E8E1001A03D8 /* WebAllowDenyPolicyListener.h in Headers */,
CEDA12DC152CBE6800D9E08D /* WebAlternativeTextClient.h in Headers */,
B6CE5C25100BC5F500219936 /* WebApplicationCache.h in Headers */,
1A86CCD41AD48A620074BA89 /* WebApplicationCacheInternal.h in Headers */,
A5DEFC1311D5344B00885273 /* WebApplicationCacheQuotaManager.h in Headers */,
9398109A0824BF01008DF038 /* WebArchive.h in Headers */,
44BB8B141241A022001E3A22 /* WebArchiveInternal.h in Headers */,
939810290824BF01008DF038 /* WebAuthenticationPanel.h in Headers */,
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKitLegacy/mac/Misc/WebCache.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
#import "WebCache.h"

#import "NetworkStorageSessionMap.h"
#import "WebApplicationCacheInternal.h"
#import "WebNSObjectExtras.h"
#import "WebPreferences.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import <JavaScriptCore/InitializeThreading.h>
#import <WebCore/ApplicationCacheStorage.h>
#import <WebCore/CookieJar.h>
#import <WebCore/CredentialStorage.h>
#import <WebCore/CrossOriginPreflightResultCache.h>
Expand Down Expand Up @@ -122,6 +124,9 @@ + (void)empty
[WebView _setCacheModel:WebCacheModelDocumentViewer];
[WebView _setCacheModel:cacheModel];

// Empty the application cache.
webApplicationCacheStorage().empty();

// Empty the Cross-Origin Preflight cache
WebCore::CrossOriginPreflightResultCache::singleton().clear();
}
Expand Down
48 changes: 48 additions & 0 deletions Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCache.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (C) 2009 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>

@class WebSecurityOrigin;

@interface WebApplicationCache: NSObject

#if TARGET_OS_IPHONE
+ (void)initializeWithBundleIdentifier:(NSString *)bundleIdentifier;
#endif
+ (long long)maximumSize;
+ (void)setMaximumSize:(long long)size;

+ (long long)defaultOriginQuota;
+ (void)setDefaultOriginQuota:(long long)size;

+ (long long)diskUsageForOrigin:(WebSecurityOrigin *)origin;

+ (void)deleteAllApplicationCaches;
+ (void)deleteCacheForOrigin:(WebSecurityOrigin *)origin;

+ (NSArray *)originsWithCache;

@end
Loading

0 comments on commit 1f0496a

Please sign in to comment.