OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static const int kInvalidServiceWorkerHandleId = -1; | 45 static const int kInvalidServiceWorkerHandleId = -1; |
46 static const int kInvalidServiceWorkerRegistrationHandleId = -1; | 46 static const int kInvalidServiceWorkerRegistrationHandleId = -1; |
47 static const int kInvalidServiceWorkerProviderId = -1; | 47 static const int kInvalidServiceWorkerProviderId = -1; |
48 static const int64 kInvalidServiceWorkerRegistrationId = -1; | 48 static const int64 kInvalidServiceWorkerRegistrationId = -1; |
49 static const int64 kInvalidServiceWorkerVersionId = -1; | 49 static const int64 kInvalidServiceWorkerVersionId = -1; |
50 static const int64 kInvalidServiceWorkerResourceId = -1; | 50 static const int64 kInvalidServiceWorkerResourceId = -1; |
51 static const int64 kInvalidServiceWorkerResponseId = -1; | 51 static const int64 kInvalidServiceWorkerResponseId = -1; |
52 static const int kInvalidEmbeddedWorkerThreadId = -1; | 52 static const int kInvalidEmbeddedWorkerThreadId = -1; |
53 static const int kInvalidServiceWorkerClientId = 0; | 53 static const int kInvalidServiceWorkerClientId = 0; |
54 | 54 |
| 55 // The HTTP cache is bypassed for Service Worker scripts if the last network |
| 56 // fetch occurred over 24 hours ago. |
| 57 static const int kServiceWorkerScriptMaxCacheAgeInHours = 24; |
| 58 |
55 // ServiceWorker provider type. | 59 // ServiceWorker provider type. |
56 enum ServiceWorkerProviderType { | 60 enum ServiceWorkerProviderType { |
57 SERVICE_WORKER_PROVIDER_UNKNOWN, | 61 SERVICE_WORKER_PROVIDER_UNKNOWN, |
58 | 62 |
59 // For ServiceWorker clients. | 63 // For ServiceWorker clients. |
60 SERVICE_WORKER_PROVIDER_FOR_WINDOW, | 64 SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
61 SERVICE_WORKER_PROVIDER_FOR_WORKER, | 65 SERVICE_WORKER_PROVIDER_FOR_WORKER, |
62 SERVICE_WORKER_PROVIDER_FOR_SHARED_WORKER, | 66 SERVICE_WORKER_PROVIDER_FOR_SHARED_WORKER, |
63 | 67 |
64 // For ServiceWorkers. | 68 // For ServiceWorkers. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 198 |
195 struct ServiceWorkerClientQueryOptions { | 199 struct ServiceWorkerClientQueryOptions { |
196 ServiceWorkerClientQueryOptions(); | 200 ServiceWorkerClientQueryOptions(); |
197 blink::WebServiceWorkerClientType client_type; | 201 blink::WebServiceWorkerClientType client_type; |
198 bool include_uncontrolled; | 202 bool include_uncontrolled; |
199 }; | 203 }; |
200 | 204 |
201 } // namespace content | 205 } // namespace content |
202 | 206 |
203 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 207 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
OLD | NEW |