| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 67         stream_context_->registry()->GetStream(request->url()); | 67         stream_context_->registry()->GetStream(request->url()); | 
| 68     if (stream.get()) | 68     if (stream.get()) | 
| 69       return new StreamURLRequestJob(request, network_delegate, stream); | 69       return new StreamURLRequestJob(request, network_delegate, stream); | 
| 70 | 70 | 
| 71     if (!blob_protocol_handler_) { | 71     if (!blob_protocol_handler_) { | 
| 72       // Construction is deferred because 'this' is constructed on | 72       // Construction is deferred because 'this' is constructed on | 
| 73       // the main thread but we want blob_protocol_handler_ constructed | 73       // the main thread but we want blob_protocol_handler_ constructed | 
| 74       // on the IO thread. | 74       // on the IO thread. | 
| 75       blob_protocol_handler_.reset(new storage::BlobProtocolHandler( | 75       blob_protocol_handler_.reset(new storage::BlobProtocolHandler( | 
| 76           blob_storage_context_->context(), | 76           blob_storage_context_->context(), | 
| 77           file_system_context_, | 77           file_system_context_.get(), | 
| 78           BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) | 78           BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) | 
| 79               .get())); | 79               .get())); | 
| 80     } | 80     } | 
| 81     return blob_protocol_handler_->MaybeCreateJob(request, network_delegate); | 81     return blob_protocol_handler_->MaybeCreateJob(request, network_delegate); | 
| 82   } | 82   } | 
| 83 | 83 | 
| 84  private: | 84  private: | 
| 85   const scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 85   const scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 
| 86   const scoped_refptr<StreamContext> stream_context_; | 86   const scoped_refptr<StreamContext> stream_context_; | 
| 87   const scoped_refptr<storage::FileSystemContext> file_system_context_; | 87   const scoped_refptr<storage::FileSystemContext> file_system_context_; | 
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 589 | 589 | 
| 590     // We do not call InitializeURLRequestContext() for media contexts because, | 590     // We do not call InitializeURLRequestContext() for media contexts because, | 
| 591     // other than the HTTP cache, the media contexts share the same backing | 591     // other than the HTTP cache, the media contexts share the same backing | 
| 592     // objects as their associated "normal" request context.  Thus, the previous | 592     // objects as their associated "normal" request context.  Thus, the previous | 
| 593     // call serves to initialize the media request context for this storage | 593     // call serves to initialize the media request context for this storage | 
| 594     // partition as well. | 594     // partition as well. | 
| 595   } | 595   } | 
| 596 } | 596 } | 
| 597 | 597 | 
| 598 }  // namespace content | 598 }  // namespace content | 
| OLD | NEW | 
|---|