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 "content/renderer/service_worker/service_worker_cache_storage_dispatche
r.h" | 5 #include "content/renderer/service_worker/service_worker_cache_storage_dispatche
r.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 web_response.blobSize(), | 98 web_response.blobSize(), |
99 web_response.streamURL()); | 99 web_response.streamURL()); |
100 } | 100 } |
101 | 101 |
102 ServiceWorkerCacheQueryParams QueryParamsFromWebQueryParams( | 102 ServiceWorkerCacheQueryParams QueryParamsFromWebQueryParams( |
103 const blink::WebServiceWorkerCache::QueryParams& web_query_params) { | 103 const blink::WebServiceWorkerCache::QueryParams& web_query_params) { |
104 ServiceWorkerCacheQueryParams query_params; | 104 ServiceWorkerCacheQueryParams query_params; |
105 query_params.ignore_search = web_query_params.ignoreSearch; | 105 query_params.ignore_search = web_query_params.ignoreSearch; |
106 query_params.ignore_method = web_query_params.ignoreMethod; | 106 query_params.ignore_method = web_query_params.ignoreMethod; |
107 query_params.ignore_vary = web_query_params.ignoreVary; | 107 query_params.ignore_vary = web_query_params.ignoreVary; |
108 query_params.prefix_match = web_query_params.prefixMatch; | |
109 query_params.cache_name = web_query_params.cacheName; | 108 query_params.cache_name = web_query_params.cacheName; |
110 return query_params; | 109 return query_params; |
111 } | 110 } |
112 | 111 |
113 ServiceWorkerCacheOperationType CacheOperationTypeFromWebCacheOperationType( | 112 ServiceWorkerCacheOperationType CacheOperationTypeFromWebCacheOperationType( |
114 blink::WebServiceWorkerCache::OperationType operation_type) { | 113 blink::WebServiceWorkerCache::OperationType operation_type) { |
115 switch (operation_type) { | 114 switch (operation_type) { |
116 case blink::WebServiceWorkerCache::OperationTypePut: | 115 case blink::WebServiceWorkerCache::OperationTypePut: |
117 return SERVICE_WORKER_CACHE_OPERATION_TYPE_PUT; | 116 return SERVICE_WORKER_CACHE_OPERATION_TYPE_PUT; |
118 case blink::WebServiceWorkerCache::OperationTypeDelete: | 117 case blink::WebServiceWorkerCache::OperationTypeDelete: |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 ServiceWorkerCacheStorageDispatcher::WebResponsesFromResponses( | 616 ServiceWorkerCacheStorageDispatcher::WebResponsesFromResponses( |
618 const std::vector<ServiceWorkerResponse>& responses) { | 617 const std::vector<ServiceWorkerResponse>& responses) { |
619 blink::WebVector<blink::WebServiceWorkerResponse> web_responses( | 618 blink::WebVector<blink::WebServiceWorkerResponse> web_responses( |
620 responses.size()); | 619 responses.size()); |
621 for (size_t i = 0; i < responses.size(); ++i) | 620 for (size_t i = 0; i < responses.size(); ++i) |
622 PopulateWebResponseFromResponse(responses[i], &(web_responses[i])); | 621 PopulateWebResponseFromResponse(responses[i], &(web_responses[i])); |
623 return web_responses; | 622 return web_responses; |
624 } | 623 } |
625 | 624 |
626 } // namespace content | 625 } // namespace content |
OLD | NEW |