OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/cache_storage/cache_storage_dispatcher_host.h" | 5 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 NOTREACHED(); | 36 NOTREACHED(); |
37 return blink::WebServiceWorkerCacheErrorNotImplemented; | 37 return blink::WebServiceWorkerCacheErrorNotImplemented; |
38 case CACHE_STORAGE_ERROR_EXISTS: | 38 case CACHE_STORAGE_ERROR_EXISTS: |
39 return blink::WebServiceWorkerCacheErrorExists; | 39 return blink::WebServiceWorkerCacheErrorExists; |
40 case CACHE_STORAGE_ERROR_STORAGE: | 40 case CACHE_STORAGE_ERROR_STORAGE: |
41 // TODO(nhiroki): Add WebServiceWorkerCacheError equivalent to | 41 // TODO(nhiroki): Add WebServiceWorkerCacheError equivalent to |
42 // CACHE_STORAGE_ERROR_STORAGE. | 42 // CACHE_STORAGE_ERROR_STORAGE. |
43 return blink::WebServiceWorkerCacheErrorNotFound; | 43 return blink::WebServiceWorkerCacheErrorNotFound; |
44 case CACHE_STORAGE_ERROR_NOT_FOUND: | 44 case CACHE_STORAGE_ERROR_NOT_FOUND: |
45 return blink::WebServiceWorkerCacheErrorNotFound; | 45 return blink::WebServiceWorkerCacheErrorNotFound; |
| 46 case CACHE_STORAGE_ERROR_QUOTA_EXCEEDED: |
| 47 return blink::WebServiceWorkerCacheErrorQuotaExceeded; |
46 } | 48 } |
47 NOTREACHED(); | 49 NOTREACHED(); |
48 return blink::WebServiceWorkerCacheErrorNotImplemented; | 50 return blink::WebServiceWorkerCacheErrorNotImplemented; |
49 } | 51 } |
50 | 52 |
51 bool OriginCanAccessCacheStorage(const GURL& url) { | 53 bool OriginCanAccessCacheStorage(const GURL& url) { |
52 return IsOriginSecure(url); | 54 return IsOriginSecure(url); |
53 } | 55 } |
54 | 56 |
55 } // namespace | 57 } // namespace |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); | 509 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); |
508 if (it == blob_handle_store_.end()) | 510 if (it == blob_handle_store_.end()) |
509 return; | 511 return; |
510 DCHECK(!it->second.empty()); | 512 DCHECK(!it->second.empty()); |
511 it->second.pop_front(); | 513 it->second.pop_front(); |
512 if (it->second.empty()) | 514 if (it->second.empty()) |
513 blob_handle_store_.erase(it); | 515 blob_handle_store_.erase(it); |
514 } | 516 } |
515 | 517 |
516 } // namespace content | 518 } // namespace content |
OLD | NEW |