OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/storage_partition_impl.h" | 5 #include "content/browser/storage_partition_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "content/browser/browser_main_loop.h" | 17 #include "content/browser/browser_main_loop.h" |
18 #include "content/browser/fileapi/browser_file_system_helper.h" | 18 #include "content/browser/fileapi/browser_file_system_helper.h" |
| 19 #include "content/browser/gpu/shader_disk_cache.h" |
19 #include "content/browser/host_zoom_map_impl.h" | 20 #include "content/browser/host_zoom_map_impl.h" |
20 #include "content/browser/notifications/platform_notification_context_impl.h" | 21 #include "content/browser/notifications/platform_notification_context_impl.h" |
21 #include "content/common/dom_storage/dom_storage_types.h" | 22 #include "content/common/dom_storage/dom_storage_types.h" |
22 #include "content/public/browser/browser_context.h" | 23 #include "content/public/browser/browser_context.h" |
23 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
24 #include "content/public/browser/dom_storage_context.h" | 25 #include "content/public/browser/dom_storage_context.h" |
25 #include "content/public/browser/indexed_db_context.h" | 26 #include "content/public/browser/indexed_db_context.h" |
26 #include "content/public/browser/local_storage_usage_info.h" | 27 #include "content/public/browser/local_storage_usage_info.h" |
27 #include "content/public/browser/session_storage_usage_info.h" | 28 #include "content/public/browser/session_storage_usage_info.h" |
28 #include "gpu/ipc/host/shader_disk_cache.h" | |
29 #include "net/base/completion_callback.h" | 29 #include "net/base/completion_callback.h" |
30 #include "net/base/net_errors.h" | 30 #include "net/base/net_errors.h" |
31 #include "net/cookies/canonical_cookie.h" | 31 #include "net/cookies/canonical_cookie.h" |
32 #include "net/cookies/cookie_monster.h" | 32 #include "net/cookies/cookie_monster.h" |
33 #include "net/url_request/url_request_context.h" | 33 #include "net/url_request/url_request_context.h" |
34 #include "net/url_request/url_request_context_getter.h" | 34 #include "net/url_request/url_request_context_getter.h" |
35 #include "ppapi/features/features.h" | 35 #include "ppapi/features/features.h" |
36 #include "storage/browser/database/database_tracker.h" | 36 #include "storage/browser/database/database_tracker.h" |
37 #include "storage/browser/quota/quota_manager.h" | 37 #include "storage/browser/quota/quota_manager.h" |
38 | 38 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 return; | 125 return; |
126 } | 126 } |
127 callback.Run(); | 127 callback.Run(); |
128 } | 128 } |
129 | 129 |
130 void ClearShaderCacheOnIOThread(const base::FilePath& path, | 130 void ClearShaderCacheOnIOThread(const base::FilePath& path, |
131 const base::Time begin, | 131 const base::Time begin, |
132 const base::Time end, | 132 const base::Time end, |
133 const base::Closure& callback) { | 133 const base::Closure& callback) { |
134 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 134 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
135 gpu::ShaderCacheFactory::GetInstance()->ClearByPath( | 135 ShaderCacheFactory::GetInstance()->ClearByPath( |
136 path, begin, end, base::Bind(&ClearedShaderCache, callback)); | 136 path, begin, end, base::Bind(&ClearedShaderCache, callback)); |
137 } | 137 } |
138 | 138 |
139 void OnLocalStorageUsageInfo( | 139 void OnLocalStorageUsageInfo( |
140 const scoped_refptr<DOMStorageContextWrapper>& dom_storage_context, | 140 const scoped_refptr<DOMStorageContextWrapper>& dom_storage_context, |
141 const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, | 141 const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, |
142 const StoragePartition::OriginMatcherFunction& origin_matcher, | 142 const StoragePartition::OriginMatcherFunction& origin_matcher, |
143 const base::Time delete_begin, | 143 const base::Time delete_begin, |
144 const base::Time delete_end, | 144 const base::Time delete_end, |
145 const base::Closure& callback, | 145 const base::Closure& callback, |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 net::URLRequestContextGetter* url_request_context) { | 928 net::URLRequestContextGetter* url_request_context) { |
929 url_request_context_ = url_request_context; | 929 url_request_context_ = url_request_context; |
930 } | 930 } |
931 | 931 |
932 void StoragePartitionImpl::SetMediaURLRequestContext( | 932 void StoragePartitionImpl::SetMediaURLRequestContext( |
933 net::URLRequestContextGetter* media_url_request_context) { | 933 net::URLRequestContextGetter* media_url_request_context) { |
934 media_url_request_context_ = media_url_request_context; | 934 media_url_request_context_ = media_url_request_context; |
935 } | 935 } |
936 | 936 |
937 } // namespace content | 937 } // namespace content |
OLD | NEW |