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

Unified Diff: content/public/common/service_worker_modes.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/public/common/service_worker_modes.h
diff --git a/content/public/common/service_worker_modes.h b/content/public/common/service_worker_modes.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ab023f2e03811711f569b60ba6f1cfdfd2a1ef1
--- /dev/null
+++ b/content/public/common/service_worker_modes.h
@@ -0,0 +1,56 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
+#define CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
+
+namespace content {
+
+// Indicates no service worker provider.
+static const int kInvalidServiceWorkerProviderId = -1;
+
+// 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
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
« no previous file with comments | « content/public/common/resource_request.cc ('k') | content/renderer/scheduler/resource_dispatch_throttler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698