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

Unified Diff: content/public/browser/service_worker_context.h

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: content/public/browser/service_worker_context.h
diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h
index 90c3d93ad587025b5c88774716313c632e1a94e7..e64a618a7b23fcee7fc4c9421e66c9469a41314e 100644
--- a/content/public/browser/service_worker_context.h
+++ b/content/public/browser/service_worker_context.h
@@ -52,9 +52,10 @@ class ServiceWorkerContext {
static bool IsExcludedHeaderNameForFetchEvent(const std::string& header_name);
// Equivalent to calling navigator.serviceWorker.register(script_url, {scope:
- // pattern}) from a renderer, except that |pattern| is an absolute URL instead
- // of relative to some current origin. |callback| is passed true when the JS
- // promise is fulfilled or false when the JS promise is rejected.
+ // pattern, useCache: use_cache}) from a renderer, except that |pattern| is an
+ // absolute URL instead of relative to some current origin. |callback| is
+ // passed true when the JS promise is fulfilled or false when the JS promise
+ // is rejected.
//
// The registration can fail if:
// * |script_url| is on a different origin from |pattern|
@@ -67,6 +68,7 @@ class ServiceWorkerContext {
// be called on the UI thread.
virtual void RegisterServiceWorker(const Scope& pattern,
const GURL& script_url,
+ bool use_cache,
const ResultCallback& callback) = 0;
// Mechanism for embedder to increment/decrement ref count of a service

Powered by Google App Engine
This is Rietveld 408576698