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

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 tests Created 3 years, 9 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 bef1adc9711079d21cd39858a993765f97c7ca74..2174e9cb9dc6f4eb7ff2e238e46495005d934013 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
@@ -80,6 +80,8 @@ void ServiceWorkerLinkResource::process() {
scopeURL = document.completeURL(scope);
scopeURL.removeFragmentIdentifier();
+ bool useCache = m_owner->useCache();
+
String errorMessage;
ServiceWorkerContainer* container = NavigatorServiceWorker::serviceWorker(
ScriptState::forMainWorld(m_owner->document().frame()),
@@ -96,7 +98,7 @@ void ServiceWorkerLinkResource::process() {
}
container->registerServiceWorkerImpl(
- &document, scriptURL, scopeURL,
+ &document, scriptURL, scopeURL, useCache,
WTF::makeUnique<RegistrationCallback>(m_owner));
}

Powered by Google App Engine
This is Rietveld 408576698