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

Side by Side Diff: content/browser/service_worker/service_worker_disk_cache.cc

Issue 1155063002: ServiceWorker: Introduce ServiceWorkerDiskCacheMigrator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add DCHECKs Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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 #include "content/browser/service_worker/service_worker_disk_cache.h" 5 #include "content/browser/service_worker/service_worker_disk_cache.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 scoped_ptr<ServiceWorkerDiskCache>
10 ServiceWorkerDiskCache::CreateWithBlockFileBackend() {
11 return make_scoped_ptr(
12 new ServiceWorkerDiskCache(false /* use_simple_cache*/));
13 }
14
15 scoped_ptr<ServiceWorkerDiskCache>
16 ServiceWorkerDiskCache::CreateWithSimpleBackend() {
17 return make_scoped_ptr(
18 new ServiceWorkerDiskCache(true /* use_simple_cache */));
19 }
20
21 ServiceWorkerDiskCache::ServiceWorkerDiskCache(bool use_simple_cache)
22 : AppCacheDiskCache(use_simple_cache) {
23 }
24
9 ServiceWorkerResponseReader::ServiceWorkerResponseReader( 25 ServiceWorkerResponseReader::ServiceWorkerResponseReader(
10 int64 response_id, ServiceWorkerDiskCache* disk_cache) 26 int64 response_id, ServiceWorkerDiskCache* disk_cache)
11 : AppCacheResponseReader(response_id, 0, disk_cache) { 27 : AppCacheResponseReader(response_id, 0, disk_cache) {
12 } 28 }
13 29
14 ServiceWorkerResponseWriter::ServiceWorkerResponseWriter( 30 ServiceWorkerResponseWriter::ServiceWorkerResponseWriter(
15 int64 response_id, ServiceWorkerDiskCache* disk_cache) 31 int64 response_id, ServiceWorkerDiskCache* disk_cache)
16 : AppCacheResponseWriter(response_id, 0, disk_cache) { 32 : AppCacheResponseWriter(response_id, 0, disk_cache) {
17 } 33 }
18 34
19 ServiceWorkerResponseMetadataWriter::ServiceWorkerResponseMetadataWriter( 35 ServiceWorkerResponseMetadataWriter::ServiceWorkerResponseMetadataWriter(
20 int64 response_id, 36 int64 response_id,
21 ServiceWorkerDiskCache* disk_cache) 37 ServiceWorkerDiskCache* disk_cache)
22 : AppCacheResponseMetadataWriter(response_id, 0, disk_cache) { 38 : AppCacheResponseMetadataWriter(response_id, 0, disk_cache) {
23 } 39 }
24 40
25 } // namespace content 41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698