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

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

Issue 588153002: [ServiceWorker] Plumbing the request mode from the renderer to the ServiceWorker. [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 6 years, 3 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 bbaa43cc8c2698013fe5d2626efb31da211d889e..7bef8bda800b23664852a11352389d56a54752eb 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -34,6 +34,14 @@ static const int64 kInvalidServiceWorkerResourceId = -1;
static const int64 kInvalidServiceWorkerResponseId = -1;
static const int kInvalidEmbeddedWorkerThreadId = -1;
+enum FetchRequestMode {
+ FETCH_REQUEST_MODE_SAME_ORIGIN,
+ FETCH_REQUEST_MODE_NO_CORS,
+ FETCH_REQUEST_MODE_CORS,
+ FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT,
+ FETCH_REQUEST_MODE_LAST = FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT
+};
+
// Indicates how the service worker handled a fetch event.
enum ServiceWorkerFetchEventResult {
// Browser should fallback to native fetch.
@@ -62,6 +70,7 @@ struct CONTENT_EXPORT ServiceWorkerFetchRequest {
bool is_reload);
~ServiceWorkerFetchRequest();
+ FetchRequestMode mode;
GURL url;
std::string method;
ServiceWorkerHeaderMap headers;
« no previous file with comments | « content/common/service_worker/service_worker_messages.h ('k') | content/common/service_worker/service_worker_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698