| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 12 #include "content/browser/bad_message.h" | 12 #include "content/browser/bad_message.h" |
| 13 #include "content/browser/cache_storage/cache_storage_cache.h" | 13 #include "content/browser/cache_storage/cache_storage_cache.h" |
| 14 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 14 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 15 #include "content/browser/cache_storage/cache_storage_manager.h" | 15 #include "content/browser/cache_storage/cache_storage_manager.h" |
| 16 #include "content/common/cache_storage/cache_storage_messages.h" | 16 #include "content/common/cache_storage/cache_storage_messages.h" |
| 17 #include "content/public/browser/content_browser_client.h" | 17 #include "content/public/browser/content_browser_client.h" |
| 18 #include "content/public/common/origin_util.h" | 18 #include "content/public/common/origin_util.h" |
| 19 #include "storage/browser/blob/blob_data_handle.h" | 19 #include "storage/browser/blob/blob_data_handle.h" |
| 20 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" | 20 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerCacheError.h" |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const uint32 kFilteredMessageClasses[] = {CacheStorageMsgStart}; | 26 const uint32 kFilteredMessageClasses[] = {CacheStorageMsgStart}; |
| 27 | 27 |
| 28 blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError( | 28 blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError( |
| 29 CacheStorageError err) { | 29 CacheStorageError err) { |
| 30 switch (err) { | 30 switch (err) { |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); | 502 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); |
| 503 if (it == blob_handle_store_.end()) | 503 if (it == blob_handle_store_.end()) |
| 504 return; | 504 return; |
| 505 DCHECK(!it->second.empty()); | 505 DCHECK(!it->second.empty()); |
| 506 it->second.pop_front(); | 506 it->second.pop_front(); |
| 507 if (it->second.empty()) | 507 if (it->second.empty()) |
| 508 blob_handle_store_.erase(it); | 508 blob_handle_store_.erase(it); |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace content | 511 } // namespace content |
| OLD | NEW |