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 "storage/browser/blob/blob_data_handle.h" | 18 #include "storage/browser/blob/blob_data_handle.h" |
19 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" | 19 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerCacheError.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 const uint32 kFilteredMessageClasses[] = {CacheStorageMsgStart}; | 25 const uint32 kFilteredMessageClasses[] = {CacheStorageMsgStart}; |
26 | 26 |
27 blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError( | 27 blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError( |
28 CacheStorageError err) { | 28 CacheStorageError err) { |
29 switch (err) { | 29 switch (err) { |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); | 478 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); |
479 if (it == blob_handle_store_.end()) | 479 if (it == blob_handle_store_.end()) |
480 return; | 480 return; |
481 DCHECK(!it->second.empty()); | 481 DCHECK(!it->second.empty()); |
482 it->second.pop_front(); | 482 it->second.pop_front(); |
483 if (it->second.empty()) | 483 if (it->second.empty()) |
484 blob_handle_store_.erase(it); | 484 blob_handle_store_.erase(it); |
485 } | 485 } |
486 | 486 |
487 } // namespace content | 487 } // namespace content |
OLD | NEW |