Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_disk_cache.h
blob7fa51eed6348d5850143d9342d02e942a6d0e06d
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.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_H_
8 #include "content/browser/appcache/appcache_disk_cache.h"
9 #include "content/common/content_export.h"
11 namespace content {
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.
19 class CONTENT_EXPORT ServiceWorkerDiskCache
20 : public AppCacheDiskCache {
23 class CONTENT_EXPORT ServiceWorkerResponseReader
24 : public 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);
33 class CONTENT_EXPORT ServiceWorkerResponseWriter
34 : public 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);
43 } // namespace content
45 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_H_