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 "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/browser/browser_main_loop.h" | 9 #include "content/browser/browser_main_loop.h" |
10 #include "content/browser/fileapi/browser_file_system_helper.h" | 10 #include "content/browser/fileapi/browser_file_system_helper.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
185 | 185 |
186 dom_storage_context->GetSessionStorageUsage( | 186 dom_storage_context->GetSessionStorageUsage( |
187 base::Bind(&OnSessionStorageUsageInfo, dom_storage_context, | 187 base::Bind(&OnSessionStorageUsageInfo, dom_storage_context, |
188 special_storage_policy, origin_matcher, | 188 special_storage_policy, origin_matcher, |
189 callback)); | 189 callback)); |
190 } | 190 } |
191 | 191 |
192 } // namespace | 192 } // namespace |
193 | 193 |
| 194 // static |
| 195 const uint32 StoragePartition::REMOVE_DATA_MASK_APPCACHE = 1 << 0; |
| 196 const uint32 StoragePartition::REMOVE_DATA_MASK_COOKIES = 1 << 1; |
| 197 const uint32 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2; |
| 198 const uint32 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB = 1 << 3; |
| 199 const uint32 StoragePartition::REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4; |
| 200 const uint32 StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5; |
| 201 const uint32 StoragePartition::REMOVE_DATA_MASK_WEBSQL = 1 << 6; |
| 202 const uint32 StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7; |
| 203 const uint32 StoragePartition::REMOVE_DATA_MASK_ALL = 0xFFFFFFFF; |
| 204 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0; |
| 205 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1; |
| 206 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2; |
| 207 const uint32 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL = 0xFFFFFFFF; |
| 208 |
194 // Static. | 209 // Static. |
195 int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) { | 210 int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) { |
196 int quota_client_mask = 0; | 211 int quota_client_mask = 0; |
197 | 212 |
198 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) | 213 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) |
199 quota_client_mask |= quota::QuotaClient::kFileSystem; | 214 quota_client_mask |= quota::QuotaClient::kFileSystem; |
200 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) | 215 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) |
201 quota_client_mask |= quota::QuotaClient::kDatabase; | 216 quota_client_mask |= quota::QuotaClient::kDatabase; |
202 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) | 217 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) |
203 quota_client_mask |= quota::QuotaClient::kAppcache; | 218 quota_client_mask |= quota::QuotaClient::kAppcache; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 net::URLRequestContextGetter* url_request_context) { | 786 net::URLRequestContextGetter* url_request_context) { |
772 url_request_context_ = url_request_context; | 787 url_request_context_ = url_request_context; |
773 } | 788 } |
774 | 789 |
775 void StoragePartitionImpl::SetMediaURLRequestContext( | 790 void StoragePartitionImpl::SetMediaURLRequestContext( |
776 net::URLRequestContextGetter* media_url_request_context) { | 791 net::URLRequestContextGetter* media_url_request_context) { |
777 media_url_request_context_ = media_url_request_context; | 792 media_url_request_context_ = media_url_request_context; |
778 } | 793 } |
779 | 794 |
780 } // namespace content | 795 } // namespace content |
OLD | NEW |