service_worker_disk_cache.h revision 010d83a9304c5a91596085d917d248abff47903a
1// Copyright 2014 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#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_ 6#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_ 7 8#include "content/common/content_export.h" 9#include "webkit/browser/appcache/appcache_disk_cache.h" 10 11namespace content { 12 13// Wholesale reusage of the appcache code for response reading, 14// writing, and storage. See the corresponding class in that 15// library for doc comments and other details. 16// TODO(michaeln): If this reuse sticks, refactor/move the 17// resused classes to a more common location. 18 19class ServiceWorkerDiskCache 20 : public appcache::AppCacheDiskCache { 21}; 22 23class ServiceWorkerResponseReader 24 : public appcache::AppCacheResponseReader { 25 protected: 26 // Should only be constructed by the storage class. 27 friend class ServiceWorkerStorage; 28 ServiceWorkerResponseReader( 29 int64 response_id, 30 ServiceWorkerDiskCache* disk_cache); 31}; 32 33class ServiceWorkerResponseWriter 34 : public appcache::AppCacheResponseWriter { 35 protected: 36 // Should only be constructed by the storage class. 37 friend class ServiceWorkerStorage; 38 ServiceWorkerResponseWriter( 39 int64 response_id, 40 ServiceWorkerDiskCache* disk_cache); 41}; 42 43struct HttpResponseInfoIOBuffer 44 : public appcache::HttpResponseInfoIOBuffer { 45 protected: 46 virtual ~HttpResponseInfoIOBuffer(); 47}; 48 49} // namespace content 50 51#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_ 52