| 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 24 matching lines...) Expand all Loading... |
| 35 #include "content/browser/streams/stream_context.h" | 35 #include "content/browser/streams/stream_context.h" |
| 36 #include "content/browser/streams/stream_registry.h" | 36 #include "content/browser/streams/stream_registry.h" |
| 37 #include "content/browser/streams/stream_url_request_job.h" | 37 #include "content/browser/streams/stream_url_request_job.h" |
| 38 #include "content/browser/webui/url_data_manager_backend.h" | 38 #include "content/browser/webui/url_data_manager_backend.h" |
| 39 #include "content/public/browser/browser_context.h" | 39 #include "content/public/browser/browser_context.h" |
| 40 #include "content/public/browser/browser_thread.h" | 40 #include "content/public/browser/browser_thread.h" |
| 41 #include "content/public/browser/content_browser_client.h" | 41 #include "content/public/browser/content_browser_client.h" |
| 42 #include "content/public/browser/storage_partition.h" | 42 #include "content/public/browser/storage_partition.h" |
| 43 #include "content/public/common/content_constants.h" | 43 #include "content/public/common/content_constants.h" |
| 44 #include "content/public/common/content_switches.h" | 44 #include "content/public/common/content_switches.h" |
| 45 #include "content/public/common/origin_trial_policy.h" |
| 45 #include "content/public/common/url_constants.h" | 46 #include "content/public/common/url_constants.h" |
| 46 #include "crypto/sha2.h" | 47 #include "crypto/sha2.h" |
| 47 #include "net/url_request/url_request_context.h" | 48 #include "net/url_request/url_request_context.h" |
| 48 #include "net/url_request/url_request_context_getter.h" | 49 #include "net/url_request/url_request_context_getter.h" |
| 49 #include "storage/browser/blob/blob_storage_context.h" | 50 #include "storage/browser/blob/blob_storage_context.h" |
| 50 #include "storage/browser/blob/blob_url_request_job_factory.h" | 51 #include "storage/browser/blob/blob_url_request_job_factory.h" |
| 51 #include "storage/browser/fileapi/file_system_url_request_job_factory.h" | 52 #include "storage/browser/fileapi/file_system_url_request_job_factory.h" |
| 52 | 53 |
| 53 using storage::FileSystemContext; | 54 using storage::FileSystemContext; |
| 54 using storage::BlobStorageContext; | 55 using storage::BlobStorageContext; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 439 } |
| 439 protocol_handlers[kChromeDevToolsScheme] = | 440 protocol_handlers[kChromeDevToolsScheme] = |
| 440 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 441 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 441 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), | 442 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), |
| 442 browser_context_->IsOffTheRecord())); | 443 browser_context_->IsOffTheRecord())); |
| 443 | 444 |
| 444 URLRequestInterceptorScopedVector request_interceptors; | 445 URLRequestInterceptorScopedVector request_interceptors; |
| 445 request_interceptors.push_back( | 446 request_interceptors.push_back( |
| 446 ServiceWorkerRequestHandler::CreateInterceptor( | 447 ServiceWorkerRequestHandler::CreateInterceptor( |
| 447 browser_context_->GetResourceContext()).release()); | 448 browser_context_->GetResourceContext()).release()); |
| 448 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 449 if (ForeignFetchRequestHandler::IsForeignFetchEnabled()) { |
| 449 switches::kEnableExperimentalWebPlatformFeatures)) { | |
| 450 request_interceptors.push_back( | 450 request_interceptors.push_back( |
| 451 ForeignFetchRequestHandler::CreateInterceptor( | 451 ForeignFetchRequestHandler::CreateInterceptor( |
| 452 browser_context_->GetResourceContext()) | 452 browser_context_->GetResourceContext()) |
| 453 .release()); | 453 .release()); |
| 454 } | 454 } |
| 455 request_interceptors.push_back(new AppCacheInterceptor()); | 455 request_interceptors.push_back(new AppCacheInterceptor()); |
| 456 | 456 |
| 457 // These calls must happen after StoragePartitionImpl::Create(). | 457 // These calls must happen after StoragePartitionImpl::Create(). |
| 458 if (partition_domain.empty()) { | 458 if (partition_domain.empty()) { |
| 459 partition->SetURLRequestContext( | 459 partition->SetURLRequestContext( |
| (...skipping 146 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 |