OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_COMMON_CACHE_STORAGE_CACHE_STORAGE_TYPES_H_ |
| 6 #define CONTENT_COMMON_CACHE_STORAGE_CACHE_STORAGE_TYPES_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/strings/string16.h" |
| 13 #include "content/common/content_export.h" |
| 14 #include "content/common/service_worker/service_worker_types.h" |
| 15 |
| 16 // This file is to have common definitions that are to be shared by |
| 17 // browser and child process. |
| 18 |
| 19 namespace content { |
| 20 |
| 21 // Controls how requests are matched in the Cache API. |
| 22 struct CONTENT_EXPORT CacheStorageCacheQueryParams { |
| 23 CacheStorageCacheQueryParams(); |
| 24 |
| 25 bool ignore_search; |
| 26 bool ignore_method; |
| 27 bool ignore_vary; |
| 28 base::string16 cache_name; |
| 29 }; |
| 30 |
| 31 // The type of a single batch operation in the Cache API. |
| 32 enum CacheStorageCacheOperationType { |
| 33 CACHE_STORAGE_CACHE_OPERATION_TYPE_UNDEFINED, |
| 34 CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT, |
| 35 CACHE_STORAGE_CACHE_OPERATION_TYPE_DELETE, |
| 36 CACHE_STORAGE_CACHE_OPERATION_TYPE_LAST = |
| 37 CACHE_STORAGE_CACHE_OPERATION_TYPE_DELETE |
| 38 }; |
| 39 |
| 40 // A single batch operation for the Cache API. |
| 41 struct CONTENT_EXPORT CacheStorageBatchOperation { |
| 42 CacheStorageBatchOperation(); |
| 43 |
| 44 CacheStorageCacheOperationType operation_type; |
| 45 ServiceWorkerFetchRequest request; |
| 46 ServiceWorkerResponse response; |
| 47 CacheStorageCacheQueryParams match_params; |
| 48 }; |
| 49 |
| 50 } // namespace content |
| 51 |
| 52 #endif // CONTENT_COMMON_CACHE_STORAGE_CACHE_STORAGE_TYPES_H_ |
OLD | NEW |