| 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> |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 storage::QuotaManager* quota_manager, | 701 storage::QuotaManager* quota_manager, |
| 702 const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, | 702 const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, |
| 703 const StoragePartition::OriginMatcherFunction& origin_matcher, | 703 const StoragePartition::OriginMatcherFunction& origin_matcher, |
| 704 const base::Closure& callback, | 704 const base::Closure& callback, |
| 705 const std::set<GURL>& origins, | 705 const std::set<GURL>& origins, |
| 706 storage::StorageType quota_storage_type) { | 706 storage::StorageType quota_storage_type) { |
| 707 // The QuotaManager manages all storage other than cookies, LocalStorage, | 707 // The QuotaManager manages all storage other than cookies, LocalStorage, |
| 708 // and SessionStorage. This loop wipes out most HTML5 storage for the given | 708 // and SessionStorage. This loop wipes out most HTML5 storage for the given |
| 709 // origins. | 709 // origins. |
| 710 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 710 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 711 if (!origins.size()) { | 711 if (origins.empty()) { |
| 712 callback.Run(); | 712 callback.Run(); |
| 713 return; | 713 return; |
| 714 } | 714 } |
| 715 | 715 |
| 716 size_t* deletion_task_count = new size_t(0u); | 716 size_t* deletion_task_count = new size_t(0u); |
| 717 (*deletion_task_count)++; | 717 (*deletion_task_count)++; |
| 718 for (std::set<GURL>::const_iterator origin = origins.begin(); | 718 for (std::set<GURL>::const_iterator origin = origins.begin(); |
| 719 origin != origins.end(); ++origin) { | 719 origin != origins.end(); ++origin) { |
| 720 // TODO(mkwst): Clean this up, it's slow. http://crbug.com/130746 | 720 // TODO(mkwst): Clean this up, it's slow. http://crbug.com/130746 |
| 721 if (!storage_origin.is_empty() && origin->GetOrigin() != storage_origin) | 721 if (!storage_origin.is_empty() && origin->GetOrigin() != storage_origin) |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 net::URLRequestContextGetter* url_request_context) { | 918 net::URLRequestContextGetter* url_request_context) { |
| 919 url_request_context_ = url_request_context; | 919 url_request_context_ = url_request_context; |
| 920 } | 920 } |
| 921 | 921 |
| 922 void StoragePartitionImpl::SetMediaURLRequestContext( | 922 void StoragePartitionImpl::SetMediaURLRequestContext( |
| 923 net::URLRequestContextGetter* media_url_request_context) { | 923 net::URLRequestContextGetter* media_url_request_context) { |
| 924 media_url_request_context_ = media_url_request_context; | 924 media_url_request_context_ = media_url_request_context; |
| 925 } | 925 } |
| 926 | 926 |
| 927 } // namespace content | 927 } // namespace content |
| OLD | NEW |