| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/cachestorage/CacheStorage.h" | 6 #include "modules/cachestorage/CacheStorage.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 const ScriptPromise promise = resolver->promise(); | 262 const ScriptPromise promise = resolver->promise(); |
| 263 | 263 |
| 264 if (m_webCacheStorage) | 264 if (m_webCacheStorage) |
| 265 m_webCacheStorage->dispatchMatch(new MatchCallbacks(resolver), webReques
t, Cache::toWebQueryParams(options)); | 265 m_webCacheStorage->dispatchMatch(new MatchCallbacks(resolver), webReques
t, Cache::toWebQueryParams(options)); |
| 266 else | 266 else |
| 267 resolver->reject(createNoImplementationException()); | 267 resolver->reject(createNoImplementationException()); |
| 268 | 268 |
| 269 return promise; | 269 return promise; |
| 270 } | 270 } |
| 271 | 271 |
| 272 DEFINE_TRACE(CacheStorage) | |
| 273 { | |
| 274 visitor->trace(m_nameToCacheMap); | |
| 275 } | |
| 276 | |
| 277 CacheStorage::CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnP
tr<WebServiceWorkerCacheStorage> webCacheStorage) | 272 CacheStorage::CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnP
tr<WebServiceWorkerCacheStorage> webCacheStorage) |
| 278 : m_scopedFetcher(fetcher) | 273 : m_scopedFetcher(fetcher) |
| 279 , m_webCacheStorage(webCacheStorage) | 274 , m_webCacheStorage(webCacheStorage) |
| 280 { | 275 { |
| 281 } | 276 } |
| 282 | 277 |
| 278 CacheStorage::~CacheStorage() |
| 279 { |
| 280 } |
| 281 |
| 282 void CacheStorage::dispose() |
| 283 { |
| 284 m_webCacheStorage.clear(); |
| 285 } |
| 286 |
| 287 DEFINE_TRACE(CacheStorage) |
| 288 { |
| 289 visitor->trace(m_nameToCacheMap); |
| 290 } |
| 291 |
| 283 } // namespace blink | 292 } // namespace blink |
| OLD | NEW |