Title: [215441] trunk
Revision
215441
Author
[email protected]
Date
2017-04-17 16:22:21 -0700 (Mon, 17 Apr 2017)

Log Message

Make WKHTTPCookieStore public.
<rdar://problem/31024691> and https://bugs.webkit.org/show_bug.cgi?id=170920

Reviewed by Geoffrey Garen.

Source/WebKit2:

* UIProcess/API/Cocoa/WKHTTPCookieStore.h:
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
(-[WKHTTPCookieStore getAllCookies:]):
(-[WKHTTPCookieStore allCookies:]): Deleted.

* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore httpCookieStore]):
(-[WKWebsiteDataStore _httpCookieStore]): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (215440 => 215441)


--- trunk/Source/WebKit2/ChangeLog	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-17 23:22:21 UTC (rev 215441)
@@ -1,3 +1,23 @@
+2017-04-17  Brady Eidson  <[email protected]>
+
+        Make WKHTTPCookieStore public.
+        <rdar://problem/31024691> and https://bugs.webkit.org/show_bug.cgi?id=170920
+
+        Reviewed by Geoffrey Garen.
+
+        * UIProcess/API/Cocoa/WKHTTPCookieStore.h:
+        * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
+        (-[WKHTTPCookieStore getAllCookies:]):
+        (-[WKHTTPCookieStore allCookies:]): Deleted.
+
+        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
+        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+        (-[WKWebsiteDataStore httpCookieStore]):
+        (-[WKWebsiteDataStore _httpCookieStore]): Deleted.
+        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2017-04-17  Eric Carlson  <[email protected]>
 
         [MediaStream] Fix typo in UIDelegate::mediaCaptureStateDidChange

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h (215440 => 215441)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h	2017-04-17 23:22:21 UTC (rev 215441)
@@ -49,7 +49,7 @@
 /*! @abstract Fetches all stored cookies.
  @param completionHandler A block to invoke with the fetched cookies.
  */
-- (void)allCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
+- (void)getAllCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
 
 /*! @abstract Set a cookie.
  @param cookie The cookie to set.

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm (215440 => 215441)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm	2017-04-17 23:22:21 UTC (rev 215441)
@@ -76,7 +76,7 @@
     [super dealloc];
 }
 
-- (void)allCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
+- (void)getAllCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
 {
     _cookieStore->cookies([handler = adoptNS([completionHandler copy])](const Vector<WebCore::Cookie>& cookies) {
         auto rawHandler = (void (^)(NSArray<NSHTTPCookie *> *))handler.get();

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h (215440 => 215441)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.h	2017-04-17 23:22:21 UTC (rev 215441)
@@ -31,6 +31,8 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+@class WKHTTPCookieStore;
+
 /*! A WKWebsiteDataStore represents various types of data that a website might
  make use of. This includes cookies, disk and memory caches, and persistent data such as WebSQL,
  IndexedDB databases, and local storage.
@@ -75,6 +77,9 @@
 */
 - (void)removeDataOfTypes:(NSSet<NSString *> *)websiteDataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)(void))completionHandler;
 
+/*! @abstract Returns the cookie store representing HTTP cookies in this website data store. */
+@property (nonatomic, readonly) WKHTTPCookieStore *httpCookieStore WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (215440 => 215441)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2017-04-17 23:22:21 UTC (rev 215441)
@@ -195,7 +195,7 @@
     _websiteDataStore->websiteDataStore().setResourceLoadStatisticsEnabled(enabled);
 }
 
-- (WKHTTPCookieStore *)_httpCookieStore
+- (WKHTTPCookieStore *)httpCookieStore
 {
     return WebKit::wrapper(_websiteDataStore->httpCookieStore());
 }

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (215440 => 215441)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2017-04-17 23:22:21 UTC (rev 215441)
@@ -29,7 +29,6 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@class WKHTTPCookieStore;
 @class _WKWebsiteDataStoreConfiguration;
 
 typedef NS_OPTIONS(NSUInteger, _WKWebsiteDataStoreFetchOptions) {
@@ -44,9 +43,6 @@
 
 @property (nonatomic, setter=_setResourceLoadStatisticsEnabled:) BOOL _resourceLoadStatisticsEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0));
 
