OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 net::URLRequestContext* request_context, | 111 net::URLRequestContext* request_context, |
112 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, | 112 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, |
113 base::WeakPtr<storage::BlobStorageContext> blob_context); | 113 base::WeakPtr<storage::BlobStorageContext> blob_context); |
114 | 114 |
115 // Operations in progress will complete after the cache is deleted but pending | 115 // Operations in progress will complete after the cache is deleted but pending |
116 // operations (those operations waiting for init to finish) won't. | 116 // operations (those operations waiting for init to finish) won't. |
117 virtual ~ServiceWorkerCache(); | 117 virtual ~ServiceWorkerCache(); |
118 | 118 |
119 // Put callbacks. | 119 // Put callbacks. |
120 static void PutImpl(scoped_ptr<PutContext> put_context); | 120 static void PutImpl(scoped_ptr<PutContext> put_context); |
| 121 static void PutDidDelete(scoped_ptr<PutContext> put_context, |
| 122 ErrorType delete_error); |
121 static void PutDidCreateEntry(scoped_ptr<PutContext> put_context, int rv); | 123 static void PutDidCreateEntry(scoped_ptr<PutContext> put_context, int rv); |
122 static void PutDidWriteHeaders(scoped_ptr<PutContext> put_context, | 124 static void PutDidWriteHeaders(scoped_ptr<PutContext> put_context, |
123 int expected_bytes, | 125 int expected_bytes, |
124 int rv); | 126 int rv); |
125 static void PutDidWriteBlobToCache(scoped_ptr<PutContext> put_context, | 127 static void PutDidWriteBlobToCache(scoped_ptr<PutContext> put_context, |
126 scoped_ptr<BlobReader> blob_reader, | 128 scoped_ptr<BlobReader> blob_reader, |
127 disk_cache::ScopedEntryPtr entry, | 129 disk_cache::ScopedEntryPtr entry, |
128 bool success); | 130 bool success); |
129 | 131 |
130 // Static callbacks for the Keys function. | 132 // Static callbacks for the Keys function. |
(...skipping 28 matching lines...) Expand all Loading... |
159 bool memory_only_; | 161 bool memory_only_; |
160 | 162 |
161 base::WeakPtrFactory<ServiceWorkerCache> weak_ptr_factory_; | 163 base::WeakPtrFactory<ServiceWorkerCache> weak_ptr_factory_; |
162 | 164 |
163 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCache); | 165 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCache); |
164 }; | 166 }; |
165 | 167 |
166 } // namespace content | 168 } // namespace content |
167 | 169 |
168 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ | 170 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_H_ |
OLD | NEW |