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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
408 partition->GetAppCacheService(), | 408 partition->GetAppCacheService(), |
409 blob_storage_context)); | 409 blob_storage_context)); |
410 } | 410 } |
411 protocol_handlers[kChromeDevToolsScheme] = | 411 protocol_handlers[kChromeDevToolsScheme] = |
412 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 412 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
413 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), | 413 CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(), |
414 browser_context_->IsOffTheRecord())); | 414 browser_context_->IsOffTheRecord())); |
415 | 415 |
416 ProtocolHandlerScopedVector protocol_interceptors; | 416 ProtocolHandlerScopedVector protocol_interceptors; |
417 protocol_interceptors.push_back( | 417 protocol_interceptors.push_back( |
418 ServiceWorkerRequestHandler::CreateInterceptor().release()); | 418 ServiceWorkerRequestHandler::CreateInterceptor(blob_storage_context) |
michaeln
2014/05/22 03:26:22
A lot of plumbing to get this value from here to w
| |
419 .release()); | |
419 | 420 |
420 // These calls must happen after StoragePartitionImpl::Create(). | 421 // These calls must happen after StoragePartitionImpl::Create(). |
421 if (partition_domain.empty()) { | 422 if (partition_domain.empty()) { |
422 partition->SetURLRequestContext( | 423 partition->SetURLRequestContext( |
423 GetContentClient()->browser()->CreateRequestContext( | 424 GetContentClient()->browser()->CreateRequestContext( |
424 browser_context_, | 425 browser_context_, |
425 &protocol_handlers, | 426 &protocol_handlers, |
426 protocol_interceptors.Pass())); | 427 protocol_interceptors.Pass())); |
427 } else { | 428 } else { |
428 partition->SetURLRequestContext( | 429 partition->SetURLRequestContext( |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 | 562 |
562 // We do not call InitializeURLRequestContext() for media contexts because, | 563 // We do not call InitializeURLRequestContext() for media contexts because, |
563 // other than the HTTP cache, the media contexts share the same backing | 564 // other than the HTTP cache, the media contexts share the same backing |
564 // objects as their associated "normal" request context. Thus, the previous | 565 // objects as their associated "normal" request context. Thus, the previous |
565 // call serves to initialize the media request context for this storage | 566 // call serves to initialize the media request context for this storage |
566 // partition as well. | 567 // partition as well. |
567 } | 568 } |
568 } | 569 } |
569 | 570 |
570 } // namespace content | 571 } // namespace content |
OLD | NEW |