-/*! @abstract Returns the cookie store representing HTTP cookies in this website data store. */
-@property (nonatomic, readonly) WKHTTPCookieStore *_httpCookieStore WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
-
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (215440 => 215441)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2017-04-17 23:22:21 UTC (rev 215441)
@@ -1064,7 +1064,7 @@
 		51D1243A1E6E0AAB002B2820 /* APIURLSchemeHandlerTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D124381E6DFDB9002B2820 /* APIURLSchemeHandlerTask.cpp */; };
 		51D124911E74BF3C002B2820 /* APIHTTPCookieStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D124821E734AC8002B2820 /* APIHTTPCookieStore.cpp */; };
 		51D124921E74BF48002B2820 /* WKHTTPCookieStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D124851E734AE3002B2820 /* WKHTTPCookieStore.mm */; };
-		51D124991E763C01002B2820 /* WKHTTPCookieStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D124841E734AE3002B2820 /* WKHTTPCookieStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		51D124991E763C01002B2820 /* WKHTTPCookieStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D124841E734AE3002B2820 /* WKHTTPCookieStore.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		51D130531382EAC000351EDD /* SecItemRequestData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */; };
 		51D130541382EAC000351EDD /* SecItemRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D130501382EAC000351EDD /* SecItemRequestData.h */; };
 		51D130551382EAC000351EDD /* SecItemResponseData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D130511382EAC000351EDD /* SecItemResponseData.cpp */; };

Modified: trunk/Tools/ChangeLog (215440 => 215441)


--- trunk/Tools/ChangeLog	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Tools/ChangeLog	2017-04-17 23:22:21 UTC (rev 215441)
@@ -1,3 +1,13 @@
+2017-04-17  Brady Eidson  <[email protected]>
+
+        Make WKHTTPCookieStore public.
+        <rdar://problem/31024691> and https://bugs.webkit.org/show_bug.cgi?id=170920
+
+        Reviewed by Geoffrey Garen.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
+        (TEST):
+
 2017-04-17  Youenn Fablet  <[email protected]>
 
         Disable outdated WritableStream API

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm (215440 => 215441)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm	2017-04-17 23:16:44 UTC (rev 215440)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm	2017-04-17 23:22:21 UTC (rev 215441)
@@ -56,7 +56,7 @@
     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
     [webView loadHTMLString:@"Oh hello" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
 
-    globalCookieStore = [WKWebsiteDataStore defaultDataStore]._httpCookieStore;
+    globalCookieStore = [WKWebsiteDataStore defaultDataStore].httpCookieStore;
     RetainPtr<CookieObserver> observer1 = adoptNS([[CookieObserver alloc] init]);
     RetainPtr<CookieObserver> observer2 = adoptNS([[CookieObserver alloc] init]);
     [globalCookieStore addObserver:observer1.get()];
@@ -63,7 +63,7 @@
     [globalCookieStore addObserver:observer2.get()];
 
     NSArray<NSHTTPCookie *> *cookies = nil;
-    [globalCookieStore allCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
+    [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
         *cookiesPtr = [nsCookies retain];
         gotFlag = true;
     }];
@@ -107,7 +107,7 @@
     TestWebKitAPI::Util::run(&gotFlag);
     gotFlag = false;
 
-    [globalCookieStore allCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
+    [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
         *cookiesPtr = [nsCookies retain];
         gotFlag = true;
     }];
@@ -143,7 +143,7 @@
     TestWebKitAPI::Util::run(&gotFlag);
     gotFlag = false;
 
-    [globalCookieStore allCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
+    [globalCookieStore getAllCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
         *cookiesPtr = [nsCookies retain];
         gotFlag = true;
     }];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to