| 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 #include "content/renderer/service_worker/webserviceworkercachestorage_impl.h" | |
| 6 | |
| 7 #include "content/child/thread_safe_sender.h" | |
| 8 #include "content/renderer/service_worker/service_worker_cache_storage_dispatche
r.h" | |
| 9 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" | |
| 10 #include "third_party/WebKit/public/platform/WebServiceWorkerCache.h" | |
| 11 #include "third_party/WebKit/public/platform/WebServiceWorkerRequest.h" | |
| 12 #include "third_party/WebKit/public/platform/WebServiceWorkerResponse.h" | |
| 13 | |
| 14 using base::TimeTicks; | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 WebServiceWorkerCacheStorageImpl::WebServiceWorkerCacheStorageImpl( | |
| 19 ThreadSafeSender* thread_safe_sender, | |
| 20 const GURL& origin) | |
| 21 : thread_safe_sender_(thread_safe_sender), origin_(origin) { | |
| 22 } | |
| 23 | |
| 24 WebServiceWorkerCacheStorageImpl::~WebServiceWorkerCacheStorageImpl() { | |
| 25 } | |
| 26 | |
| 27 void WebServiceWorkerCacheStorageImpl::dispatchHas( | |
| 28 CacheStorageCallbacks* callbacks, | |
| 29 const blink::WebString& cacheName) { | |
| 30 GetDispatcher()->dispatchHas(callbacks, origin_, cacheName); | |
| 31 } | |
| 32 | |
| 33 void WebServiceWorkerCacheStorageImpl::dispatchOpen( | |
| 34 CacheStorageWithCacheCallbacks* callbacks, | |
| 35 const blink::WebString& cacheName) { | |
| 36 GetDispatcher()->dispatchOpen(callbacks, origin_, cacheName); | |
| 37 } | |
| 38 | |
| 39 void WebServiceWorkerCacheStorageImpl::dispatchDelete( | |
| 40 CacheStorageCallbacks* callbacks, | |
| 41 const blink::WebString& cacheName) { | |
| 42 GetDispatcher()->dispatchDelete(callbacks, origin_, cacheName); | |
| 43 } | |
| 44 | |
| 45 void WebServiceWorkerCacheStorageImpl::dispatchKeys( | |
| 46 CacheStorageKeysCallbacks* callbacks) { | |
| 47 GetDispatcher()->dispatchKeys(callbacks, origin_); | |
| 48 } | |
| 49 | |
| 50 void WebServiceWorkerCacheStorageImpl::dispatchMatch( | |
| 51 CacheStorageMatchCallbacks* callbacks, | |
| 52 const blink::WebServiceWorkerRequest& request, | |
| 53 const blink::WebServiceWorkerCache::QueryParams& query_params) { | |
| 54 GetDispatcher()->dispatchMatch(callbacks, origin_, request, query_params); | |
| 55 } | |
| 56 | |
| 57 ServiceWorkerCacheStorageDispatcher* | |
| 58 WebServiceWorkerCacheStorageImpl::GetDispatcher() const { | |
| 59 return ServiceWorkerCacheStorageDispatcher::ThreadSpecificInstance( | |
| 60 thread_safe_sender_.get()); | |
| 61 } | |
| 62 | |
| 63 } // namespace content | |
| OLD | NEW |