Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 633273002: Added quota client for serviceworker. Enables 'clear past <time> data'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary IO thread switch Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 int quota_client_mask = 0; 226 int quota_client_mask = 0;
227 227
228 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) 228 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS)
229 quota_client_mask |= storage::QuotaClient::kFileSystem; 229 quota_client_mask |= storage::QuotaClient::kFileSystem;
230 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) 230 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL)
231 quota_client_mask |= storage::QuotaClient::kDatabase; 231 quota_client_mask |= storage::QuotaClient::kDatabase;
232 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) 232 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE)
233 quota_client_mask |= storage::QuotaClient::kAppcache; 233 quota_client_mask |= storage::QuotaClient::kAppcache;
234 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_INDEXEDDB) 234 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_INDEXEDDB)
235 quota_client_mask |= storage::QuotaClient::kIndexedDatabase; 235 quota_client_mask |= storage::QuotaClient::kIndexedDatabase;
236 // TODO(jsbell): StoragePartition::REMOVE_DATA_MASK_SERVICE_WORKERS) 236 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_SERVICE_WORKERS)
237 quota_client_mask |= storage::QuotaClient::kServiceWorker;
237 238
238 return quota_client_mask; 239 return quota_client_mask;
239 } 240 }
240 241
241 // Helper for deleting quota managed data from a partition. 242 // Helper for deleting quota managed data from a partition.
242 // 243 //
243 // Most of the operations in this class are done on IO thread. 244 // Most of the operations in this class are done on IO thread.
244 struct StoragePartitionImpl::QuotaManagedDataDeletionHelper { 245 struct StoragePartitionImpl::QuotaManagedDataDeletionHelper {
245 QuotaManagedDataDeletionHelper(uint32 remove_mask, 246 QuotaManagedDataDeletionHelper(uint32 remove_mask,
246 uint32 quota_storage_remove_mask, 247 uint32 quota_storage_remove_mask,
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 net::URLRequestContextGetter* url_request_context) { 821 net::URLRequestContextGetter* url_request_context) {
821 url_request_context_ = url_request_context; 822 url_request_context_ = url_request_context;
822 } 823 }
823 824
824 void StoragePartitionImpl::SetMediaURLRequestContext( 825 void StoragePartitionImpl::SetMediaURLRequestContext(
825 net::URLRequestContextGetter* media_url_request_context) { 826 net::URLRequestContextGetter* media_url_request_context) {
826 media_url_request_context_ = media_url_request_context; 827 media_url_request_context_ = media_url_request_context;
827 } 828 }
828 829
829 } // namespace content 830 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698