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

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

Issue 2969463003: Move resource_request.h to content/public/common. (Closed)
Patch Set: Merge Created 3 years, 5 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 a3f10c418d8177e3322f1f98eade3478c753b917..73ad69ba1939d33c12580e62826049f2d10da19f 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -18,6 +18,7 @@
#include "content/public/common/referrer.h"
#include "content/public/common/request_context_frame_type.h"
#include "content/public/common/request_context_type.h"
+#include "content/public/common/service_worker_modes.h"
#include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerClientType.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponseError.h"
@@ -45,7 +46,6 @@ extern const char kFetchScriptError[];
// Constants for invalid identifiers.
static const int kInvalidServiceWorkerHandleId = -1;
static const int kInvalidServiceWorkerRegistrationHandleId = -1;
-static const int kInvalidServiceWorkerProviderId = -1;
static const int64_t kInvalidServiceWorkerRegistrationId = -1;
static const int64_t kInvalidServiceWorkerVersionId = -1;
static const int64_t kInvalidServiceWorkerResourceId = -1;
@@ -72,47 +72,6 @@ enum ServiceWorkerProviderType {
SERVICE_WORKER_PROVIDER_FOR_CONTROLLER
};
-// The enum entries below are written to histograms and thus cannot be deleted
-// or reordered.
-// New entries must be added immediately before the end.
-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_NAVIGATE,
- FETCH_REQUEST_MODE_LAST = FETCH_REQUEST_MODE_NAVIGATE
-};
-
-enum FetchCredentialsMode {
- FETCH_CREDENTIALS_MODE_OMIT,
- FETCH_CREDENTIALS_MODE_SAME_ORIGIN,
- FETCH_CREDENTIALS_MODE_INCLUDE,
- FETCH_CREDENTIALS_MODE_PASSWORD,
- FETCH_CREDENTIALS_MODE_LAST = FETCH_CREDENTIALS_MODE_PASSWORD
-};
-
-enum class FetchRedirectMode {
- FOLLOW_MODE,
- ERROR_MODE,
- MANUAL_MODE,
- LAST = MANUAL_MODE
-};
-
-// Indicates which service workers will receive fetch events for this request.
-enum class ServiceWorkerMode {
- // Relevant local and foreign service workers will get a fetch or
- // foreignfetch event for this request.
- ALL,
- // Only relevant foreign service workers will get a foreignfetch event for
- // this request.
- FOREIGN,
- // Neither local nor foreign service workers will get events for this
- // request.
- NONE,
- LAST = NONE
-};
-
// 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