| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 partition->background_sync_context_ = new BackgroundSyncContext(); | 509 partition->background_sync_context_ = new BackgroundSyncContext(); |
| 510 partition->background_sync_context_->Init(partition->service_worker_context_); | 510 partition->background_sync_context_->Init(partition->service_worker_context_); |
| 511 | 511 |
| 512 partition->payment_app_context_ = new PaymentAppContextImpl(); | 512 partition->payment_app_context_ = new PaymentAppContextImpl(); |
| 513 partition->payment_app_context_->Init(partition->service_worker_context_); | 513 partition->payment_app_context_->Init(partition->service_worker_context_); |
| 514 | 514 |
| 515 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); | 515 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); |
| 516 | 516 |
| 517 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); | 517 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); |
| 518 | 518 |
| 519 partition->blob_url_loader_factory_ = |
| 520 new BlobURLLoaderFactory(partition.get()); |
| 521 |
| 519 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 522 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 520 switches::kEnableNetworkService)) { | 523 switches::kEnableNetworkService)) { |
| 521 mojom::NetworkServicePtr network_service; | 524 mojom::NetworkServicePtr network_service; |
| 522 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( | 525 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( |
| 523 mojom::kNetworkServiceName, &network_service); | 526 mojom::kNetworkServiceName, &network_service); |
| 524 mojom::NetworkContextParamsPtr context_params = | 527 mojom::NetworkContextParamsPtr context_params = |
| 525 mojom::NetworkContextParams::New(); | 528 mojom::NetworkContextParams::New(); |
| 526 // TODO: fill this | 529 // TODO: fill this |
| 527 // context_params->cache_dir = | 530 // context_params->cache_dir = |
| 528 // context_params->cookie_path = | 531 // context_params->cookie_path = |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 619 |
| 617 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { | 620 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { |
| 618 return broadcast_channel_provider_.get(); | 621 return broadcast_channel_provider_.get(); |
| 619 } | 622 } |
| 620 | 623 |
| 621 BluetoothAllowedDevicesMap* | 624 BluetoothAllowedDevicesMap* |
| 622 StoragePartitionImpl::GetBluetoothAllowedDevicesMap() { | 625 StoragePartitionImpl::GetBluetoothAllowedDevicesMap() { |
| 623 return bluetooth_allowed_devices_map_.get(); | 626 return bluetooth_allowed_devices_map_.get(); |
| 624 } | 627 } |
| 625 | 628 |
| 629 BlobURLLoaderFactory* StoragePartitionImpl::GetBlobURLLoaderFactory() { |
| 630 return blob_url_loader_factory_.get(); |
| 631 } |
| 632 |
| 626 void StoragePartitionImpl::OpenLocalStorage( | 633 void StoragePartitionImpl::OpenLocalStorage( |
| 627 const url::Origin& origin, | 634 const url::Origin& origin, |
| 628 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) { | 635 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) { |
| 629 dom_storage_context_->OpenLocalStorage(origin, std::move(request)); | 636 dom_storage_context_->OpenLocalStorage(origin, std::move(request)); |
| 630 } | 637 } |
| 631 | 638 |
| 632 void StoragePartitionImpl::ClearDataImpl( | 639 void StoragePartitionImpl::ClearDataImpl( |
| 633 uint32_t remove_mask, | 640 uint32_t remove_mask, |
| 634 uint32_t quota_storage_remove_mask, | 641 uint32_t quota_storage_remove_mask, |
| 635 const GURL& storage_origin, | 642 const GURL& storage_origin, |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 media_url_request_context_ = media_url_request_context; | 969 media_url_request_context_ = media_url_request_context; |
| 963 } | 970 } |
| 964 | 971 |
| 965 void StoragePartitionImpl::GetQuotaSettings( | 972 void StoragePartitionImpl::GetQuotaSettings( |
| 966 const storage::OptionalQuotaSettingsCallback& callback) { | 973 const storage::OptionalQuotaSettingsCallback& callback) { |
| 967 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 974 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
| 968 callback); | 975 callback); |
| 969 } | 976 } |
| 970 | 977 |
| 971 } // namespace content | 978 } // namespace content |
| OLD | NEW |