| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 stream_context, | 412 stream_context, |
| 413 partition->GetFileSystemContext())); | 413 partition->GetFileSystemContext())); |
| 414 protocol_handlers[url::kFileSystemScheme] = | 414 protocol_handlers[url::kFileSystemScheme] = |
| 415 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 415 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 416 CreateFileSystemProtocolHandler(partition_domain, | 416 CreateFileSystemProtocolHandler(partition_domain, |
| 417 partition->GetFileSystemContext())); | 417 partition->GetFileSystemContext())); |
| 418 protocol_handlers[kChromeUIScheme] = | 418 protocol_handlers[kChromeUIScheme] = |
| 419 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 419 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 420 URLDataManagerBackend::CreateProtocolHandler( | 420 URLDataManagerBackend::CreateProtocolHandler( |
| 421 browser_context_->GetResourceContext(), | 421 browser_context_->GetResourceContext(), |
| 422 browser_context_->IsOffTheRecord(), | |
| 423 blob_storage_context).release()); | 422 blob_storage_context).release()); |
| 424 std::vector<std::string> additional_webui_schemes; | 423 std::vector<std::string> additional_webui_schemes; |
| 425 GetContentClient()->browser()->GetAdditionalWebUISchemes( | 424 GetContentClient()->browser()->GetAdditionalWebUISchemes( |
| 426 &additional_webui_schemes); | 425 &additional_webui_schemes); |
| 427 for (std::vector<std::string>::const_iterator it = | 426 for (std::vector<std::string>::const_iterator it = |
| 428 additional_webui_schemes.begin(); | 427 additional_webui_schemes.begin(); |
| 429 it != additional_webui_schemes.end(); | 428 it != additional_webui_schemes.end(); |
| 430 ++it) { | 429 ++it) { |
| 431 protocol_handlers[*it] = | 430 protocol_handlers[*it] = |
| 432 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 431 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 433 URLDataManagerBackend::CreateProtocolHandler( | 432 URLDataManagerBackend::CreateProtocolHandler( |
| 434 browser_context_->GetResourceContext(), | 433 browser_context_->GetResourceContext(), |
| 435 browser_context_->IsOffTheRecord(), | |
| 436 blob_storage_context).release()); | 434 blob_storage_context).release()); |
| 437 } | 435 } |
| 436 |
| 438 protocol_handlers[kChromeDevToolsScheme] = | 437 protocol_handlers[kChromeDevToolsScheme] = |
| 439 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 438 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 440 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), | 439 CreateDevToolsProtocolHandler( |
| 441 browser_context_->IsOffTheRecord())); | 440 browser_context_->GetResourceContext())); |
| 442 | 441 |
| 443 URLRequestInterceptorScopedVector request_interceptors; | 442 URLRequestInterceptorScopedVector request_interceptors; |
| 444 request_interceptors.push_back(ServiceWorkerRequestHandler::CreateInterceptor( | 443 request_interceptors.push_back(ServiceWorkerRequestHandler::CreateInterceptor( |
| 445 browser_context_->GetResourceContext())); | 444 browser_context_->GetResourceContext())); |
| 446 if (ForeignFetchRequestHandler::IsForeignFetchEnabled()) { | 445 if (ForeignFetchRequestHandler::IsForeignFetchEnabled()) { |
| 447 request_interceptors.push_back( | 446 request_interceptors.push_back( |
| 448 ForeignFetchRequestHandler::CreateInterceptor( | 447 ForeignFetchRequestHandler::CreateInterceptor( |
| 449 browser_context_->GetResourceContext())); | 448 browser_context_->GetResourceContext())); |
| 450 } | 449 } |
| 451 request_interceptors.push_back(base::MakeUnique<AppCacheInterceptor>()); | 450 request_interceptors.push_back(base::MakeUnique<AppCacheInterceptor>()); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 607 |
| 609 // We do not call InitializeURLRequestContext() for media contexts because, | 608 // We do not call InitializeURLRequestContext() for media contexts because, |
| 610 // other than the HTTP cache, the media contexts share the same backing | 609 // other than the HTTP cache, the media contexts share the same backing |
| 611 // objects as their associated "normal" request context. Thus, the previous | 610 // objects as their associated "normal" request context. Thus, the previous |
| 612 // call serves to initialize the media request context for this storage | 611 // call serves to initialize the media request context for this storage |
| 613 // partition as well. | 612 // partition as well. |
| 614 } | 613 } |
| 615 } | 614 } |
| 616 | 615 |
| 617 } // namespace content | 616 } // namespace content |
| OLD | NEW |