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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 BrowserContext* browser_context) | 369 BrowserContext* browser_context) |
370 : browser_context_(browser_context), | 370 : browser_context_(browser_context), |
371 resource_context_initialized_(false) { | 371 resource_context_initialized_(false) { |
372 // Doing here instead of initializer list cause it's just too ugly to read. | 372 // Doing here instead of initializer list cause it's just too ugly to read. |
373 base::SequencedWorkerPool* blocking_pool = BrowserThread::GetBlockingPool(); | 373 base::SequencedWorkerPool* blocking_pool = BrowserThread::GetBlockingPool(); |
374 file_access_runner_ = | 374 file_access_runner_ = |
375 blocking_pool->GetSequencedTaskRunner(blocking_pool->GetSequenceToken()); | 375 blocking_pool->GetSequencedTaskRunner(blocking_pool->GetSequenceToken()); |
376 } | 376 } |
377 | 377 |
378 StoragePartitionImplMap::~StoragePartitionImplMap() { | 378 StoragePartitionImplMap::~StoragePartitionImplMap() { |
379 STLDeleteContainerPairSecondPointers(partitions_.begin(), | 379 base::STLDeleteContainerPairSecondPointers(partitions_.begin(), |
380 partitions_.end()); | 380 partitions_.end()); |
381 } | 381 } |
382 | 382 |
383 StoragePartitionImpl* StoragePartitionImplMap::Get( | 383 StoragePartitionImpl* StoragePartitionImplMap::Get( |
384 const std::string& partition_domain, | 384 const std::string& partition_domain, |
385 const std::string& partition_name, | 385 const std::string& partition_name, |
386 bool in_memory) { | 386 bool in_memory) { |
387 // Find the previously created partition if it's available. | 387 // Find the previously created partition if it's available. |
388 StoragePartitionConfig partition_config( | 388 StoragePartitionConfig partition_config( |
389 partition_domain, partition_name, in_memory); | 389 partition_domain, partition_name, in_memory); |
390 | 390 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 // We do not call InitializeURLRequestContext() for media contexts because, | 607 // We do not call InitializeURLRequestContext() for media contexts because, |
608 // other than the HTTP cache, the media contexts share the same backing | 608 // other than the HTTP cache, the media contexts share the same backing |
609 // objects as their associated "normal" request context. Thus, the previous | 609 // objects as their associated "normal" request context. Thus, the previous |
610 // call serves to initialize the media request context for this storage | 610 // call serves to initialize the media request context for this storage |
611 // partition as well. | 611 // partition as well. |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 } // namespace content | 615 } // namespace content |
OLD | NEW |