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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix IPC Created 3 years, 4 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
Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
index a929ba7240f0da7f31622272edcb7a45c0b04e34..ce17df0f892560222d01c681e02d04e12e751002 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
@@ -53,7 +53,7 @@ class RegistrationCallback
Persistent<LinkLoaderClient> client_;
};
-}
+} // namespace
ServiceWorkerLinkResource* ServiceWorkerLinkResource::Create(
HTMLLinkElement* owner) {
@@ -81,6 +81,8 @@ void ServiceWorkerLinkResource::Process() {
scope_url = document.CompleteURL(scope);
scope_url.RemoveFragmentIdentifier();
+ WebServiceWorkerUpdateViaCache update_via_cache = owner_->UpdateViaCache();
+
String error_message;
ServiceWorkerContainer* container = NavigatorServiceWorker::serviceWorker(
ToScriptStateForMainWorld(owner_->GetDocument().GetFrame()),
@@ -98,7 +100,7 @@ void ServiceWorkerLinkResource::Process() {
}
container->RegisterServiceWorkerImpl(
- &document, script_url, scope_url,
+ &document, script_url, scope_url, update_via_cache,
WTF::MakeUnique<RegistrationCallback>(owner_));
}

Powered by Google App Engine
This is Rietveld 408576698