The Storage Access API prompt should show the eTLD+1s, not the full host names
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2018 22:54:34 +0000 (22:54 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2018 22:54:34 +0000 (22:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188830
<rdar://problem/43380645>

Reviewed by Brent Fulgham.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestStorageAccess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index 70539a8..e857b72 100644 (file)
@@ -1,3 +1,14 @@
+2018-08-22  John Wilander  <wilander@apple.com>
+
+        The Storage Access API prompt should show the eTLD+1s, not the full host names
+        https://bugs.webkit.org/show_bug.cgi?id=188830
+        <rdar://problem/43380645>
+
+        Reviewed by Brent Fulgham.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::requestStorageAccess):
+
 2018-08-22  Tim Horton  <timothy_horton@apple.com>
 
         De-unify WebPage
 2018-08-22  Tim Horton  <timothy_horton@apple.com>
 
         De-unify WebPage
index 786f3ef..966537b 100644 (file)
 #include <WebCore/PerformanceLoggingClient.h>
 #include <WebCore/PublicSuffix.h>
 #include <WebCore/RenderEmbeddedObject.h>
 #include <WebCore/PerformanceLoggingClient.h>
 #include <WebCore/PublicSuffix.h>
 #include <WebCore/RenderEmbeddedObject.h>
+#include <WebCore/ResourceLoadStatistics.h>
 #include <WebCore/SSLKeyGenerator.h>
 #include <WebCore/SerializedCryptoKeyWrap.h>
 #include <WebCore/SharedBuffer.h>
 #include <WebCore/SSLKeyGenerator.h>
 #include <WebCore/SerializedCryptoKeyWrap.h>
 #include <WebCore/SharedBuffer.h>
@@ -7704,7 +7705,7 @@ void WebPageProxy::requestStorageAccess(String&& subFrameHost, String&& topFrame
             return;
         case StorageAccessStatus::RequiresUserPrompt:
             ASSERT_UNUSED(promptEnabled, promptEnabled);
             return;
         case StorageAccessStatus::RequiresUserPrompt:
             ASSERT_UNUSED(promptEnabled, promptEnabled);
-            m_uiClient->requestStorageAccessConfirm(*this, m_process->webFrame(frameID), String(subFrameHost), String(topFrameHost), [this, protectedThis = makeRef(*this), subFrameHost, topFrameHost, frameID, completionHandler = WTFMove(completionHandler)] (bool userDidGrantAccess) mutable {
+            m_uiClient->requestStorageAccessConfirm(*this, m_process->webFrame(frameID), ResourceLoadStatistics::primaryDomain(subFrameHost), ResourceLoadStatistics::primaryDomain(topFrameHost), [this, protectedThis = makeRef(*this), subFrameHost, topFrameHost, frameID, completionHandler = WTFMove(completionHandler)] (bool userDidGrantAccess) mutable {
                 if (userDidGrantAccess)
                     m_websiteDataStore->grantStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, m_pageID, userDidGrantAccess, WTFMove(completionHandler));
                 else
                 if (userDidGrantAccess)
                     m_websiteDataStore->grantStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, m_pageID, userDidGrantAccess, WTFMove(completionHandler));
                 else