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

Unified Diff: content/common/service_worker/service_worker_types.h

Issue 2105503002: Skip foreign fetch when the skipServiceWorker flag is set on a request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments explaing why skip is set to ::Controlling for fallback requests Created 4 years, 6 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/common/service_worker/service_worker_types.h
diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h
index e1bdc4f4ad75fa4848959bf365c1c621828df3df..9f980281021c1ccfd3b29615666970e2fd494df7 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -97,6 +97,19 @@ enum class FetchRedirectMode {
LAST = MANUAL_MODE
};
+// Whether or not a request should be handled by a ServiceWorker.
kinuko 2016/06/30 09:38:21 nit... this enum seems to indicate that whether th
Marijn Kruisselbrink 2016/06/30 17:41:54 Hmm, good point. Rephrased all these comments to m
+enum class SkipServiceWorker {
+ // Request can be handled both by a controlling same-origin worker and
+ // a cross-origin foreign fetch service worker.
+ NONE,
+ // Request should not be handled by a same-origin controlling worker,
+ // but can be intercepted by a foreign fetch service worker.
+ CONTROLLING,
+ // Request should skip all possible service workers.
+ ALL,
+ LAST = ALL
+};
+
// Indicates how the service worker handled a fetch event.
enum ServiceWorkerFetchEventResult {
// Browser should fallback to native fetch.

Powered by Google App Engine
This is Rietveld 408576698