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/serviceworkers/Cache.h" | 6 #include "modules/serviceworkers/Cache.h" |
7 | 7 |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return keysImpl(scriptState, newRequest, options); | 275 return keysImpl(scriptState, newRequest, options); |
276 } | 276 } |
277 | 277 |
278 // static | 278 // static |
279 WebServiceWorkerCache::QueryParams Cache::toWebQueryParams(const CacheQueryOptio
ns& options) | 279 WebServiceWorkerCache::QueryParams Cache::toWebQueryParams(const CacheQueryOptio
ns& options) |
280 { | 280 { |
281 WebServiceWorkerCache::QueryParams webQueryParams; | 281 WebServiceWorkerCache::QueryParams webQueryParams; |
282 webQueryParams.ignoreSearch = options.ignoreSearch(); | 282 webQueryParams.ignoreSearch = options.ignoreSearch(); |
283 webQueryParams.ignoreMethod = options.ignoreMethod(); | 283 webQueryParams.ignoreMethod = options.ignoreMethod(); |
284 webQueryParams.ignoreVary = options.ignoreVary(); | 284 webQueryParams.ignoreVary = options.ignoreVary(); |
285 webQueryParams.prefixMatch = options.prefixMatch(); | |
286 webQueryParams.cacheName = options.cacheName(); | 285 webQueryParams.cacheName = options.cacheName(); |
287 return webQueryParams; | 286 return webQueryParams; |
288 } | 287 } |
289 | 288 |
290 Cache::Cache(WebServiceWorkerCache* webCache) | 289 Cache::Cache(WebServiceWorkerCache* webCache) |
291 : m_webCache(adoptPtr(webCache)) { } | 290 : m_webCache(adoptPtr(webCache)) { } |
292 | 291 |
293 ScriptPromise Cache::matchImpl(ScriptState* scriptState, const Request* request,
const CacheQueryOptions& options) | 292 ScriptPromise Cache::matchImpl(ScriptState* scriptState, const Request* request,
const CacheQueryOptions& options) |
294 { | 293 { |
295 WebServiceWorkerRequest webRequest; | 294 WebServiceWorkerRequest webRequest; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 m_webCache->dispatchKeys(new CacheWithRequestsCallbacks(resolver), 0, toWebQ
ueryParams(options)); | 405 m_webCache->dispatchKeys(new CacheWithRequestsCallbacks(resolver), 0, toWebQ
ueryParams(options)); |
407 return promise; | 406 return promise; |
408 } | 407 } |
409 | 408 |
410 WebServiceWorkerCache* Cache::webCache() const | 409 WebServiceWorkerCache* Cache::webCache() const |
411 { | 410 { |
412 return m_webCache.get(); | 411 return m_webCache.get(); |
413 } | 412 } |
414 | 413 |
415 } // namespace blink | 414 } // namespace blink |
OLD | NEW |