WebKit Bugzilla
Attachment 340146 Details for
Bug 185534
: Storage Access API: Extend lifetime of cookies on successful user approval
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185534-20180510163848.patch (text/plain), 4.36 KB, created by
John Wilander
on 2018-05-10 16:38:49 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
John Wilander
Created:
2018-05-10 16:38:49 PDT
Size:
4.36 KB
patch
obsolete
>Subversion Revision: 231659 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 73ea77bcf106b446328624db550349b2aceafc04..cc16993035479e278d76f336d74bdef10351d667 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-10 John Wilander <wilander@apple.com> >+ >+ Storage Access API: Extend lifetime of cookies on successful user approval >+ https://bugs.webkit.org/show_bug.cgi?id=185534 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm: >+ (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded): >+ Picks up the experimental feature flag. >+ * UIProcess/WebResourceLoadStatisticsStore.cpp: >+ (WebKit::WebResourceLoadStatisticsStore::grantStorageAccessInternal): >+ Now updates the domain's user interaction timestamp if the user was >+ prompted for this access. >+ * UIProcess/WebResourceLoadStatisticsStore.h: >+ > 2018-05-10 Chris Dumez <cdumez@apple.com> > > 'Cross-Origin-Options header implementation follow-up >diff --git a/Source/WebKit/UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm >index 5075fc853a2fc3c6ea2a34fe6544ea86ceeccc91..fe312c775487955680353cc3ba6cf807b50ea618 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm >@@ -51,6 +51,7 @@ void WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded() > > setDebugLogggingEnabled([[NSUserDefaults standardUserDefaults] boolForKey:@"ResourceLoadStatisticsDebugLoggingEnabled"]); > setResourceLoadStatisticsDebugMode([[NSUserDefaults standardUserDefaults] boolForKey:@"ExperimentalResourceLoadStatisticsDebugMode"]); >+ setStorageAccessPromptsEnabled([[NSUserDefaults standardUserDefaults] boolForKey:@"ExperimentalStorageAccessPromptsEnabled"]); > }); > } > >diff --git a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >index 2479bcfd9e7bda12eee247a271c8a5bb20bf94bc..702ebbe1ce5f412f0db183e5c0a9c9144f4dd167 100644 >--- a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >@@ -456,7 +456,6 @@ void WebResourceLoadStatisticsStore::grantStorageAccess(String&& subFrameHost, S > > void WebResourceLoadStatisticsStore::grantStorageAccessInternal(String&& subFramePrimaryDomain, String&& topFramePrimaryDomain, std::optional<uint64_t> frameID, uint64_t pageID, bool userWasPromptedNowOrEarlier, CompletionHandler<void(bool)>&& callback) > { >- UNUSED_PARAM(userWasPromptedNowOrEarlier); > ASSERT(!RunLoop::isMain()); > > if (subFramePrimaryDomain == topFramePrimaryDomain) { >@@ -464,6 +463,13 @@ void WebResourceLoadStatisticsStore::grantStorageAccessInternal(String&& subFram > return; > } > >+ if (userWasPromptedNowOrEarlier && m_storageAccessPromptsEnabled) { >+ auto& subFrameStatistic = ensureResourceStatisticsForPrimaryDomain(subFramePrimaryDomain); >+ ASSERT(subFrameStatistic.hadUserInteraction); >+ ASSERT(subFrameStatistic.storageAccessUnderTopFrameOrigins.contains(topFramePrimaryDomain)); >+ subFrameStatistic.mostRecentUserInteractionTime = WallTime::now(); >+ } >+ > m_grantStorageAccessHandler(subFramePrimaryDomain, topFramePrimaryDomain, frameID, pageID, WTFMove(callback)); > } > >diff --git a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h >index e8ad1df7acd409f5fe38719cdc73f28ba712f05e..468d594868996716579bc75fd32a5aeae77f8520 100644 >--- a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h >+++ b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h >@@ -191,6 +191,7 @@ private: > void removeAllStorageAccess(); > > void setDebugLogggingEnabled(bool enabled) { m_debugLoggingEnabled = enabled; } >+ void setStorageAccessPromptsEnabled(bool enabled) { m_storageAccessPromptsEnabled = enabled; } > > #if PLATFORM(COCOA) > void registerUserDefaultsIfNeeded(); >@@ -239,6 +240,7 @@ private: > > bool m_debugModeEnabled { false }; > bool m_debugLoggingEnabled { false }; >+ bool m_storageAccessPromptsEnabled { false }; > > Function<void (const String&)> m_statisticsTestingCallback; > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185534
:
340146
|
340154