Chromium Code Reviews| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 713 const base::Closure& callback, | 713 const base::Closure& callback, |
| 714 const std::set<GURL>& origins, | 714 const std::set<GURL>& origins, |
| 715 storage::StorageType quota_storage_type) { | 715 storage::StorageType quota_storage_type) { |
| 716 // The QuotaManager manages all storage other than cookies, LocalStorage, | 716 // The QuotaManager manages all storage other than cookies, LocalStorage, |
| 717 // and SessionStorage. This loop wipes out most HTML5 storage for the given | 717 // and SessionStorage. This loop wipes out most HTML5 storage for the given |
| 718 // origins. | 718 // origins. |
| 719 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 719 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 720 if (origins.empty()) { | 720 if (origins.empty()) { |
| 721 callback.Run(); | 721 callback.Run(); |
| 722 return; | 722 return; |
| 723 } | 723 } |
|
msramek
2017/01/10 10:23:02
Please re-add the empty line here. That's currentl
dullweber
2017/01/10 13:18:35
Done.
| |
| 724 | |
| 725 size_t* deletion_task_count = new size_t(0u); | 724 size_t* deletion_task_count = new size_t(0u); |
| 726 (*deletion_task_count)++; | 725 (*deletion_task_count)++; |
| 727 for (std::set<GURL>::const_iterator origin = origins.begin(); | 726 for (std::set<GURL>::const_iterator origin = origins.begin(); |
| 728 origin != origins.end(); ++origin) { | 727 origin != origins.end(); ++origin) { |
| 729 // TODO(mkwst): Clean this up, it's slow. http://crbug.com/130746 | 728 // TODO(mkwst): Clean this up, it's slow. http://crbug.com/130746 |
| 730 if (!storage_origin.is_empty() && origin->GetOrigin() != storage_origin) | 729 if (!storage_origin.is_empty() && origin->GetOrigin() != storage_origin) |
| 731 continue; | 730 continue; |
| 732 | 731 |
| 733 if (!origin_matcher.is_null() && | 732 if (!origin_matcher.is_null() && |
| 734 !origin_matcher.Run(*origin, special_storage_policy.get())) { | 733 !origin_matcher.Run(*origin, special_storage_policy.get())) { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 927 net::URLRequestContextGetter* url_request_context) { | 926 net::URLRequestContextGetter* url_request_context) { |
| 928 url_request_context_ = url_request_context; | 927 url_request_context_ = url_request_context; |
| 929 } | 928 } |
| 930 | 929 |
| 931 void StoragePartitionImpl::SetMediaURLRequestContext( | 930 void StoragePartitionImpl::SetMediaURLRequestContext( |
| 932 net::URLRequestContextGetter* media_url_request_context) { | 931 net::URLRequestContextGetter* media_url_request_context) { |
| 933 media_url_request_context_ = media_url_request_context; | 932 media_url_request_context_ = media_url_request_context; |
| 934 } | 933 } |
| 935 | 934 |
| 936 } // namespace content | 935 } // namespace content |
| OLD | NEW |