Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 2906543002: Add support for reading blobs when using the network service. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 partition->background_sync_context_ = new BackgroundSyncContext(); 504 partition->background_sync_context_ = new BackgroundSyncContext();
505 partition->background_sync_context_->Init(partition->service_worker_context_); 505 partition->background_sync_context_->Init(partition->service_worker_context_);
506 506
507 partition->payment_app_context_ = new PaymentAppContextImpl(); 507 partition->payment_app_context_ = new PaymentAppContextImpl();
508 partition->payment_app_context_->Init(partition->service_worker_context_); 508 partition->payment_app_context_->Init(partition->service_worker_context_);
509 509
510 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); 510 partition->broadcast_channel_provider_ = new BroadcastChannelProvider();
511 511
512 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); 512 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap();
513 513
514 partition->blob_url_loader_factory_ =
515 new BlobURLLoaderFactory(partition.get());
516
514 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 517 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
515 switches::kEnableNetworkService)) { 518 switches::kEnableNetworkService)) {
516 mojom::NetworkServicePtr network_service; 519 mojom::NetworkServicePtr network_service;
517 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( 520 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
518 mojom::kNetworkServiceName, &network_service); 521 mojom::kNetworkServiceName, &network_service);
519 mojom::NetworkContextParamsPtr context_params = 522 mojom::NetworkContextParamsPtr context_params =
520 mojom::NetworkContextParams::New(); 523 mojom::NetworkContextParams::New();
521 // TODO: fill this 524 // TODO: fill this
522 // context_params->cache_dir = 525 // context_params->cache_dir =
523 // context_params->cookie_path = 526 // context_params->cookie_path =
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 612
610 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { 613 BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() {
611 return broadcast_channel_provider_.get(); 614 return broadcast_channel_provider_.get();
612 } 615 }
613 616
614 BluetoothAllowedDevicesMap* 617 BluetoothAllowedDevicesMap*
615 StoragePartitionImpl::GetBluetoothAllowedDevicesMap() { 618 StoragePartitionImpl::GetBluetoothAllowedDevicesMap() {
616 return bluetooth_allowed_devices_map_.get(); 619 return bluetooth_allowed_devices_map_.get();
617 } 620 }
618 621
622 BlobURLLoaderFactory* StoragePartitionImpl::GetBlobURLLoaderFactory() {
623 return blob_url_loader_factory_.get();
624 }
625
619 void StoragePartitionImpl::OpenLocalStorage( 626 void StoragePartitionImpl::OpenLocalStorage(
620 const url::Origin& origin, 627 const url::Origin& origin,
621 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) { 628 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) {
622 dom_storage_context_->OpenLocalStorage(origin, std::move(request)); 629 dom_storage_context_->OpenLocalStorage(origin, std::move(request));
623 } 630 }
624 631
625 void StoragePartitionImpl::ClearDataImpl( 632 void StoragePartitionImpl::ClearDataImpl(
626 uint32_t remove_mask, 633 uint32_t remove_mask,
627 uint32_t quota_storage_remove_mask, 634 uint32_t quota_storage_remove_mask,
628 const GURL& storage_origin, 635 const GURL& storage_origin,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 media_url_request_context_ = media_url_request_context; 962 media_url_request_context_ = media_url_request_context;
956 } 963 }
957 964
958 void StoragePartitionImpl::GetQuotaSettings( 965 void StoragePartitionImpl::GetQuotaSettings(
959 const storage::OptionalQuotaSettingsCallback& callback) { 966 const storage::OptionalQuotaSettingsCallback& callback) {
960 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, 967 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this,
961 callback); 968 callback);
962 } 969 }
963 970
964 } // namespace content 971 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698