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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 partition->GetFileSystemContext())); | 419 partition->GetFileSystemContext())); |
420 protocol_handlers[url::kFileSystemScheme] = | 420 protocol_handlers[url::kFileSystemScheme] = |
421 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 421 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
422 CreateFileSystemProtocolHandler(partition_domain, | 422 CreateFileSystemProtocolHandler(partition_domain, |
423 partition->GetFileSystemContext())); | 423 partition->GetFileSystemContext())); |
424 protocol_handlers[kChromeUIScheme] = | 424 protocol_handlers[kChromeUIScheme] = |
425 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 425 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
426 URLDataManagerBackend::CreateProtocolHandler( | 426 URLDataManagerBackend::CreateProtocolHandler( |
427 browser_context_->GetResourceContext(), | 427 browser_context_->GetResourceContext(), |
428 browser_context_->IsOffTheRecord(), | 428 browser_context_->IsOffTheRecord(), |
429 partition->GetAppCacheService(), | |
430 blob_storage_context).release()); | 429 blob_storage_context).release()); |
431 std::vector<std::string> additional_webui_schemes; | 430 std::vector<std::string> additional_webui_schemes; |
432 GetContentClient()->browser()->GetAdditionalWebUISchemes( | 431 GetContentClient()->browser()->GetAdditionalWebUISchemes( |
433 &additional_webui_schemes); | 432 &additional_webui_schemes); |
434 for (std::vector<std::string>::const_iterator it = | 433 for (std::vector<std::string>::const_iterator it = |
435 additional_webui_schemes.begin(); | 434 additional_webui_schemes.begin(); |
436 it != additional_webui_schemes.end(); | 435 it != additional_webui_schemes.end(); |
437 ++it) { | 436 ++it) { |
438 protocol_handlers[*it] = | 437 protocol_handlers[*it] = |
439 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 438 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
440 URLDataManagerBackend::CreateProtocolHandler( | 439 URLDataManagerBackend::CreateProtocolHandler( |
441 browser_context_->GetResourceContext(), | 440 browser_context_->GetResourceContext(), |
442 browser_context_->IsOffTheRecord(), | 441 browser_context_->IsOffTheRecord(), |
443 partition->GetAppCacheService(), | |
444 blob_storage_context).release()); | 442 blob_storage_context).release()); |
445 } | 443 } |
446 protocol_handlers[kChromeDevToolsScheme] = | 444 protocol_handlers[kChromeDevToolsScheme] = |
447 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 445 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
448 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), | 446 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), |
449 browser_context_->IsOffTheRecord())); | 447 browser_context_->IsOffTheRecord())); |
450 | 448 |
451 URLRequestInterceptorScopedVector request_interceptors; | 449 URLRequestInterceptorScopedVector request_interceptors; |
452 request_interceptors.push_back( | 450 request_interceptors.push_back( |
453 ServiceWorkerRequestHandler::CreateInterceptor( | 451 ServiceWorkerRequestHandler::CreateInterceptor( |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 615 |
618 // We do not call InitializeURLRequestContext() for media contexts because, | 616 // We do not call InitializeURLRequestContext() for media contexts because, |
619 // other than the HTTP cache, the media contexts share the same backing | 617 // other than the HTTP cache, the media contexts share the same backing |
620 // objects as their associated "normal" request context. Thus, the previous | 618 // objects as their associated "normal" request context. Thus, the previous |
621 // call serves to initialize the media request context for this storage | 619 // call serves to initialize the media request context for this storage |
622 // partition as well. | 620 // partition as well. |
623 } | 621 } |
624 } | 622 } |
625 | 623 |
626 } // namespace content | 624 } // namespace content |
OLD | NEW |