RESOLVED FIXED154689
[WK2] Stub support for WebsiteDataTypeResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=154689
Summary [WK2] Stub support for WebsiteDataTypeResourceLoadStatistics
Brent Fulgham
Reported 2016-02-25 12:59:43 PST
Provide a stub implementation of a proposed WKWebsiteDataStore method so we can write some internal tests.
Attachments
Patch (8.71 KB, patch)
2016-02-25 13:11 PST, Brent Fulgham
no flags
Patch (7.26 KB, patch)
2016-02-25 14:17 PST, Brent Fulgham
no flags
Patch (Correct typo) (7.26 KB, patch)
2016-02-25 16:23 PST, Brent Fulgham
no flags
Patch (5.67 KB, patch)
2016-02-29 19:34 PST, Brent Fulgham
no flags
Patch (revised per Sam, rebaselined) (5.34 KB, patch)
2016-02-29 21:26 PST, Brent Fulgham
no flags
Patch (revised per Sam, rebaselined). (5.35 KB, patch)
2016-02-29 21:35 PST, Brent Fulgham
sam: review+
Brent Fulgham
Comment 1 2016-02-25 13:00:27 PST
Brent Fulgham
Comment 2 2016-02-25 13:11:45 PST
Anders Carlsson
Comment 3 2016-02-25 13:34:54 PST
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.
Brent Fulgham
Comment 4 2016-02-25 14:17:39 PST
Brent Fulgham
Comment 5 2016-02-25 14:20:04 PST
(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.
Brent Fulgham
Comment 6 2016-02-25 16:23:24 PST
Created attachment 272260 [details] Patch (Correct typo)
Sam Weinig
Comment 7 2016-02-29 18:18:16 PST
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.
Brent Fulgham
Comment 8 2016-02-29 19:34:39 PST
Brent Fulgham
Comment 9 2016-02-29 21:26:18 PST
Created attachment 272547 [details] Patch (revised per Sam, rebaselined)
Brent Fulgham
Comment 10 2016-02-29 21:35:26 PST
Created attachment 272548 [details] Patch (revised per Sam, rebaselined).
Sam Weinig
Comment 11 2016-03-01 16:19:03 PST
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.
Brent Fulgham
Comment 12 2016-03-01 17:02:03 PST
Note You need to log in before you can comment on or make changes to this bug.