Provide a stub implementation of a proposed WKWebsiteDataStore method so we can write some internal tests.
<rdar://problem/24702576>
Created attachment 272228 [details] Patch
Comment on attachment 272228 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272228&action=review This shouldn't be API. > Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:146 > +- (void)removeDataOfTypes:(NSSet *)dataTypes forURL:(NSURL *)url fromDate:(NSDate *)startData toDate:(NSDate *)endDate completionHandler:(void (^)(void))completionHandler No, this is not how we remove data in the WKWebsiteDataStore world. See WKWebsiteDataRecord.
Created attachment 272237 [details] Patch
(In reply to comment #3) > Comment on attachment 272228 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272228&action=review > > This shouldn't be API. > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:146 > > +- (void)removeDataOfTypes:(NSSet *)dataTypes forURL:(NSURL *)url fromDate:(NSDate *)startData toDate:(NSDate *)endDate completionHandler:(void (^)(void))completionHandler > > No, this is not how we remove data in the WKWebsiteDataStore world. See > WKWebsiteDataRecord. OK. As we discussed offline we will use the existing API. We do need the new flag to handle deleting load statistics without getting rid of other stuff.
Created attachment 272260 [details] Patch (Correct typo)
Comment on attachment 272260 [details] Patch (Correct typo) View in context: https://bugs.webkit.org/attachment.cgi?id=272260&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataRecord.h:50 > +/*! @constant WKWebsiteDataTypeResourceLoadStatistics Resource load statistics. */ > +WK_EXTERN NSString * const WKWebsiteDataTypeResourceLoadStatistics WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); This needs to go in WKWebsiteDataRecordPrivate.h and gain an _. > Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:90 > + allWebsiteDataTypes = [[NSSet alloc] initWithArray:@[ WKWebsiteDataTypeDiskCache, WKWebsiteDataTypeMemoryCache, WKWebsiteDataTypeOfflineWebApplicationCache, WKWebsiteDataTypeCookies, WKWebsiteDataTypeSessionStorage, WKWebsiteDataTypeLocalStorage, WKWebsiteDataTypeIndexedDBDatabases, WKWebsiteDataTypeWebSQLDatabases, WKWebsiteDataTypeResourceLoadStatistics ]]; Only API types should be in this set.
Created attachment 272541 [details] Patch
Created attachment 272547 [details] Patch (revised per Sam, rebaselined)
Created attachment 272548 [details] Patch (revised per Sam, rebaselined).
Comment on attachment 272548 [details] Patch (revised per Sam, rebaselined). View in context: https://bugs.webkit.org/attachment.cgi?id=272548&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:47 > +NSString * const _WKWebsiteDataTypeResourceLoadStatistics = @"WKWebsiteDataTypeResourceLoadStatistics"; Please add underscore to string as well.
Committed r197427: <http://trac.webkit.org/changeset/197427>