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

Unified Diff: public/platform/WebServiceWorkerCache.h

Issue 1262943002: Move ServiceWorker public headers to public/{web,platform}/modules/serviceworker (1/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 2 Created 5 years, 4 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
« no previous file with comments | « public/platform/WebServiceWorker.h ('k') | public/platform/WebServiceWorkerCacheError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebServiceWorkerCache.h
diff --git a/public/platform/WebServiceWorkerCache.h b/public/platform/WebServiceWorkerCache.h
index d8044b065da0aa10a79f5955a45004650fbc1bac..b1fed2cad120e5f088ea962ab2e9508b89f694c1 100644
--- a/public/platform/WebServiceWorkerCache.h
+++ b/public/platform/WebServiceWorkerCache.h
@@ -2,67 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WebServiceWorkerCache_h
-#define WebServiceWorkerCache_h
-
-#include "public/platform/WebCallbacks.h"
-#include "public/platform/WebCommon.h"
-#include "public/platform/WebServiceWorkerCacheError.h"
-#include "public/platform/WebServiceWorkerRequest.h"
-#include "public/platform/WebServiceWorkerResponse.h"
-#include "public/platform/WebString.h"
-#include "public/platform/WebVector.h"
-
-namespace blink {
-
-// The Service Worker Cache API. The embedder provides the implementation of the Cache to Blink. Blink uses the interface
-// to operate on entries.
-// This object is owned by Blink, and should be destroyed as each Cache instance is no longer in use.
-class WebServiceWorkerCache {
-public:
- using CacheMatchCallbacks = WebCallbacks<WebServiceWorkerResponse*, WebServiceWorkerCacheError*>;
- using CacheWithResponsesCallbacks = WebCallbacks<WebVector<WebServiceWorkerResponse>*, WebServiceWorkerCacheError*>;
- using CacheWithRequestsCallbacks = WebCallbacks<WebVector<WebServiceWorkerRequest>*, WebServiceWorkerCacheError*>;
- using CacheBatchCallbacks = WebCallbacks<void, WebServiceWorkerCacheError>;
-
- virtual ~WebServiceWorkerCache() { }
-
- // Options that affect the scope of searches.
- struct QueryParams {
- QueryParams() : ignoreSearch(false), ignoreMethod(false), ignoreVary(false) { }
-
- bool ignoreSearch;
- bool ignoreMethod;
- bool ignoreVary;
- WebString cacheName;
- };
-
- enum OperationType {
- OperationTypeUndefined,
- OperationTypePut,
- OperationTypeDelete,
- OperationTypeLast = OperationTypeDelete
- };
-
- struct BatchOperation {
- BatchOperation() : operationType(OperationTypeUndefined) { }
-
- OperationType operationType;
- WebServiceWorkerRequest request;
- WebServiceWorkerResponse response;
- QueryParams matchParams;
- };
-
- WebServiceWorkerCache() { }
-
- // Ownership of the Cache*Callbacks methods passes to the WebServiceWorkerCache instance, which will delete it after
- // calling onSuccess or onFailure.
- virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerRequest&, const QueryParams&) = 0;
- virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebServiceWorkerRequest&, const QueryParams&) = 0;
- virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorkerRequest*, const QueryParams&) = 0;
- virtual void dispatchBatch(CacheBatchCallbacks*, const WebVector<BatchOperation>&) = 0;
-};
-
-} // namespace blink
-
-#endif // WebServiceWorkerCache_h
+#include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
« no previous file with comments | « public/platform/WebServiceWorker.h ('k') | public/platform/WebServiceWorkerCacheError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698