Changeset 183267 in webkit


Ignore:
Timestamp:
Apr 24, 2015, 10:26:08 AM (10 years ago)
Author:
andersca@apple.com
Message:

Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144138

Reviewed by Darin Adler.

  • UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r183266 r183267  
     12015-04-23  Anders Carlsson  <andersca@apple.com>
     2
     3        Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
     4        https://bugs.webkit.org/show_bug.cgi?id=144138
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
     9        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
     10        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
     11        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
     12        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
     13        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
     14
    1152015-04-24  Doug Russell  <d_russell@apple.com>
    216
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataRecord.h

    r183152 r183267  
    3232WK_ASSUME_NONNULL_BEGIN
    3333
     34/*! @constant WKWebsiteDataTypeDiskCache On-disk caches. */
    3435WK_EXTERN NSString * const WKWebsiteDataTypeDiskCache WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
     36
     37/*! @constant WKWebsiteDataTypeMemoryCache In-memory caches. */
    3538WK_EXTERN NSString * const WKWebsiteDataTypeMemoryCache WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
     39
     40/*! @constant WKWebsiteDataTypeOfflineWebApplicationCache HTML offline web application caches. */
    3641WK_EXTERN NSString * const WKWebsiteDataTypeOfflineWebApplicationCache WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
    3742
     43/*! @constant WKWebsiteDataTypeCookies Cookies. */
    3844WK_EXTERN NSString * const WKWebsiteDataTypeCookies WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
     45
     46/*! @constant WKWebsiteDataTypeLocalStorage HTML local storage. */
    3947WK_EXTERN NSString * const WKWebsiteDataTypeLocalStorage WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
     48
     49/*! @constant WKWebsiteDataTypeWebSQLDatabases WebSQL databases. */
    4050WK_EXTERN NSString * const WKWebsiteDataTypeWebSQLDatabases WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
     51
     52/*! @constant WKWebsiteDataTypeIndexedDBDatabases IndexedDB databases. */
    4153WK_EXTERN NSString * const WKWebsiteDataTypeIndexedDBDatabases WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
    4254
     55/*! A WKWebsiteDataRecord represents website data, grouped by domain name using the public suffix list. */
    4356WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
    4457@interface WKWebsiteDataRecord : NSObject
    4558
     59/*! @abstract The display name for the data record. This is usually the domain name. */
    4660@property (nonatomic, readonly, copy) NSString *displayName;
    4761
     62/*! @abstract The various types of website data that exist for this data record. */
    4863@property (nonatomic, readonly, copy) WK_SET(NSString *) *dataTypes;
    4964
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h

    r183152 r183267  
    3232WK_ASSUME_NONNULL_BEGIN
    3333
     34/*! A WKWebsiteDataStore represents various types of data that a website might
     35 make use of. This includes cookies, disk and memory caches, and persistent data such as
     36 WebSQL and IndexedDB databases and local storage.
     37 */
    3438WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
    3539@interface WKWebsiteDataStore : NSObject
    3640
    37 // Returns the shared default data store.
     41/* @abstract Returns the default data store. */
    3842+ (WKWebsiteDataStore *)defaultDataStore;
    3943
    40 // Returns a new non-persistent data store.
     44/** @abstract Returns a new non-persistent data store.
     45 @discussion If a WKWebView is associated with a non-persistent data store, no data will
     46 be written to the file system. This is useful for implementing "private browsing" in a web view.
     47*/
    4148+ (WKWebsiteDataStore *)nonPersistentDataStore;
    4249
    4350- (instancetype)init WK_UNAVAILABLE;
    4451
     52/*! @abstract Whether the data store is non-persistent or not. */
    4553@property (readonly, getter=isNonPersistent) BOOL nonPersistent;
    4654
     55/*! @abstract Returns a set of all available website data types. */
    4756+ (WK_SET(NSString *) *)allWebsiteDataTypes;
    4857
    49 - (void)fetchDataRecordsOfTypes:(WK_SET(NSString *) *)websiteDataTypes completionHandler:(void (^)(WK_ARRAY(WKWebsiteDataRecord *) *))completionHandler;
    50 - (void)removeDataOfTypes:(WK_SET(NSString *) *)websiteDataTypes forDataRecords:(WK_ARRAY(WKWebsiteDataRecord *) *)dataRecords completionHandler:(void (^)(void))completionHandler;
     58/*! @abstract Fetches data records containing the given website data types.
     59  @param dataTypes The website data types to fetch records for.
     60  @param completionHandler A block to invoke when the data records have been fetched.
     61*/
     62- (void)fetchDataRecordsOfTypes:(WK_SET(NSString *) *)dataTypes completionHandler:(void (^)(WK_ARRAY(WKWebsiteDataRecord *) *))completionHandler;
     63
     64/*! @abstract Removes website data of the given types for the given data records.
     65 @param dataTypes The website data types that should be removed.
     66 @param dataRecords The website data records to delete website data for.
     67 @param completionHandler A block to invoke when the website data for the records has been removed.
     68*/
     69- (void)removeDataOfTypes:(WK_SET(NSString *) *)dataTypes forDataRecords:(WK_ARRAY(WKWebsiteDataRecord *) *)dataRecords completionHandler:(void (^)(void))completionHandler;
     70
     71/*! @abstract Removes all website data of the given types that has been modified since the given date.
     72 @param dataTypes The website data types that should be removed.
     73 @param date A date. All website data modified after this date will be removed.
     74 @param completionHandler A block to invoke when the website data has been removed.
     75*/
    5176- (void)removeDataOfTypes:(WK_SET(NSString *) *)websiteDataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)(void))completionHandler;
    5277
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm

    r183105 r183267  
    7575}
    7676
    77 - (void)fetchDataRecordsOfTypes:(NSSet *)websiteDataTypes completionHandler:(void (^)(NSArray *))completionHandler
     77- (void)fetchDataRecordsOfTypes:(NSSet *)dataTypes completionHandler:(void (^)(NSArray *))completionHandler
    7878{
    7979    auto completionHandlerCopy = Block_copy(completionHandler);
    8080
    81     _websiteDataStore->websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(websiteDataTypes), [completionHandlerCopy](Vector<WebKit::WebsiteDataRecord> websiteDataRecords) {
     81    _websiteDataStore->websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(dataTypes), [completionHandlerCopy](Vector<WebKit::WebsiteDataRecord> websiteDataRecords) {
    8282        Vector<RefPtr<API::Object>> elements;
    8383        elements.reserveInitialCapacity(websiteDataRecords.size());
     
    9292}
    9393
    94 - (void)removeDataOfTypes:(NSSet *)websiteDataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)(void))completionHandler
     94- (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)(void))completionHandler
    9595{
    9696    auto completionHandlerCopy = Block_copy(completionHandler);
    97     _websiteDataStore->websiteDataStore().removeData(WebKit::toWebsiteDataTypes(websiteDataTypes), toSystemClockTime(date ? date : [NSDate distantPast]), [completionHandlerCopy] {
     97    _websiteDataStore->websiteDataStore().removeData(WebKit::toWebsiteDataTypes(dataTypes), toSystemClockTime(date ? date : [NSDate distantPast]), [completionHandlerCopy] {
    9898        completionHandlerCopy();
    9999        Block_release(completionHandlerCopy);
     
    111111}
    112112
    113 - (void)removeDataOfTypes:(NSSet *)websiteDataTypes forDataRecords:(NSArray *)dataRecords completionHandler:(void (^)(void))completionHandler
     113- (void)removeDataOfTypes:(NSSet *)dataTypes forDataRecords:(NSArray *)dataRecords completionHandler:(void (^)(void))completionHandler
    114114{
    115115    auto completionHandlerCopy = Block_copy(completionHandler);
    116116
    117     _websiteDataStore->websiteDataStore().removeData(WebKit::toWebsiteDataTypes(websiteDataTypes), toWebsiteDataRecords(dataRecords), [completionHandlerCopy] {
     117    _websiteDataStore->websiteDataStore().removeData(WebKit::toWebsiteDataTypes(dataTypes), toWebsiteDataRecords(dataRecords), [completionHandlerCopy] {
    118118        completionHandlerCopy();
    119119        Block_release(completionHandlerCopy);
Note: See TracChangeset for help on using the changeset viewer.