Chromium Code Reviews| Index: content/browser/service_worker/service_worker_fetch_stores_manager.cc |
| diff --git a/content/browser/service_worker/service_worker_fetch_stores_manager.cc b/content/browser/service_worker/service_worker_fetch_stores_manager.cc |
| index 2fe44f21e5e25c22a386633581d80cd2f75780c1..a2b494bbeaffced256966409bbcc9cac178e3a4d 100644 |
| --- a/content/browser/service_worker/service_worker_fetch_stores_manager.cc |
| +++ b/content/browser/service_worker/service_worker_fetch_stores_manager.cc |
| @@ -113,7 +113,7 @@ void ServiceWorkerFetchStoresManager::Has( |
| void ServiceWorkerFetchStoresManager::Delete( |
| const GURL& origin, |
| const std::string& key, |
| - const ServiceWorkerFetchStores::StoreAndErrorCallback& callback) { |
| + const ServiceWorkerFetchStores::BoolAndErrorCallback& callback) { |
| DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| ServiceWorkerFetchStores* stores = |
| @@ -148,16 +148,15 @@ ServiceWorkerFetchStoresManager::ServiceWorkerFetchStoresManager( |
| ServiceWorkerFetchStores* |
| ServiceWorkerFetchStoresManager::FindOrCreateServiceWorkerFetchStores( |
| const GURL& origin) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| + |
| ServiceWorkerFetchStoresMap::const_iterator it = |
| service_worker_fetch_stores_.find(origin); |
| if (it == service_worker_fetch_stores_.end()) { |
| - ServiceWorkerFetchStores::BackendType backend = |
| - root_path_.empty() |
| - ? ServiceWorkerFetchStores::BACKEND_TYPE_MEMORY |
| - : ServiceWorkerFetchStores::BACKEND_TYPE_SIMPLE_CACHE; |
| + bool memory_only = root_path_.empty(); |
| ServiceWorkerFetchStores* fetch_stores = |
| new ServiceWorkerFetchStores(ConstructOriginPath(root_path_, origin), |
| - backend, |
| + memory_only, |
| base::MessageLoopProxy::current()); |
| // The map owns fetch_stores. |
| service_worker_fetch_stores_.insert(std::make_pair(origin, fetch_stores)); |
|
michaeln
2014/08/05 23:34:30
nothing is ever removed from this collection, is t
jkarlin
2014/08/06 18:56:00
Added a TODO to the header file.
|