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

Unified Diff: content/browser/service_worker/service_worker_cache_listener.cc

Issue 474593002: content::WebServiceWorkerCache implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only 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/browser/service_worker/service_worker_cache_listener.cc
diff --git a/content/browser/service_worker/service_worker_cache_listener.cc b/content/browser/service_worker/service_worker_cache_listener.cc
index 38aca0c093d9bbbe05e8ab05d0364111812b7572..bfd4682e5c13907e369b752ed6dd5fa58c37e5f5 100644
--- a/content/browser/service_worker/service_worker_cache_listener.cc
+++ b/content/browser/service_worker/service_worker_cache_listener.cc
@@ -72,6 +72,16 @@ bool ServiceWorkerCacheListener::OnMessageReceived(
OnCacheStorageDelete)
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheStorageKeys,
OnCacheStorageKeys)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheMatch,
+ OnCacheMatch)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheMatchAll,
+ OnCacheMatchAll)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheKeys,
+ OnCacheKeys)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheBatch,
+ OnCacheBatch)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_CacheClosed,
+ OnCacheClosed)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -130,6 +140,49 @@ void ServiceWorkerCacheListener::OnCacheStorageKeys(int request_id) {
request_id));
}
+void ServiceWorkerCacheListener::OnCacheMatch(
+ int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params) {
+ // TODO(gavinp,jkarlin): Implement this method.
+ Send(ServiceWorkerMsg_CacheMatchError(
+ request_id, blink::WebServiceWorkerCacheErrorNotImplemented));
+}
+
+void ServiceWorkerCacheListener::OnCacheMatchAll(
+ int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params) {
+ // TODO(gavinp,jkarlin): Implement this method.
+ Send(ServiceWorkerMsg_CacheMatchAllError(
+ request_id, blink::WebServiceWorkerCacheErrorNotImplemented));
+}
+
+void ServiceWorkerCacheListener::OnCacheKeys(
+ int request_id,
+ int cache_id,
+ const ServiceWorkerFetchRequest& request,
+ const ServiceWorkerCacheQueryParams& match_params) {
+ // TODO(gavinp,jkarlin): Implement this method.
+ Send(ServiceWorkerMsg_CacheKeysError(
+ request_id, blink::WebServiceWorkerCacheErrorNotImplemented));
+}
+
+void ServiceWorkerCacheListener::OnCacheBatch(
+ int request_id,
+ int cache_id,
+ const std::vector<ServiceWorkerBatchOperation>& operations) {
+ // TODO(gavinp,jkarlin): Implement this method.
+ Send(ServiceWorkerMsg_CacheBatchError(
+ request_id, blink::WebServiceWorkerCacheErrorNotImplemented));
+}
+
+void ServiceWorkerCacheListener::OnCacheClosed(int cache_id) {
+ // TODO(gavinp,jkarlin): Implement this method.
+}
+
void ServiceWorkerCacheListener::Send(const IPC::Message& message) {
version_->embedded_worker()->SendMessage(message);
}
@@ -206,4 +259,4 @@ void ServiceWorkerCacheListener::OnCacheStorageKeysCallback(
Send(ServiceWorkerMsg_CacheStorageKeysSuccess(request_id, string16s));
}
-} // namespace content
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698