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

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

Issue 474593002: content::WebServiceWorkerCache implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on new header type Created 6 years, 3 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 69e2995ca605246a281a49edc26b8cd39f40cb54..bbaa43cc8c2698013fe5d2626efb31da211d889e 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -88,6 +88,35 @@ struct CONTENT_EXPORT ServiceWorkerResponse {
std::string blob_uuid;
};
+// Controls how requests are matched in the Cache API.
+struct CONTENT_EXPORT ServiceWorkerCacheQueryParams {
+ ServiceWorkerCacheQueryParams();
+
+ bool ignore_search;
+ bool ignore_method;
+ bool ignore_vary;
+ bool prefix_match;
+};
+
+// The type of a single batch operation in the Cache API.
+enum ServiceWorkerCacheOperationType {
+ SERVICE_WORKER_CACHE_OPERATION_TYPE_UNDEFINED,
+ SERVICE_WORKER_CACHE_OPERATION_TYPE_PUT,
+ SERVICE_WORKER_CACHE_OPERATION_TYPE_DELETE,
+ SERVICE_WORKER_CACHE_OPERATION_TYPE_LAST =
+ SERVICE_WORKER_CACHE_OPERATION_TYPE_DELETE
+};
+
+// A single batch operation for the Cache API.
+struct CONTENT_EXPORT ServiceWorkerBatchOperation {
+ ServiceWorkerBatchOperation();
+
+ ServiceWorkerCacheOperationType operation_type;
+ ServiceWorkerFetchRequest request;
+ ServiceWorkerResponse response;
+ ServiceWorkerCacheQueryParams match_params;
+};
+
// Represents initialization info for a WebServiceWorker object.
struct CONTENT_EXPORT ServiceWorkerObjectInfo {
ServiceWorkerObjectInfo();

Powered by Google App Engine
This is Rietveld 408576698