Changeset 64403 in webkit
- Timestamp:
- Jul 30, 2010 8:38:13 PM (14 years ago)
- Location:
- trunk/WebKit/mac
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/mac/ChangeLog
r64400 r64403 1 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> 2 3 Fix for tests that broke after r64400. Tracking a more 4 ideal solution in https://bugs.webkit.org/show_bug.cgi?id=40627 5 6 Switch the interface back to (unsigned long long), and move 7 the WebDatabaseSecurityOrigin implementation up into WebSecurityOrigin. 8 The subclasses' implementations were not getting called. 9 10 * Storage/WebDatabaseSecurityOrigin.mm: 11 * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: 12 (-[WebApplicationCacheSecurityOrigin quota]): 13 (-[WebApplicationCacheSecurityOrigin setQuota:]): 14 * WebCoreSupport/WebSecurityOrigin.mm: 15 (-[WebSecurityOrigin usage]): 16 (-[WebSecurityOrigin quota]): 17 (-[WebSecurityOrigin setQuota:]): 18 * WebCoreSupport/WebSecurityOriginPrivate.h: 19 1 20 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> 2 21 -
trunk/WebKit/mac/Storage/WebDatabaseSecurityOrigin.mm
r64400 r64403 25 25 26 26 #import "WebDatabaseSecurityOrigin.h" 27 28 #import <WebCore/DatabaseTracker.h>29 27 #import <WebCore/SecurityOrigin.h> 30 28 … … 33 31 @implementation WebDatabaseSecurityOrigin 34 32 35 - (long long)usage 36 { 37 #if ENABLE(DATABASE) 38 return DatabaseTracker::tracker().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private)); 39 #else 40 return 0; 41 #endif 42 } 43 44 - (long long)quota 45 { 46 #if ENABLE(DATABASE) 47 return DatabaseTracker::tracker().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private)); 48 #else 49 return 0; 50 #endif 51 } 52 53 // If the quota is set to a value lower than the current usage, that quota will 54 // "stick" but no data will be purged to meet the new quota. This will simply 55 // prevent new data from being added to databases in that origin 56 - (void)setQuota:(long long)quota 57 { 58 #if ENABLE(DATABASE) 59 DatabaseTracker::tracker().setQuota(reinterpret_cast<SecurityOrigin*>(_private), quota); 60 #endif 61 } 33 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=40627 34 // Proper steps should be taken to have subclass implementations of SecurityOrigin's 35 // origin, quota, and setQuota methods. 62 36 63 37 @end -
trunk/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.mm
r64400 r64403 32 32 @implementation WebApplicationCacheSecurityOrigin 33 33 34 - ( long long)usage34 - (unsigned long long)usage 35 35 { 36 36 #if ENABLE(OFFLINE_WEB_APPLICATIONS) … … 44 44 } 45 45 46 - ( long long)quota46 - (unsigned long long)quota 47 47 { 48 48 #if ENABLE(OFFLINE_WEB_APPLICATIONS) … … 56 56 } 57 57 58 - (void)setQuota:( long long)quota58 - (void)setQuota:(unsigned long long)quota 59 59 { 60 60 #if ENABLE(OFFLINE_WEB_APPLICATIONS) -
trunk/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
r64400 r64403 31 31 #import <WebCore/KURL.h> 32 32 #import <WebCore/SecurityOrigin.h> 33 #import <WebCore/DatabaseTracker.h> 33 34 34 35 using namespace WebCore; … … 69 70 } 70 71 71 // Meant to be implemented in a subclass. 72 - (long long)usage 72 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=40627 73 // Proper steps should be taken to have subclass implementations of SecurityOrigin's 74 // origin, quota, and setQuota methods. 75 76 - (unsigned long long)usage 73 77 { 78 #if ENABLE(DATABASE) 79 return DatabaseTracker::tracker().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private)); 80 #else 74 81 return 0; 82 #endif 75 83 } 76 84 77 // Meant to be implemented in a subclass. 78 - (long long)quota 85 - (unsigned long long)quota 79 86 { 87 #if ENABLE(DATABASE) 88 return DatabaseTracker::tracker().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private)); 89 #else 80 90 return 0; 91 #endif 81 92 } 82 93 83 // Meant to be implemented in a subclass. 84 - (void)setQuota:(long long)quota 94 // If the quota is set to a value lower than the current usage, that quota will 95 // "stick" but no data will be purged to meet the new quota. This will simply 96 // prevent new data from being added to databases in that origin 97 - (void)setQuota:(unsigned long long)quota 85 98 { 99 #if ENABLE(DATABASE) 100 DatabaseTracker::tracker().setQuota(reinterpret_cast<SecurityOrigin*>(_private), quota); 101 #endif 86 102 } 87 103 -
trunk/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h
r64400 r64403 43 43 // Meant to be implemented in a subclass. 44 44 // Returns the current total usage of all relevant items in this security origin in bytes. 45 - ( long long)usage;45 - (unsigned long long)usage; 46 46 47 47 // Meant to be implemented in a subclass. 48 48 // Returns the quota of this security origin in bytes. 49 - ( long long)quota;49 - (unsigned long long)quota; 50 50 51 51 // Meant to be implemented in a subclass. 52 52 // Sets the storage quota in bytes. 53 - (void)setQuota:( long long)quota;53 - (void)setQuota:(unsigned long long)quota; 54 54 55 55 @end
Note: See TracChangeset
for help on using the changeset viewer.