2016-08-24 11:28:52 +02:00
|
|
|
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "libcef/browser/storage_partition_proxy.h"
|
|
|
|
|
|
|
|
CefStoragePartitionProxy::CefStoragePartitionProxy(
|
|
|
|
content::StoragePartition* parent,
|
|
|
|
CefURLRequestContextGetterProxy* url_request_context)
|
2017-05-17 11:29:28 +02:00
|
|
|
: parent_(parent), url_request_context_(url_request_context) {}
|
2016-08-24 11:28:52 +02:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
CefStoragePartitionProxy::~CefStoragePartitionProxy() {
|
|
|
|
url_request_context_->ShutdownOnUIThread();
|
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
base::FilePath CefStoragePartitionProxy::GetPath() {
|
|
|
|
return parent_->GetPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
net::URLRequestContextGetter* CefStoragePartitionProxy::GetURLRequestContext() {
|
|
|
|
return url_request_context_.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
net::URLRequestContextGetter*
|
|
|
|
CefStoragePartitionProxy::GetMediaURLRequestContext() {
|
|
|
|
return GetURLRequestContext();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
network::mojom::NetworkContext* CefStoragePartitionProxy::GetNetworkContext() {
|
2017-09-06 23:40:58 +02:00
|
|
|
return parent_->GetNetworkContext();
|
|
|
|
}
|
|
|
|
|
2018-04-19 17:44:42 +02:00
|
|
|
scoped_refptr<network::SharedURLLoaderFactory>
|
2017-10-20 19:45:20 +02:00
|
|
|
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcess() {
|
|
|
|
return parent_->GetURLLoaderFactoryForBrowserProcess();
|
|
|
|
}
|
|
|
|
|
2018-04-19 17:44:42 +02:00
|
|
|
std::unique_ptr<network::SharedURLLoaderFactoryInfo>
|
|
|
|
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcessIOThread() {
|
|
|
|
return parent_->GetURLLoaderFactoryForBrowserProcessIOThread();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
network::mojom::CookieManager*
|
|
|
|
CefStoragePartitionProxy::GetCookieManagerForBrowserProcess() {
|
|
|
|
return parent_->GetCookieManagerForBrowserProcess();
|
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
storage::QuotaManager* CefStoragePartitionProxy::GetQuotaManager() {
|
|
|
|
return parent_->GetQuotaManager();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::AppCacheService* CefStoragePartitionProxy::GetAppCacheService() {
|
|
|
|
return parent_->GetAppCacheService();
|
|
|
|
}
|
|
|
|
|
|
|
|
storage::FileSystemContext* CefStoragePartitionProxy::GetFileSystemContext() {
|
|
|
|
return parent_->GetFileSystemContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
storage::DatabaseTracker* CefStoragePartitionProxy::GetDatabaseTracker() {
|
|
|
|
return parent_->GetDatabaseTracker();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::DOMStorageContext* CefStoragePartitionProxy::GetDOMStorageContext() {
|
|
|
|
return parent_->GetDOMStorageContext();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
content::LockManager* CefStoragePartitionProxy::GetLockManager() {
|
|
|
|
return parent_->GetLockManager();
|
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
content::IndexedDBContext* CefStoragePartitionProxy::GetIndexedDBContext() {
|
|
|
|
return parent_->GetIndexedDBContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::ServiceWorkerContext*
|
|
|
|
CefStoragePartitionProxy::GetServiceWorkerContext() {
|
|
|
|
return parent_->GetServiceWorkerContext();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
content::SharedWorkerService*
|
|
|
|
CefStoragePartitionProxy::GetSharedWorkerService() {
|
|
|
|
return parent_->GetSharedWorkerService();
|
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
content::CacheStorageContext*
|
|
|
|
CefStoragePartitionProxy::GetCacheStorageContext() {
|
|
|
|
return parent_->GetCacheStorageContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::HostZoomMap* CefStoragePartitionProxy::GetHostZoomMap() {
|
|
|
|
return parent_->GetHostZoomMap();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::HostZoomLevelContext*
|
|
|
|
CefStoragePartitionProxy::GetHostZoomLevelContext() {
|
|
|
|
return parent_->GetHostZoomLevelContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::ZoomLevelDelegate* CefStoragePartitionProxy::GetZoomLevelDelegate() {
|
|
|
|
return parent_->GetZoomLevelDelegate();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::PlatformNotificationContext*
|
|
|
|
CefStoragePartitionProxy::GetPlatformNotificationContext() {
|
|
|
|
return parent_->GetPlatformNotificationContext();
|
|
|
|
}
|
|
|
|
|
2018-04-19 17:44:42 +02:00
|
|
|
content::WebPackageContext* CefStoragePartitionProxy::GetWebPackageContext() {
|
|
|
|
return parent_->GetWebPackageContext();
|
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
void CefStoragePartitionProxy::ClearDataForOrigin(
|
|
|
|
uint32_t remove_mask,
|
|
|
|
uint32_t quota_storage_remove_mask,
|
2018-02-15 01:12:09 +01:00
|
|
|
const GURL& storage_origin) {
|
2016-08-24 11:28:52 +02:00
|
|
|
parent_->ClearDataForOrigin(remove_mask, quota_storage_remove_mask,
|
2018-02-15 01:12:09 +01:00
|
|
|
storage_origin);
|
2016-08-24 11:28:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefStoragePartitionProxy::ClearData(
|
|
|
|
uint32_t remove_mask,
|
|
|
|
uint32_t quota_storage_remove_mask,
|
|
|
|
const GURL& storage_origin,
|
|
|
|
const OriginMatcherFunction& origin_matcher,
|
|
|
|
const base::Time begin,
|
|
|
|
const base::Time end,
|
2017-12-07 22:44:24 +01:00
|
|
|
base::OnceClosure callback) {
|
2016-08-24 11:28:52 +02:00
|
|
|
parent_->ClearData(remove_mask, quota_storage_remove_mask, storage_origin,
|
2017-12-07 22:44:24 +01:00
|
|
|
origin_matcher, begin, end, std::move(callback));
|
2016-08-24 11:28:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefStoragePartitionProxy::ClearData(
|
|
|
|
uint32_t remove_mask,
|
|
|
|
uint32_t quota_storage_remove_mask,
|
|
|
|
const OriginMatcherFunction& origin_matcher,
|
2018-05-20 15:51:42 +02:00
|
|
|
network::mojom::CookieDeletionFilterPtr cookie_deletion_filter,
|
2016-08-24 11:28:52 +02:00
|
|
|
const base::Time begin,
|
|
|
|
const base::Time end,
|
2017-12-07 22:44:24 +01:00
|
|
|
base::OnceClosure callback) {
|
2016-08-24 11:28:52 +02:00
|
|
|
parent_->ClearData(remove_mask, quota_storage_remove_mask, origin_matcher,
|
2018-05-20 15:51:42 +02:00
|
|
|
std::move(cookie_deletion_filter), begin, end,
|
|
|
|
std::move(callback));
|
2016-08-24 11:28:52 +02:00
|
|
|
}
|
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
void CefStoragePartitionProxy::ClearHttpAndMediaCaches(
|
|
|
|
const base::Time begin,
|
|
|
|
const base::Time end,
|
|
|
|
const base::Callback<bool(const GURL&)>& url_matcher,
|
2017-12-07 22:44:24 +01:00
|
|
|
base::OnceClosure callback) {
|
|
|
|
parent_->ClearHttpAndMediaCaches(begin, end, url_matcher,
|
|
|
|
std::move(callback));
|
2017-04-20 21:28:17 +02:00
|
|
|
}
|
|
|
|
|
2016-08-24 11:28:52 +02:00
|
|
|
void CefStoragePartitionProxy::Flush() {
|
|
|
|
parent_->Flush();
|
|
|
|
}
|
|
|
|
|
2017-03-03 23:37:23 +01:00
|
|
|
void CefStoragePartitionProxy::ClearBluetoothAllowedDevicesMapForTesting() {
|
|
|
|
parent_->ClearBluetoothAllowedDevicesMapForTesting();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
void CefStoragePartitionProxy::FlushNetworkInterfaceForTesting() {
|
|
|
|
parent_->FlushNetworkInterfaceForTesting();
|
|
|
|
}
|
|
|
|
|
2018-03-20 21:15:08 +01:00
|
|
|
void CefStoragePartitionProxy::WaitForDeletionTasksForTesting() {
|
|
|
|
parent_->WaitForDeletionTasksForTesting();
|
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
content::BackgroundFetchContext*
|
|
|
|
CefStoragePartitionProxy::GetBackgroundFetchContext() {
|
|
|
|
return parent_->GetBackgroundFetchContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::BackgroundSyncContext*
|
|
|
|
CefStoragePartitionProxy::GetBackgroundSyncContext() {
|
|
|
|
return parent_->GetBackgroundSyncContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::PaymentAppContextImpl*
|
|
|
|
CefStoragePartitionProxy::GetPaymentAppContext() {
|
|
|
|
return parent_->GetPaymentAppContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::BroadcastChannelProvider*
|
|
|
|
CefStoragePartitionProxy::GetBroadcastChannelProvider() {
|
|
|
|
return parent_->GetBroadcastChannelProvider();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::BluetoothAllowedDevicesMap*
|
|
|
|
CefStoragePartitionProxy::GetBluetoothAllowedDevicesMap() {
|
|
|
|
return parent_->GetBluetoothAllowedDevicesMap();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::BlobRegistryWrapper* CefStoragePartitionProxy::GetBlobRegistry() {
|
|
|
|
return parent_->GetBlobRegistry();
|
2017-12-07 22:44:24 +01:00
|
|
|
}
|
|
|
|
|
2018-03-20 21:15:08 +01:00
|
|
|
content::PrefetchURLLoaderService*
|
|
|
|
CefStoragePartitionProxy::GetPrefetchURLLoaderService() {
|
|
|
|
return parent_->GetPrefetchURLLoaderService();
|
|
|
|
}
|
|
|
|
|
2018-05-21 14:54:08 +02:00
|
|
|
content::CookieStoreContext* CefStoragePartitionProxy::GetCookieStoreContext() {
|
|
|
|
return parent_->GetCookieStoreContext();
|
|
|
|
}
|
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
content::URLLoaderFactoryGetter*
|
|
|
|
CefStoragePartitionProxy::url_loader_factory_getter() {
|
|
|
|
return parent_->url_loader_factory_getter();
|
|
|
|
}
|
|
|
|
|
|
|
|
content::BrowserContext* CefStoragePartitionProxy::browser_context() const {
|
|
|
|
return parent_->browser_context();
|
|
|
|
}
|
|
|
|
|
2017-10-20 19:45:20 +02:00
|
|
|
mojo::BindingId CefStoragePartitionProxy::Bind(
|
2017-09-06 23:40:58 +02:00
|
|
|
int process_id,
|
2018-06-19 00:08:20 +02:00
|
|
|
mojo::InterfaceRequest<blink::mojom::StoragePartitionService> request) {
|
2017-10-20 19:45:20 +02:00
|
|
|
return parent_->Bind(process_id, std::move(request));
|
2016-08-24 11:28:52 +02:00
|
|
|
}
|
2018-02-15 01:12:09 +01:00
|
|
|
|
|
|
|
void CefStoragePartitionProxy::set_site_for_service_worker(
|
|
|
|
const GURL& site_for_service_worker) {
|
|
|
|
parent_->set_site_for_service_worker(site_for_service_worker);
|
|
|
|
}
|
|
|
|
|
|
|
|
const GURL& CefStoragePartitionProxy::site_for_service_worker() const {
|
|
|
|
return parent_->site_for_service_worker();
|
|
|
|
}
|