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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 partition->GetAppCacheService(), | 428 partition->GetAppCacheService(), |
429 blob_storage_context)); | 429 blob_storage_context)); |
430 } | 430 } |
431 protocol_handlers[kChromeDevToolsScheme] = | 431 protocol_handlers[kChromeDevToolsScheme] = |
432 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 432 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
433 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), | 433 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), |
434 browser_context_->IsOffTheRecord())); | 434 browser_context_->IsOffTheRecord())); |
435 | 435 |
436 URLRequestInterceptorScopedVector request_interceptors; | 436 URLRequestInterceptorScopedVector request_interceptors; |
437 request_interceptors.push_back( | 437 request_interceptors.push_back( |
438 ServiceWorkerRequestHandler::CreateInterceptor().release()); | 438 ServiceWorkerRequestHandler::CreateInterceptor( |
| 439 browser_context_->GetResourceContext()).release()); |
439 | 440 |
440 // These calls must happen after StoragePartitionImpl::Create(). | 441 // These calls must happen after StoragePartitionImpl::Create(). |
441 if (partition_domain.empty()) { | 442 if (partition_domain.empty()) { |
442 partition->SetURLRequestContext( | 443 partition->SetURLRequestContext( |
443 GetContentClient()->browser()->CreateRequestContext( | 444 GetContentClient()->browser()->CreateRequestContext( |
444 browser_context_, | 445 browser_context_, |
445 &protocol_handlers, | 446 &protocol_handlers, |
446 request_interceptors.Pass())); | 447 request_interceptors.Pass())); |
447 } else { | 448 } else { |
448 partition->SetURLRequestContext( | 449 partition->SetURLRequestContext( |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 | 590 |
590 // We do not call InitializeURLRequestContext() for media contexts because, | 591 // We do not call InitializeURLRequestContext() for media contexts because, |
591 // other than the HTTP cache, the media contexts share the same backing | 592 // other than the HTTP cache, the media contexts share the same backing |
592 // objects as their associated "normal" request context. Thus, the previous | 593 // objects as their associated "normal" request context. Thus, the previous |
593 // call serves to initialize the media request context for this storage | 594 // call serves to initialize the media request context for this storage |
594 // partition as well. | 595 // partition as well. |
595 } | 596 } |
596 } | 597 } |
597 | 598 |
598 } // namespace content | 599 } // namespace content |
OLD | NEW |