| 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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 if (url_matcher.is_null()) { | 887 if (url_matcher.is_null()) { |
| 888 StoragePartitionHttpCacheDataRemover::CreateForRange(this, begin, end) | 888 StoragePartitionHttpCacheDataRemover::CreateForRange(this, begin, end) |
| 889 ->Remove(callback); | 889 ->Remove(callback); |
| 890 } else { | 890 } else { |
| 891 StoragePartitionHttpCacheDataRemover::CreateForURLsAndRange( | 891 StoragePartitionHttpCacheDataRemover::CreateForURLsAndRange( |
| 892 this, url_matcher, begin, end) | 892 this, url_matcher, begin, end) |
| 893 ->Remove(callback); | 893 ->Remove(callback); |
| 894 } | 894 } |
| 895 } | 895 } |
| 896 | 896 |
| 897 void StoragePartitionImpl::Flush() { | 897 std::vector<scoped_refptr<base::SequencedTaskRunner>> |
| 898 StoragePartitionImpl::Flush() { |
| 898 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 899 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 899 if (GetDOMStorageContext()) | 900 std::vector<scoped_refptr<base::SequencedTaskRunner>> flush_runners; |
| 900 GetDOMStorageContext()->Flush(); | 901 if (dom_storage_context_) { |
| 902 dom_storage_context_->Flush(); |
| 903 flush_runners.push_back(dom_storage_context_->GetSequencedTaskRunner( |
| 904 DOMStorageTaskRunner::PRIMARY_SEQUENCE)); |
| 905 flush_runners.push_back(dom_storage_context_->GetSequencedTaskRunner( |
| 906 DOMStorageTaskRunner::COMMIT_SEQUENCE)); |
| 907 } |
| 908 return flush_runners; |
| 901 } | 909 } |
| 902 | 910 |
| 903 void StoragePartitionImpl::ClearBluetoothAllowedDevicesMapForTesting() { | 911 void StoragePartitionImpl::ClearBluetoothAllowedDevicesMapForTesting() { |
| 904 bluetooth_allowed_devices_map_->Clear(); | 912 bluetooth_allowed_devices_map_->Clear(); |
| 905 } | 913 } |
| 906 | 914 |
| 907 BrowserContext* StoragePartitionImpl::browser_context() const { | 915 BrowserContext* StoragePartitionImpl::browser_context() const { |
| 908 return browser_context_; | 916 return browser_context_; |
| 909 } | 917 } |
| 910 | 918 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 933 media_url_request_context_ = media_url_request_context; | 941 media_url_request_context_ = media_url_request_context; |
| 934 } | 942 } |
| 935 | 943 |
| 936 void StoragePartitionImpl::GetQuotaSettings( | 944 void StoragePartitionImpl::GetQuotaSettings( |
| 937 const storage::OptionalQuotaSettingsCallback& callback) { | 945 const storage::OptionalQuotaSettingsCallback& callback) { |
| 938 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 946 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
| 939 callback); | 947 callback); |
| 940 } | 948 } |
| 941 | 949 |
| 942 } // namespace content | 950 } // namespace content |
| OLD | NEW |