webbookmarksd needs to use the same AppCache directory as MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=159912
Source/WebCore:


Reviewed by Alexey Proskuryakov.

No new tests.  This only changes behavior for webbookmarksd.

* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isWebBookmarksD): Added.

Source/WebKit2:

<rdar://problem/27056844>

Reviewed by Alexey Proskuryakov.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
Make webbookmarksd match MobileSafari by adding a matching runtime exception.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@203392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 7e36f8b..2742a6c 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2016-07-18  Alex Christensen  <achristensen@webkit.org>
+
+        webbookmarksd needs to use the same AppCache directory as MobileSafari
+        https://bugs.webkit.org/show_bug.cgi?id=159912
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests.  This only changes behavior for webbookmarksd.
+
+        * platform/RuntimeApplicationChecks.h:
+        * platform/RuntimeApplicationChecks.mm:
+        (WebCore::IOSApplication::isWebBookmarksD): Added.
+
 2016-07-18  Chris Dumez  <cdumez@apple.com>
 
         EventTarget.dispatchEvent() parameter should not be nullable
diff --git a/Source/WebCore/platform/RuntimeApplicationChecks.h b/Source/WebCore/platform/RuntimeApplicationChecks.h
index 56b1901..3485431 100644
--- a/Source/WebCore/platform/RuntimeApplicationChecks.h
+++ b/Source/WebCore/platform/RuntimeApplicationChecks.h
@@ -62,6 +62,7 @@
 
 WEBCORE_EXPORT bool isMobileMail();
 WEBCORE_EXPORT bool isMobileSafari();
+WEBCORE_EXPORT bool isWebBookmarksD();
 bool isDumpRenderTree();
 bool isMobileStore();
 WEBCORE_EXPORT bool isWebApp();
diff --git a/Source/WebCore/platform/RuntimeApplicationChecks.mm b/Source/WebCore/platform/RuntimeApplicationChecks.mm
index dcacb8c..aa17b66 100644
--- a/Source/WebCore/platform/RuntimeApplicationChecks.mm
+++ b/Source/WebCore/platform/RuntimeApplicationChecks.mm
@@ -170,6 +170,12 @@
     return isMobileSafari;
 }
 
+bool IOSApplication::isWebBookmarksD()
+{
+    static bool isWebBookmarksD = applicationBundleIsEqualTo("com.apple.webbookmarksd");
+    return isWebBookmarksD;
+}
+
 bool IOSApplication::isDumpRenderTree()
 {
     // We use a prefix match instead of strict equality since LayoutTestRelay may launch multiple instances of