Chromium Code Reviews

Side by Side 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.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
6 #define CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
7
8 namespace content {
9
10 // Indicates no service worker provider.
11 static const int kInvalidServiceWorkerProviderId = -1;
12
13 // The enum entries below are written to histograms and thus cannot be deleted
14 // or reordered.
15 // New entries must be added immediately before the end.
16 enum FetchRequestMode {
17 FETCH_REQUEST_MODE_SAME_ORIGIN,
18 FETCH_REQUEST_MODE_NO_CORS,
19 FETCH_REQUEST_MODE_CORS,
20 FETCH_REQUEST_MODE_CORS_WITH_FORCED_PREFLIGHT,
21 FETCH_REQUEST_MODE_NAVIGATE,
22 FETCH_REQUEST_MODE_LAST = FETCH_REQUEST_MODE_NAVIGATE
23 };
24
25 enum FetchCredentialsMode {
26 FETCH_CREDENTIALS_MODE_OMIT,
27 FETCH_CREDENTIALS_MODE_SAME_ORIGIN,
28 FETCH_CREDENTIALS_MODE_INCLUDE,
29 FETCH_CREDENTIALS_MODE_PASSWORD,
30 FETCH_CREDENTIALS_MODE_LAST = FETCH_CREDENTIALS_MODE_PASSWORD
31 };
32
33 enum class FetchRedirectMode {
34 FOLLOW_MODE,
35 ERROR_MODE,
36 MANUAL_MODE,
37 LAST = MANUAL_MODE
38 };
39
40 // Indicates which service workers will receive fetch events for this request.
41 enum class ServiceWorkerMode {
42 // Relevant local and foreign service workers will get a fetch or
43 // foreignfetch event for this request.
44 ALL,
45 // Only relevant foreign service workers will get a foreignfetch event for
46 // this request.
47 FOREIGN,
48 // Neither local nor foreign service workers will get events for this
49 // request.
50 NONE,
51 LAST = NONE
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_PUBLIC_COMMON_SERVICE_WORKER_MODES_H_
OLDNEW
« 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