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