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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
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_cache_storage_manager.h" 5 #include "content/browser/service_worker/service_worker_cache_storage_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 DCHECK_CURRENTLY_ON(BrowserThread::IO); 120 DCHECK_CURRENTLY_ON(BrowserThread::IO);
121 121
122 ServiceWorkerCacheStorage* cache_storage = 122 ServiceWorkerCacheStorage* cache_storage =
123 FindOrCreateServiceWorkerCacheManager(origin); 123 FindOrCreateServiceWorkerCacheManager(origin);
124 124
125 cache_storage->EnumerateCaches(callback); 125 cache_storage->EnumerateCaches(callback);
126 } 126 }
127 127
128 void ServiceWorkerCacheStorageManager::SetBlobParametersForCache( 128 void ServiceWorkerCacheStorageManager::SetBlobParametersForCache(
129 net::URLRequestContext* request_context, 129 net::URLRequestContext* request_context,
130 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context) { 130 base::WeakPtr<storage::BlobStorageContext> blob_storage_context) {
131 DCHECK_CURRENTLY_ON(BrowserThread::IO); 131 DCHECK_CURRENTLY_ON(BrowserThread::IO);
132 DCHECK(cache_storage_map_.empty()); 132 DCHECK(cache_storage_map_.empty());
133 DCHECK(!request_context_ || request_context_ == request_context); 133 DCHECK(!request_context_ || request_context_ == request_context);
134 DCHECK(!blob_context_ || blob_context_.get() == blob_storage_context.get()); 134 DCHECK(!blob_context_ || blob_context_.get() == blob_storage_context.get());
135 request_context_ = request_context; 135 request_context_ = request_context;
136 blob_context_ = blob_storage_context; 136 blob_context_ = blob_storage_context;
137 } 137 }
138 138
139 ServiceWorkerCacheStorageManager::ServiceWorkerCacheStorageManager( 139 ServiceWorkerCacheStorageManager::ServiceWorkerCacheStorageManager(
140 const base::FilePath& path, 140 const base::FilePath& path,
(...skipping 20 matching lines...) Expand all
161 request_context_, 161 request_context_,
162 blob_context_); 162 blob_context_);
163 // The map owns fetch_stores. 163 // The map owns fetch_stores.
164 cache_storage_map_.insert(std::make_pair(origin, cache_storage)); 164 cache_storage_map_.insert(std::make_pair(origin, cache_storage));
165 return cache_storage; 165 return cache_storage;
166 } 166 }
167 return it->second; 167 return it->second;
168 } 168 }
169 169
170 } // namespace content 170 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698