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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 489 |
490 base::FilePath path = in_memory ? base::FilePath() : partition_path; | 490 base::FilePath path = in_memory ? base::FilePath() : partition_path; |
491 partition->indexed_db_context_ = | 491 partition->indexed_db_context_ = |
492 new IndexedDBContextImpl(path, context->GetSpecialStoragePolicy(), | 492 new IndexedDBContextImpl(path, context->GetSpecialStoragePolicy(), |
493 quota_manager_proxy.get(), idb_task_runner); | 493 quota_manager_proxy.get(), idb_task_runner); |
494 | 494 |
495 partition->cache_storage_context_ = new CacheStorageContextImpl(context); | 495 partition->cache_storage_context_ = new CacheStorageContextImpl(context); |
496 partition->cache_storage_context_->Init(path, quota_manager_proxy); | 496 partition->cache_storage_context_->Init(path, quota_manager_proxy); |
497 | 497 |
498 partition->service_worker_context_ = new ServiceWorkerContextWrapper(context); | 498 partition->service_worker_context_ = new ServiceWorkerContextWrapper(context); |
499 partition->service_worker_context_->Init(path, quota_manager_proxy.get(), | |
500 context->GetSpecialStoragePolicy()); | |
501 partition->service_worker_context_->set_storage_partition(partition.get()); | 499 partition->service_worker_context_->set_storage_partition(partition.get()); |
502 | 500 |
503 partition->appcache_service_ = | 501 partition->appcache_service_ = |
504 new ChromeAppCacheService(quota_manager_proxy.get()); | 502 new ChromeAppCacheService(quota_manager_proxy.get()); |
505 | 503 |
506 partition->push_messaging_context_ = | 504 partition->push_messaging_context_ = |
507 new PushMessagingContext(context, partition->service_worker_context_); | 505 new PushMessagingContext(context, partition->service_worker_context_); |
508 | 506 |
509 #if !defined(OS_ANDROID) | 507 #if !defined(OS_ANDROID) |
510 partition->host_zoom_level_context_ = new HostZoomLevelContext( | 508 partition->host_zoom_level_context_ = new HostZoomLevelContext( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 542 |
545 scoped_refptr<ChromeBlobStorageContext> blob_context = | 543 scoped_refptr<ChromeBlobStorageContext> blob_context = |
546 ChromeBlobStorageContext::GetFor(context); | 544 ChromeBlobStorageContext::GetFor(context); |
547 BlobURLLoaderFactory::BlobContextGetter blob_getter = | 545 BlobURLLoaderFactory::BlobContextGetter blob_getter = |
548 base::BindOnce(&BlobStorageContextGetter, blob_context); | 546 base::BindOnce(&BlobStorageContextGetter, blob_context); |
549 partition->blob_url_loader_factory_ = new BlobURLLoaderFactory( | 547 partition->blob_url_loader_factory_ = new BlobURLLoaderFactory( |
550 std::move(blob_getter), partition->filesystem_context_); | 548 std::move(blob_getter), partition->filesystem_context_); |
551 | 549 |
552 partition->url_loader_factory_getter_ = new URLLoaderFactoryGetter(); | 550 partition->url_loader_factory_getter_ = new URLLoaderFactoryGetter(); |
553 partition->url_loader_factory_getter_->Initialize(partition.get()); | 551 partition->url_loader_factory_getter_->Initialize(partition.get()); |
| 552 |
| 553 partition->service_worker_context_->Init( |
| 554 path, quota_manager_proxy.get(), context->GetSpecialStoragePolicy(), |
| 555 blob_context.get(), partition->url_loader_factory_getter_.get()); |
554 } | 556 } |
555 | 557 |
556 return partition; | 558 return partition; |
557 } | 559 } |
558 | 560 |
559 base::FilePath StoragePartitionImpl::GetPath() { | 561 base::FilePath StoragePartitionImpl::GetPath() { |
560 return partition_path_; | 562 return partition_path_; |
561 } | 563 } |
562 | 564 |
563 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { | 565 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 media_url_request_context_ = media_url_request_context; | 988 media_url_request_context_ = media_url_request_context; |
987 } | 989 } |
988 | 990 |
989 void StoragePartitionImpl::GetQuotaSettings( | 991 void StoragePartitionImpl::GetQuotaSettings( |
990 const storage::OptionalQuotaSettingsCallback& callback) { | 992 const storage::OptionalQuotaSettingsCallback& callback) { |
991 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 993 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
992 callback); | 994 callback); |
993 } | 995 } |
994 | 996 |
995 } // namespace content | 997 } // namespace content |
OLD | NEW |