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

Unified Diff: content/renderer/service_worker/webserviceworkercachestorage_impl.cc

Issue 992353003: Decouple Cache Storage messaging from Service Worker/Embedded Worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 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 | « content/renderer/service_worker/webserviceworkercachestorage_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/webserviceworkercachestorage_impl.cc
diff --git a/content/renderer/service_worker/webserviceworkercachestorage_impl.cc b/content/renderer/service_worker/webserviceworkercachestorage_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5d14b164138ce3bd69bcc793f0e586b558f21086
--- /dev/null
+++ b/content/renderer/service_worker/webserviceworkercachestorage_impl.cc
@@ -0,0 +1,63 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/renderer/service_worker/webserviceworkercachestorage_impl.h"
+
+#include "content/child/thread_safe_sender.h"
+#include "content/renderer/service_worker/service_worker_cache_storage_dispatcher.h"
+#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
+#include "third_party/WebKit/public/platform/WebServiceWorkerCache.h"
+#include "third_party/WebKit/public/platform/WebServiceWorkerRequest.h"
+#include "third_party/WebKit/public/platform/WebServiceWorkerResponse.h"
+
+using base::TimeTicks;
+
+namespace content {
+
+WebServiceWorkerCacheStorageImpl::WebServiceWorkerCacheStorageImpl(
+ ThreadSafeSender* thread_safe_sender,
+ const GURL& origin)
+ : thread_safe_sender_(thread_safe_sender), origin_(origin) {
+}
+
+WebServiceWorkerCacheStorageImpl::~WebServiceWorkerCacheStorageImpl() {
+}
+
+void WebServiceWorkerCacheStorageImpl::dispatchHas(
+ CacheStorageCallbacks* callbacks,
+ const blink::WebString& cacheName) {
+ GetDispatcher()->dispatchHas(callbacks, origin_, cacheName);
+}
+
+void WebServiceWorkerCacheStorageImpl::dispatchOpen(
+ CacheStorageWithCacheCallbacks* callbacks,
+ const blink::WebString& cacheName) {
+ GetDispatcher()->dispatchOpen(callbacks, origin_, cacheName);
+}
+
+void WebServiceWorkerCacheStorageImpl::dispatchDelete(
+ CacheStorageCallbacks* callbacks,
+ const blink::WebString& cacheName) {
+ GetDispatcher()->dispatchDelete(callbacks, origin_, cacheName);
+}
+
+void WebServiceWorkerCacheStorageImpl::dispatchKeys(
+ CacheStorageKeysCallbacks* callbacks) {
+ GetDispatcher()->dispatchKeys(callbacks, origin_);
+}
+
+void WebServiceWorkerCacheStorageImpl::dispatchMatch(
+ CacheStorageMatchCallbacks* callbacks,
+ const blink::WebServiceWorkerRequest& request,
+ const blink::WebServiceWorkerCache::QueryParams& query_params) {
+ GetDispatcher()->dispatchMatch(callbacks, origin_, request, query_params);
+}
+
+ServiceWorkerCacheStorageDispatcher*
+WebServiceWorkerCacheStorageImpl::GetDispatcher() const {
+ return ServiceWorkerCacheStorageDispatcher::ThreadSpecificInstance(
+ thread_safe_sender_.get());
+}
+
+} // namespace content
« no previous file with comments | « content/renderer/service_worker/webserviceworkercachestorage_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698