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/browser/cache_storage/cache_storage_manager.h" | 5 #include "content/browser/cache_storage/cache_storage_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/barrier_closure.h" | 13 #include "base/barrier_closure.h" |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/files/file_enumerator.h" | 15 #include "base/files/file_enumerator.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/id_map.h" | 17 #include "base/id_map.h" |
18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
19 #include "base/sha1.h" | 19 #include "base/sha1.h" |
20 #include "base/stl_util.h" | 20 #include "base/stl_util.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 23 #include "base/threading/thread_task_runner_handle.h" |
23 #include "base/time/time.h" | 24 #include "base/time/time.h" |
24 #include "content/browser/cache_storage/cache_storage.h" | 25 #include "content/browser/cache_storage/cache_storage.h" |
25 #include "content/browser/cache_storage/cache_storage.pb.h" | 26 #include "content/browser/cache_storage/cache_storage.pb.h" |
26 #include "content/browser/cache_storage/cache_storage_quota_client.h" | 27 #include "content/browser/cache_storage/cache_storage_quota_client.h" |
27 #include "content/browser/service_worker/service_worker_context_core.h" | 28 #include "content/browser/service_worker/service_worker_context_core.h" |
28 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
29 #include "net/base/url_util.h" | 30 #include "net/base/url_util.h" |
30 #include "storage/browser/quota/quota_manager_proxy.h" | 31 #include "storage/browser/quota/quota_manager_proxy.h" |
31 #include "storage/common/database/database_identifier.h" | 32 #include "storage/common/database/database_identifier.h" |
32 #include "storage/common/quota/quota_status_code.h" | 33 #include "storage/common/quota/quota_status_code.h" |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 const base::FilePath& root_path, | 444 const base::FilePath& root_path, |
444 const GURL& origin) { | 445 const GURL& origin) { |
445 const std::string identifier = storage::GetIdentifierFromOrigin(origin); | 446 const std::string identifier = storage::GetIdentifierFromOrigin(origin); |
446 const std::string origin_hash = base::SHA1HashString(identifier); | 447 const std::string origin_hash = base::SHA1HashString(identifier); |
447 const std::string origin_hash_hex = base::ToLowerASCII( | 448 const std::string origin_hash_hex = base::ToLowerASCII( |
448 base::HexEncode(origin_hash.c_str(), origin_hash.length())); | 449 base::HexEncode(origin_hash.c_str(), origin_hash.length())); |
449 return root_path.AppendASCII(origin_hash_hex); | 450 return root_path.AppendASCII(origin_hash_hex); |
450 } | 451 } |
451 | 452 |
452 } // namespace content | 453 } // namespace content |
OLD | NEW |