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_map.h" | 5 #include "content/browser/storage_partition_impl_map.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 base::FilePath relative_partition_path = | 393 base::FilePath relative_partition_path = |
394 GetStoragePartitionPath(partition_domain, partition_name); | 394 GetStoragePartitionPath(partition_domain, partition_name); |
395 | 395 |
396 std::unique_ptr<StoragePartitionImpl> partition_ptr( | 396 std::unique_ptr<StoragePartitionImpl> partition_ptr( |
397 StoragePartitionImpl::Create(browser_context_, in_memory, | 397 StoragePartitionImpl::Create(browser_context_, in_memory, |
398 relative_partition_path)); | 398 relative_partition_path)); |
399 StoragePartitionImpl* partition = partition_ptr.get(); | 399 StoragePartitionImpl* partition = partition_ptr.get(); |
400 partitions_[partition_config] = std::move(partition_ptr); | 400 partitions_[partition_config] = std::move(partition_ptr); |
401 | 401 |
402 partition->GetQuotaManager()->SetTemporaryStorageEvictionPolicy( | |
403 GetContentClient()->browser()->GetTemporaryStorageEvictionPolicy( | |
404 browser_context_)); | |
405 | |
406 ChromeBlobStorageContext* blob_storage_context = | 402 ChromeBlobStorageContext* blob_storage_context = |
407 ChromeBlobStorageContext::GetFor(browser_context_); | 403 ChromeBlobStorageContext::GetFor(browser_context_); |
408 StreamContext* stream_context = StreamContext::GetFor(browser_context_); | 404 StreamContext* stream_context = StreamContext::GetFor(browser_context_); |
409 ProtocolHandlerMap protocol_handlers; | 405 ProtocolHandlerMap protocol_handlers; |
410 protocol_handlers[url::kBlobScheme] = | 406 protocol_handlers[url::kBlobScheme] = |
411 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 407 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
412 new BlobProtocolHandler(blob_storage_context, | 408 new BlobProtocolHandler(blob_storage_context, |
413 stream_context, | 409 stream_context, |
414 partition->GetFileSystemContext())); | 410 partition->GetFileSystemContext())); |
415 protocol_handlers[url::kFileSystemScheme] = | 411 protocol_handlers[url::kFileSystemScheme] = |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 601 |
606 // We do not call InitializeURLRequestContext() for media contexts because, | 602 // We do not call InitializeURLRequestContext() for media contexts because, |
607 // other than the HTTP cache, the media contexts share the same backing | 603 // other than the HTTP cache, the media contexts share the same backing |
608 // objects as their associated "normal" request context. Thus, the previous | 604 // objects as their associated "normal" request context. Thus, the previous |
609 // call serves to initialize the media request context for this storage | 605 // call serves to initialize the media request context for this storage |
610 // partition as well. | 606 // partition as well. |
611 } | 607 } |
612 } | 608 } |
613 | 609 |
614 } // namespace content | 610 } // namespace content |
OLD | NEW |