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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/browser/service_worker/service_worker_request_handler.h" | 23 #include "content/browser/service_worker/service_worker_request_handler.h" |
24 #include "content/browser/storage_partition_impl.h" | 24 #include "content/browser/storage_partition_impl.h" |
25 #include "content/browser/streams/stream.h" | 25 #include "content/browser/streams/stream.h" |
26 #include "content/browser/streams/stream_context.h" | 26 #include "content/browser/streams/stream_context.h" |
27 #include "content/browser/streams/stream_registry.h" | 27 #include "content/browser/streams/stream_registry.h" |
28 #include "content/browser/streams/stream_url_request_job.h" | 28 #include "content/browser/streams/stream_url_request_job.h" |
29 #include "content/browser/webui/url_data_manager_backend.h" | 29 #include "content/browser/webui/url_data_manager_backend.h" |
30 #include "content/public/browser/browser_context.h" | 30 #include "content/public/browser/browser_context.h" |
31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/content_browser_client.h" | 32 #include "content/public/browser/content_browser_client.h" |
| 33 #include "content/public/browser/navigator_connect_context.h" |
| 34 #include "content/public/browser/navigator_connect_service_factory.h" |
33 #include "content/public/browser/storage_partition.h" | 35 #include "content/public/browser/storage_partition.h" |
34 #include "content/public/common/content_constants.h" | 36 #include "content/public/common/content_constants.h" |
35 #include "content/public/common/url_constants.h" | 37 #include "content/public/common/url_constants.h" |
36 #include "crypto/sha2.h" | 38 #include "crypto/sha2.h" |
37 #include "net/url_request/url_request_context.h" | 39 #include "net/url_request/url_request_context.h" |
38 #include "net/url_request/url_request_context_getter.h" | 40 #include "net/url_request/url_request_context_getter.h" |
39 #include "storage/browser/blob/blob_storage_context.h" | 41 #include "storage/browser/blob/blob_storage_context.h" |
40 #include "storage/browser/blob/blob_url_request_job_factory.h" | 42 #include "storage/browser/blob/blob_url_request_job_factory.h" |
41 #include "storage/browser/fileapi/file_system_url_request_job_factory.h" | 43 #include "storage/browser/fileapi/file_system_url_request_job_factory.h" |
42 #include "storage/common/blob/blob_data.h" | 44 #include "storage/common/blob/blob_data.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 in_memory, | 456 in_memory, |
455 &protocol_handlers, | 457 &protocol_handlers, |
456 request_interceptors.Pass())); | 458 request_interceptors.Pass())); |
457 } | 459 } |
458 partition->SetMediaURLRequestContext( | 460 partition->SetMediaURLRequestContext( |
459 partition_domain.empty() ? | 461 partition_domain.empty() ? |
460 browser_context_->GetMediaRequestContext() : | 462 browser_context_->GetMediaRequestContext() : |
461 browser_context_->GetMediaRequestContextForStoragePartition( | 463 browser_context_->GetMediaRequestContextForStoragePartition( |
462 partition->GetPath(), in_memory)); | 464 partition->GetPath(), in_memory)); |
463 | 465 |
| 466 GetContentClient()->browser()->GetAdditionalNavigatorConnectServices( |
| 467 partition->GetNavigatorConnectContext()); |
| 468 |
464 PostCreateInitialization(partition, in_memory); | 469 PostCreateInitialization(partition, in_memory); |
465 | 470 |
466 return partition; | 471 return partition; |
467 } | 472 } |
468 | 473 |
469 void StoragePartitionImplMap::AsyncObliterate( | 474 void StoragePartitionImplMap::AsyncObliterate( |
470 const GURL& site, | 475 const GURL& site, |
471 const base::Closure& on_gc_required) { | 476 const base::Closure& on_gc_required) { |
472 // This method should avoid creating any StoragePartition (which would | 477 // This method should avoid creating any StoragePartition (which would |
473 // create more open file handles) so that it can delete as much of the | 478 // create more open file handles) so that it can delete as much of the |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 596 |
592 // We do not call InitializeURLRequestContext() for media contexts because, | 597 // We do not call InitializeURLRequestContext() for media contexts because, |
593 // other than the HTTP cache, the media contexts share the same backing | 598 // other than the HTTP cache, the media contexts share the same backing |
594 // objects as their associated "normal" request context. Thus, the previous | 599 // objects as their associated "normal" request context. Thus, the previous |
595 // call serves to initialize the media request context for this storage | 600 // call serves to initialize the media request context for this storage |
596 // partition as well. | 601 // partition as well. |
597 } | 602 } |
598 } | 603 } |
599 | 604 |
600 } // namespace content | 605 } // namespace content |
OLD | NEW |