Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2376403004: Store Origin-Trial tokens to ServiceWorkerDataBase (Closed)
Patch Set: incorporated iclelland's comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/origin_trials/trial_token_validator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index c522068d322638466cb955d30e1da14207199146..c28fcbe3e055dabba994a1fb3bb3e940044ecd19 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -188,9 +188,10 @@ void ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent(
const WebServiceWorkerRequest& webRequest) {
if (!OriginTrials::foreignFetchEnabled(workerGlobalScope())) {
// If origin trial tokens have expired, or are otherwise no longer valid
- // no events should be dispatched.
- // TODO(mek): Ideally the browser wouldn't even start the service worker
- // if its tokens have expired.
+ // no events should be dispatched. We can check it in the browser process if
+ // the service worker is installed after M56. But if the service worker was
+ // installed in old version of Chrome (< M56) we have to check it in the
+ // renderer process (here).
ServiceWorkerGlobalScopeClient::from(workerGlobalScope())
->respondToFetchEvent(responseID, WTF::currentTime());
ServiceWorkerGlobalScopeClient::from(workerGlobalScope())
« no previous file with comments | « content/common/origin_trials/trial_token_validator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698