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

Unified Diff: third_party/WebKit/public/platform/WebURLRequest.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: third_party/WebKit/public/platform/WebURLRequest.h
diff --git a/third_party/WebKit/public/platform/WebURLRequest.h b/third_party/WebKit/public/platform/WebURLRequest.h
index 09b58183fd9e0717ee776f2f549b0cd958e33800..643957d31691bc7fc484482c66b33735fc7794c9 100644
--- a/third_party/WebKit/public/platform/WebURLRequest.h
+++ b/third_party/WebKit/public/platform/WebURLRequest.h
@@ -141,6 +141,18 @@ public:
LoFiOn, // Request a Lo-Fi version of the resource.
};
+ // Whether or not a request should be handled by a ServiceWorker.
kinuko 2016/06/30 09:38:22 ditto. Also-- started to wonder if we could have
Marijn Kruisselbrink 2016/06/30 17:41:54 We could... we'd need to move the enums we'd want
+ 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
+ };
+
class ExtraData {
public:
virtual ~ExtraData() { }
@@ -255,8 +267,8 @@ public:
BLINK_PLATFORM_EXPORT void setUseStreamOnResponse(bool);
// True if the request should not be handled by the ServiceWorker.
- BLINK_PLATFORM_EXPORT bool skipServiceWorker() const;
- BLINK_PLATFORM_EXPORT void setSkipServiceWorker(bool);
+ BLINK_PLATFORM_EXPORT SkipServiceWorker skipServiceWorker() const;
+ BLINK_PLATFORM_EXPORT void setSkipServiceWorker(SkipServiceWorker);
// True if corresponding AppCache group should be resetted.
BLINK_PLATFORM_EXPORT bool shouldResetAppCache() const;

Powered by Google App Engine
This is Rietveld 408576698