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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 case CACHE_STORAGE_ERROR_CACHE_NAME_NOT_FOUND: | 54 case CACHE_STORAGE_ERROR_CACHE_NAME_NOT_FOUND: |
55 return blink::kWebServiceWorkerCacheErrorCacheNameNotFound; | 55 return blink::kWebServiceWorkerCacheErrorCacheNameNotFound; |
56 case CACHE_STORAGE_ERROR_QUERY_TOO_LARGE: | 56 case CACHE_STORAGE_ERROR_QUERY_TOO_LARGE: |
57 return blink::kWebServiceWorkerCacheErrorTooLarge; | 57 return blink::kWebServiceWorkerCacheErrorTooLarge; |
58 } | 58 } |
59 NOTREACHED(); | 59 NOTREACHED(); |
60 return blink::kWebServiceWorkerCacheErrorNotImplemented; | 60 return blink::kWebServiceWorkerCacheErrorNotImplemented; |
61 } | 61 } |
62 | 62 |
63 bool OriginCanAccessCacheStorage(const url::Origin& origin) { | 63 bool OriginCanAccessCacheStorage(const url::Origin& origin) { |
64 return !origin.unique() && IsOriginSecure(origin.GetURL()); | 64 return !origin.opaque() && IsOriginSecure(origin.GetURL()); |
65 } | 65 } |
66 | 66 |
67 void StopPreservingCache( | 67 void StopPreservingCache( |
68 std::unique_ptr<CacheStorageCacheHandle> cache_handle) {} | 68 std::unique_ptr<CacheStorageCacheHandle> cache_handle) {} |
69 | 69 |
70 } // namespace | 70 } // namespace |
71 | 71 |
72 CacheStorageDispatcherHost::CacheStorageDispatcherHost() | 72 CacheStorageDispatcherHost::CacheStorageDispatcherHost() |
73 : BrowserMessageFilter(kFilteredMessageClasses, | 73 : BrowserMessageFilter(kFilteredMessageClasses, |
74 arraysize(kFilteredMessageClasses)) {} | 74 arraysize(kFilteredMessageClasses)) {} |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); | 533 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); |
534 if (it == blob_handle_store_.end()) | 534 if (it == blob_handle_store_.end()) |
535 return; | 535 return; |
536 DCHECK(!it->second.empty()); | 536 DCHECK(!it->second.empty()); |
537 it->second.pop_front(); | 537 it->second.pop_front(); |
538 if (it->second.empty()) | 538 if (it->second.empty()) |
539 blob_handle_store_.erase(it); | 539 blob_handle_store_.erase(it); |
540 } | 540 } |
541 | 541 |
542 } // namespace content | 542 } // namespace content |
OLD | NEW |