Changeset 182540 in webkit
- Timestamp:
- Apr 8, 2015, 9:10:56 AM (10 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r182365 r182540 1 2015-04-07 Anders Carlsson <andersca@apple.com> 2 3 Get rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy 4 https://bugs.webkit.org/show_bug.cgi?id=143504 5 6 Reviewed by Sam Weinig. 7 8 * WebKit.xcodeproj/project.pbxproj: 9 Add WebApplicationCacheInternal.h. 10 1 11 2015-04-05 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 12 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r181838 r182540 53 53 1A77B02E0EE7730500C8A1F9 /* WebPluginRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */; }; 54 54 1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */; }; 55 1A86CCD41AD48A620074BA89 /* WebApplicationCacheInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */; }; 55 56 1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */; }; 56 57 1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */; }; … … 518 519 1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginRequest.h; sourceTree = "<group>"; }; 519 520 1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebPluginRequest.m; sourceTree = "<group>"; }; 521 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheInternal.h; sourceTree = "<group>"; }; 520 522 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostedNetscapePluginStream.h; sourceTree = "<group>"; }; 521 523 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HostedNetscapePluginStream.mm; sourceTree = "<group>"; }; … … 1588 1590 B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */, 1589 1591 B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */, 1592 1A86CCD31AD48A620074BA89 /* WebApplicationCacheInternal.h */, 1590 1593 A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */, 1591 1594 A5DEFC1211D5344B00885273 /* WebApplicationCacheQuotaManager.mm */, … … 1934 1937 939810A40824BF01008DF038 /* WebPDFView.h in Headers */, 1935 1938 1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */, 1939 1A86CCD41AD48A620074BA89 /* WebApplicationCacheInternal.h in Headers */, 1936 1940 939810350824BF01008DF038 /* WebPlugin.h in Headers */, 1937 1941 939810360824BF01008DF038 /* WebPluginContainer.h in Headers */, -
trunk/Source/WebKit/mac/ChangeLog
r182494 r182540 1 2015-04-07 Anders Carlsson <andersca@apple.com> 2 3 Get rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy 4 https://bugs.webkit.org/show_bug.cgi?id=143504 5 6 Reviewed by Sam Weinig. 7 8 Add a webApplicationCacheStorage() function and use it throughout WebKitLegacy. 9 In the future, webApplicationCacheStorage will return a custom singleton, but for now 10 it just returns ApplicationCacheStorage::singleton(). 11 12 * Misc/WebCache.mm: 13 (+[WebCache empty]): 14 * WebCoreSupport/WebApplicationCache.mm: 15 (+[WebApplicationCache maximumSize]): 16 (+[WebApplicationCache setMaximumSize:]): 17 (+[WebApplicationCache defaultOriginQuota]): 18 (+[WebApplicationCache setDefaultOriginQuota:]): 19 (+[WebApplicationCache originsWithCache]): 20 (webApplicationCacheStorage): 21 * WebCoreSupport/WebApplicationCacheInternal.h: Added. 22 * WebCoreSupport/WebApplicationCacheQuotaManager.mm: 23 (-[WebApplicationCacheQuotaManager usage]): 24 (-[WebApplicationCacheQuotaManager quota]): 25 (-[WebApplicationCacheQuotaManager setQuota:]): 26 * WebView/WebView.mm: 27 (WebKitInitializeApplicationCachePathIfNecessary): 28 1 29 2015-04-07 Brady Eidson <beidson@apple.com> 2 30 -
trunk/Source/WebKit/mac/Misc/WebCache.mm
r182449 r182540 26 26 #import "WebCache.h" 27 27 28 #import "WebApplicationCacheInternal.h" 28 29 #import "WebNSObjectExtras.h" 29 30 #import "WebPreferences.h" … … 120 121 121 122 // Empty the application cache. 122 WebCore::ApplicationCacheStorage::singleton().empty();123 webApplicationCacheStorage().empty(); 123 124 124 125 // Empty the Cross-Origin Preflight cache -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
r180963 r182540 24 24 */ 25 25 26 #import "WebApplicationCache .h"26 #import "WebApplicationCacheInternal.h" 27 27 28 28 #import "WebSecurityOriginInternal.h" … … 54 54 SQLiteDatabaseTracker::setClient(WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient()); 55 55 56 ApplicationCacheStorage::singleton().setCacheDirectory([NSString _webkit_localCacheDirectoryWithBundleIdentifier:bundleIdentifier]);56 webApplicationCacheStorage().setCacheDirectory([NSString _webkit_localCacheDirectoryWithBundleIdentifier:bundleIdentifier]); 57 57 58 58 initialized = YES; … … 62 62 + (long long)maximumSize 63 63 { 64 return ApplicationCacheStorage::singleton().maximumSize();64 return webApplicationCacheStorage().maximumSize(); 65 65 } 66 66 67 67 + (void)setMaximumSize:(long long)size 68 68 { 69 auto& cacheStorage = ApplicationCacheStorage::singleton(); 70 cacheStorage.deleteAllEntries(); 71 cacheStorage.setMaximumSize(size); 69 webApplicationCacheStorage().deleteAllEntries(); 70 webApplicationCacheStorage().setMaximumSize(size); 72 71 } 73 72 74 73 + (long long)defaultOriginQuota 75 74 { 76 return ApplicationCacheStorage::singleton().defaultOriginQuota();75 return webApplicationCacheStorage().defaultOriginQuota(); 77 76 } 78 77 79 78 + (void)setDefaultOriginQuota:(long long)size 80 79 { 81 ApplicationCacheStorage::singleton().setDefaultOriginQuota(size);80 webApplicationCacheStorage().setDefaultOriginQuota(size); 82 81 } 83 82 … … 100 99 { 101 100 HashSet<RefPtr<SecurityOrigin>> coreOrigins; 102 ApplicationCacheStorage::singleton().getOriginsWithCache(coreOrigins);101 webApplicationCacheStorage().getOriginsWithCache(coreOrigins); 103 102 104 103 NSMutableArray *webOrigins = [[[NSMutableArray alloc] initWithCapacity:coreOrigins.size()] autorelease]; … … 114 113 115 114 @end 115 116 WebCore::ApplicationCacheStorage& webApplicationCacheStorage() 117 { 118 return ApplicationCacheStorage::singleton(); 119 } -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCacheInternal.h
r182497 r182540 1 1 /* 2 * Copyright (C) 201 0Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import "WebApplicationCache QuotaManager.h"26 #import "WebApplicationCache.h" 27 27 28 #import "WebSecurityOriginInternal.h" 29 #import <WebCore/ApplicationCacheStorage.h> 30 31 using namespace WebCore; 32 33 @implementation WebApplicationCacheQuotaManager 34 35 - (id)initWithOrigin:(WebSecurityOrigin *)origin 36 { 37 self = [super init]; 38 if (!self) 39 return nil; 40 41 _origin = origin; 42 return self; 28 namespace WebCore { 29 class ApplicationCacheStorage; 43 30 } 44 31 45 - (WebSecurityOrigin *)origin 46 { 47 return _origin; 48 } 32 WebCore::ApplicationCacheStorage& webApplicationCacheStorage(); 49 33 50 - (unsigned long long)usage51 {52 long long usage;53 if (ApplicationCacheStorage::singleton().calculateUsageForOrigin([_origin _core], usage))54 return usage;55 return 0;56 }57 58 - (unsigned long long)quota59 {60 long long quota;61 if (ApplicationCacheStorage::singleton().calculateQuotaForOrigin([_origin _core], quota))62 return quota;63 return 0;64 }65 66 - (void)setQuota:(unsigned long long)quota67 {68 ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin([_origin _core], quota);69 }70 71 @end -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
r180963 r182540 26 26 #import "WebApplicationCacheQuotaManager.h" 27 27 28 #import "WebApplicationCacheInternal.h" 28 29 #import "WebSecurityOriginInternal.h" 29 30 #import <WebCore/ApplicationCacheStorage.h> … … 51 52 { 52 53 long long usage; 53 if ( ApplicationCacheStorage::singleton().calculateUsageForOrigin([_origin _core], usage))54 if (webApplicationCacheStorage().calculateUsageForOrigin([_origin _core], usage)) 54 55 return usage; 55 56 return 0; … … 59 60 { 60 61 long long quota; 61 if ( ApplicationCacheStorage::singleton().calculateQuotaForOrigin([_origin _core], quota))62 if (webApplicationCacheStorage().calculateQuotaForOrigin([_origin _core], quota)) 62 63 return quota; 63 64 return 0; … … 66 67 - (void)setQuota:(unsigned long long)quota 67 68 { 68 ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin([_origin _core], quota);69 webApplicationCacheStorage().storeUpdatedQuotaForOrigin([_origin _core], quota); 69 70 } 70 71 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r181866 r182540 39 39 #import "StorageThread.h" 40 40 #import "WebAlternativeTextClient.h" 41 #import "WebApplicationCache .h"41 #import "WebApplicationCacheInternal.h" 42 42 #import "WebBackForwardListInternal.h" 43 43 #import "WebBaseNetscapePluginView.h" … … 745 745 NSString* cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:appName]; 746 746 747 ApplicationCacheStorage::singleton().setCacheDirectory(cacheDir);747 webApplicationCacheStorage().setCacheDirectory(cacheDir); 748 748 initialized = YES; 749 749 }
Note:
See TracChangeset
for help on using the changeset viewer.